How to: Specify the Local Instance of SQL Server to use for Design-time Validation
To perform design-time validation, Visual Studio Team System Database Edition requires an instance of Microsoft SQL Server 2005. By default, Database Edition uses the local instance of SQL Server 2005. You can specify an instance of SQL Server 2005 Developer Edition, Express Edition, or Enterprise Edition (including the Enterprise Evaluation Edition). To use the default instance for design-time validation, you leave the instance name blank.
If you specify an instance of SQL Server 2005 Express Edition, the following features will be unavailable:
Database mirroring (if you use it in a stored procedure)
Parallel index creation (MAXDOP option on CREATE INDEX)
Online index operations (ONLINE option on CREATE INDEX)
If you use one or more of these features in your database and you specify an instance of SQL Server 2005 Express Edition for design-time validation, an error will appear.
If you require features such as full-text search in your database projects, you must also install support for them in the design-time validation database before you can use them in your database projects.
To Change the Instance of SQL Server that is used for Design-time Validation
To change the instance of SQL Server that is used for design-time validation
On the Tools menu, click Options.
The Options dialog box appears.
Expand the Database Tools node, and click Design-time Validation Database.
In the SQL Server Instance Name (blank for default), type the name of the instance of SQL Server 2005 that you want to use for design-time validation. You must provide only the instance name. If you specify ./InstanceName, an error appears.
The specified instance must be running in order to create and modify database projects and the objects that are contained in the database projects.
You must now unload and reload your project for the change to take effect. You can do this using the Project menu or by closing and reopening the solution.
You must have permissions to create, modify, and delete databases in the design-time validation database. If you must allow users who are not administrators to create design-time validation databases, you must use the following procedure:
To configure your local SQL Server instance to support non-administrative users
Create a local Microsoft Windows security group.
The recommended name is VSTEDPUsers. If you do not know how to create a security group, see the documentation for your operating system.
See the next procedure for the steps to create a security group if you are using Windows XP.
Add all users who will use Database Edition as members of the security group that you just created.
Run the Transact-SQL editor from Database Edition or a tool such as SQL Server Management Studio and connect to the server as a system administrator.
In a query window, execute the following:
CREATE LOGIN [ComputerName\VSTEDPUsers] FROM WINDOWS Exec sp_addsrvrolemember 'ComputerName\VSTEDPUsers','dbcreator' Exec sp_addsrvrolemember 'ComputerName\VSTEDPUsers',' securityadmin'
You must substitute the name of the computer that hosts the SQL Server 2005 database in place of ComputerName.
If you need SQLCLR integration support for your SQL Server 2005 database projects, you must also execute the following:
exec sp_configure 'clr enabled', 1 reconfigure
Your users should able to connect to your local instance of SQL Server.
To create a security group using Windows XP
Click Start, and then click Control Panel.
Double-click Administrative Tools, and then double-click Computer Management.
In the console tree, expand Local Users and Groups, and then click Groups.
On the Action menu, click New Group.
In Group Name, type a name for the new group.
In Description, type a description of the new group.
To add one or more users to the new group, click Add.
Click Create, and then click Close.
Your security group has been created with the users whom you specified.