Domanda

I have a Visual Studio 2010 database project and I have imported an existing schema. There are stored procedures in this database that refer to the Integration Services system table dbo.sysssislog and is generating a number of warnings in my project.

I have tried adding the master.dbschema and the msdb.dbschema as database references and I also tried renaming the references' database names to tempdb (instead of master or instead of msdb) but the problem persists.

I opened the msdb.dbschema file and I have confirmed that the sysssislog table exists in the file.

Here is the warning:

SQL04151: Procedure: [dbo].[storedProcedureName] has an unresolved reference to object [dbo].[sysssislog].
È stato utile?

Soluzione

The dbo.sysssislog is a user table (marked as a system table) created by SQL Server Integration Services (SSIS) automatically, when you create a package with event logging of SQL Server type. Besides this table, SSIS also creates some stored procedures (which can be ALTERed) for aiding the logging process.

It's an unresolved reference in your project, probably because you imported the database schema, which resulted in importing the stored procedures mentioned, but not importing the dbo.sysssislog table, since it's marked as a system table.

So now, what you have is a bunch of stored procedures referencing a table which you haven't imported, resulting in the warning.

What you can do to get rid of the warning(s), is to DROP and reCREATE the table manually (which is the only way to "remove" the system table mark), and importing it to your project.

Altri suggerimenti

Here is an alternative and cleaner approach:

Create a new empty SSDT project, call it "sysssislog" and add a script for sysssislog table to it. Build the project to generate the dacpac file "sysssislog.dacpac".

In your SSDT project add a databasereference to the dacpac file and select "Same Database" for the database location in the "Add Database Reference" dialog.

If your project is under source control, you can add the dacpac to the project, and then add the reference, so the dacpac file is under source control too.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top