Solve the problem that SQL server enables data table cache trust and non-DBO architecture data table registration fails.

Source: Internet
Author: User

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/

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.