Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
This error occurs if you specify the name of a database in an ALTER DATABASE statement. If you use this type of statement in an object definition, pre-deployment script, or post deployment script, you must use the replacement parameter $(databasename). When you deploy your changes, the replacement parameter is automatically replaced with the name of the target database.
To correct this error
Right-click the object or script in your database project that contains the ALTER DATABASE statement, and click Open.
The script opens in the Transact-SQL (T-SQL) editor.
Change the ALTER DATABASE DatabaseName to be ALTER DATABASE $(databasename).
Save the script.
Rebuild your database project.
See Also
Tasks
How to: Prepare Database Build Scripts
Concepts
An Overview of Database Scripts
Troubleshooting Data Generation Issues
Terminology Overview of Team Edition for Database Professionals