Reputation: 101
While running (F5) Stored Procedure from generated Schema of SQL server database project, I need to supply connection string (SQL Server connection window prompts). Morever the SP is firing against the default Master-database.
To resolve this I used "Use " in the beginning of the SP. But this is not viable because I need to provide "Use " for all 100's of SP's, and more over every time the conection string as well.
Is there any way where we can specify the connection string in CMD variable or config where it could be picked while running the SP from schema objects? Any help is appreciated.
Upvotes: 3
Views: 571
Reputation: 181
I think you are looking for the "Initial Catalog" setting.
Data Source=myServerAddress;Initial Catalog=myDataBase;User Id=myUsername;Password=myPassword;
Take a look at http://www.connectionstrings.com/
Upvotes: 1