Recently, a project was developed to replace the data table prefix with different schemas (database architecture) when creating a database. This design makes the data table name Friendly and logically clear and more compliant with the SQL Server database specifications.
However, the problem occurred yesterday when the data table cache dependency was enabled because an error message is displayed when the cache is enabled for a product table (product. category:
Bytes ---------------------------------------------------------------------------------------------------------
The trigger 'dbo. Production. product_aspnet_sqlcachenotification_trigger 'cannot be executed.
Create a table because its architecture is different from that of the target table or view.
Failed during cache dependency registration.
Make sure that the database name and table name are valid. The table name must comply with the format of the Rule identifier in SQL.
The failed SQL command is:
DBO. aspnet_sqlcacheregistertablestoredprocedure
Bytes ---------------------------------------------------------------------------------------------------------
I found some information on the Internet and finally found the problem. The solution is as follows:
1. Open the current database, find the Stored Procedure named [DBO]. [aspnet_sqlcacheregistertablestoredprocedure] In the Stored Procedure List, and open it.
2. set @ fulltriggername = 'dbo. ['+ @ triggername +'] 'changed to set @ fulltriggername =' [DBO. '+ @ triggername +'] '.
3. Execute the stored procedure and re-create the cache dependency of the data table (product. Category). OK. The data table is created successfully!
Bytes ----------------------------------------------------------------------------------------------------
Release the. NET project development tool (V3.0 ):
Http://www.cnblogs.com/mrhgw/archive/2008/08/06/1261664.html
Http://www.mrhgw.cn/