Is there a way to change the back up location for only my database in my database project settings or do I have to do that in a Pre-Deployment script and uncheck the back up database before deployment from the Deployment configuration file?
Is there a way to change the back up location for only my database
Share
The backup option uses the SQL Server default backup directory. You can change that location only by editing the registry. Unfortunately, you can’t set a different backup location for each database.
Location (For SQL 2008)
Change…
For more on changing SQL server default paths…
http://www.mssqltips.com/tip.asp?tip=1583
If you are feeling adventurous, you could change the registry value in your pre-deployment script and reset it with you post-deployment script. Use “xp_instance_regread” and “xp_instance_regwrite” to do that. USE WITH CAUTION!
More on that -> http://sqladm.blogspot.com/2010/09/xpinstanceregwrite-syntax.html
If you notice in your deployment script…the code to read the registry entry looks like this…
If you are careful, you could read, change, and restore the path during your deployment.
Hope this helps!