locked
Error referencing System Views in Database Projects RRS feed

  • Question

  • Hi,
     
    I am working on a Data Warehouse project which is on SQL SERVER 2008. In onew of the view I am referencing sys.indexes, sys.objects and sys.columns

    I imported the schema of this database into VSTS 2008 Database Project. The import action did not import the system views (which is correct) but when I try to build the project I am getting error like 


    Error 574 TSD03006: View: [dbo].[vwInformationSchema] contains an unresolved reference to an object. Either the object does not exist or the reference is ambiguous because it could refer to any of the following objects: [dbo].[sysindexkeys].[c]::[column_id], [sys].[columns].[c]::[column_id], [sys].[columns].[column_id], [sys].[indexes].[c]::[column_id] or [sys].[objects].[c]::[column_id]. D:\Suresh\LATAM2K8\LATAM2K8\dbFactorystaging\Schema Objects\Schemas\dbo\Views\vwInformationSchema.view.sql 85 10 dbFactorystaging

    Pls let me know how to resolve this?

    Thanks
    Suresh Kumar.D

    Saturday, January 10, 2009 12:53 PM

Answers

  • You need to add a database reference to the master.dbschema file.
    This file is place in the %ProgramFiles%\Microsoft Visual Studio 9.0\VSTSDB\Extensions\SqlServer\2008\DBSchemas.
    -GertD

    Saturday, January 10, 2009 5:35 PM

All replies

  • You need to add a database reference to the master.dbschema file.
    This file is place in the %ProgramFiles%\Microsoft Visual Studio 9.0\VSTSDB\Extensions\SqlServer\2008\DBSchemas.
    -GertD

    Saturday, January 10, 2009 5:35 PM
  • Thanks a lot Gert. Solved my issue!
    Monday, January 12, 2009 4:39 AM