Home Forums SQL Server 2008 T-SQL (SS2K8) CREATE INDEX failing after changing collation on table. RE: CREATE INDEX failing after changing collation on table.

  • Hi,

    Yes it is ran in the database where dbo.company is located, but the error message 'object is not found' happens because the database context is switched to master because of the Location: sobuild.c:3392 error.

    I use the USE [database] before running the CREATE INDEX and manually selected in SSMS before running the CREATE INDEX command.

    Now I have found out after playing with the order of creating indexes it started to work. If I create the idx_company_id first then it works. If I create the index cp_name_o first then it gives the location error etc.

    CREATE NONCLUSTERED INDEX [idx_company_id] ON [dbo].[company]

    (

    [id] ASC

    )

    INCLUDE ( [name])

    go

    CREATE NONCLUSTERED INDEX [cp_name_o] ON [dbo].[company]

    (

    [name] ASC

    )

    go

    Regards

    Richard...

    http://www.linkedin.com/in/gbd77rc