Tag: syndicated

  • Windows 8 and Google Calendar

    I use the Google calendar service extensively. I host my domain there and I’ve gotten used to the calendar. When I set up my Windows 8 desktop, I was curious if I could use the built in calendar app instead of living in a web browser.

    A quick search found this link, which worked just fine for me. I added my Google account and I had my various appointments and note appear in Windows 8. Very smooth, and very nice.

    I have tended to use the online calendar from Google, but it’s definitely easy to read the “Metro” interface for the calendar. I haven’t used it a lot, but I may use it more over time since it’s easier to read in full screen format than any of the browsers or Outlook items.

    The downside? On a desktop, getting to the calendar isn’t as simple as I’d like. The hover in the upper left corner doesn’t always work and if I move the mouse wrong, I lose the switch capabilities.

  • Off to the Richmond User Group, a Red Gate Experiment and SQL Saturday #187

    This weekend is SQL Saturday #187 in Richmond, VA. Today’s a travel day for me, as I head out early because Red Gate Software is sponsoring a half day event tomorrow, Friday, where myself and Grant Fritchey (b | t) will be speaking. This is an experiment for us, and I’m hoping it goes well. If so, you might find us doing a number of these events around the country.

    Today I travel, speaking on encryption at the Richmond SQL Server Users Group, then tomorrow at our Red Gate event, and Saturday at SQL Saturday. Then two days off, hanging with my brother, his wife, and my nephews in Maryland before coming back next week.

    A busy few days. Four different talks, on four subjects. Fortunately I’ve been rehearsing this week.

    Hope to see some of you there.

  • Dropping Indexes

    While working on some demos recently, I needed to drop an index for a test. I executed this generic statement for an index I’d just created.

       1: DROP INDEX ix_IndexName

    Needless to say I was surprised when I got this error:

    Msg 159, Level 15, State 1, Line 1

    Must specify the table name and index name for the DROP INDEX statement.

     

    I haven’t done much index maintenance in the last few years, but since I had specified the name, and I expected names to be unique, I was surprised. That’s not the case, however, since indexes aren’t seen as objects.

    I created the index in AdventureWorks with this code:

       1: -- paste in create index statement

       2: CREATE NONCLUSTERED INDEX ix_IndexName

       3: ON Sales.SalesOrderHeader ( [TerritoryID],[ShipMethodID], [SubTotal], [Freight] )

       4: INCLUDE ([SalesOrderNumber], [CustomerID]);

    As a test, I then added this index:

       1: CREATE NONCLUSTERED INDEX ix_IndexName

       2: ON Production.Product ( [Name],[ListPrice]);

    Same name, different table.

    A quick check in sys.objects surprised me.

       1: select *

       2:  from sys.objects

       3:  where name = 'ix_Indexname'

    This returned no results. Hmmm, let’s investigate further. I next decided to check sys.indexes.

       1: select *

       2:  from sys.indexes where name = 'ix_Indexname'

    This returned two results:

    indexes

    Two entries, with two object_ids. I wondered what those objects were, so I ran more code:

       1: select *

       2:   from sys.objects

       3:   where object_id in (1010102639, 1717581157)

    I received the two tables back as the objects.

    indexes2

    This surprised me, though I’m sure I’ve read the details in a book at some point, or even seen the documentation in sys.indexes. The entry for name says it is unique only within the space of the object, which would be the parent table.

    I had assumed that indexes were objects, but they aren’t. They are an attribute of an object, and as such, I needed this code to remove my index:

       1: -- cleanup

       2: DROP INDEX ix_IndexName

       3:  ON Sales.SalesOrderHeader

       4: ;

       5: GO

    Update: As noted in a few comments, you can also drop the index as:

       2: DROP INDEX Sales.SalesOrderHeader.ix_IndexName

    And, of course, I needed to drop my test object.

       1: Drop INDEX ix_IndexName

       2: ON Production.Product

       3: ;

  • Come Learn at SQL Intersection, Get a Surface Tablet

    This spring I’m speaking at the SQL Intersection conference. It’s a new conference, managed by SQLskills founders Kimberly Tripp and Paul Randal. It’s April 8-11 in Las Vegas, and it’s got a slew of amazing speakers that I’ll be alongside, including Brent Ozar, Grant Fritchey, and more.

    If you register today, and attend one of the pre- or post-conference sessions, and there are some great ones in the SQL Server space, you’ll get a Surface RT Tablet. It’s a great tool to use for mobile work, taking notes at events, in meetings, or even walking around your office.

    The tablet isn’t a reason to attend the conference, but it’s a nice bonus. And it will help you, since you’ll want to take lots of notes in the sessions. All of the speakers are experienced professionals, working with SQL Server and bringing a ton of experience to their talks. There are talks about new features and old ones, best practices, and practical advice.

    If you’re looking to learn this spring, think about coming to SQL Intersection this spring.

    Learning by day, Entertainment at night.