wvg


I'm experiencing a problem while trying to index a view ... I'm using a single field and everything else are default entry's. I'm getting the Error Message 1939 .

The code is a follows:

USE [CS_WGO]

GO

SET ARITHABORT ON

GO

SET CONCAT_NULL_YIELDS_NULL ON

GO

SET QUOTED_IDENTIFIER ON

GO

SET ANSI_NULLS ON

GO

SET ANSI_PADDING ON

GO

SET ANSI_WARNINGS ON

GO

SET NUMERIC_ROUNDABORT OFF

GO

CREATE UNIQUE CLUSTERED INDEX [IDX_ALG_ORG_BEZ_V_1] ON [dbo].[ALG_ORG_BEZ_V]

(

[NDL] ASC

)WITH (STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, IGNORE_DUP_KEY = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = OFF) ON [PRIMARY]

GO

And the Error is:

Msg 1939, Level 16, State 1, Line 1

Index kann fur die 'ALG_ORG_BEZ_V'-Sicht nicht erstellt werden, da die Sicht nicht schemagebunden ist.

For those of you who do not read German ... it means something like ..." The Index kann not be created because the view is not bound to a schema.

I don't understand what that means for me ... can someone explain that to me a little bit more in depth ...

Thanx ... wvg




Re: INDEXING A VIEW in MSSQL2K5x64.de Standard w.SP1 ... ERROR 1939

Jwalant Natvarlal Soneji


I m facing the same problem when tried with interface of sqlserver 2005 and the database was sql server 2000, how to get rid of it as i wish to decrease the exectuion time of the view. and so tried to index it.







Re: INDEXING A VIEW in MSSQL2K5x64.de Standard w.SP1 ... ERROR 1939

Jwalant Natvarlal Soneji

can anyone please help me with this please

thanks







Re: INDEXING A VIEW in MSSQL2K5x64.de Standard w.SP1 ... ERROR 1939

Madhu K Nair

can u post the schema (script) of the view. to create index on a view (indexed view) there are lot of rules to be followed. One of the requirement is to have the view Schema bound. ie the View script should have a SCHEMABINDING clause. Read about this in BOL Create View section.

Madhu