I have built a WebSite on my laptop which takes his data from a local a SLQ database. I did not insert the database in the solution through "Add New Item" but rather created an Sql connection. Now for the deployment phase, woudl I be better off to add this
database to my solution? I have never done this and I'm not sure what is better?
When you deploy a Web application that uses a SQL Server database, you might also have to propagate data structures, data, or both. Visual Studio can automatically create scripts (.sql files) to do this in the destination database, and these scripts can
be included in the Web package. You can also include custom SQL Server scripts and specify the order in which the scripts should run. Web Deploy runs the scripts on the destination server when the package is installed.
You specify SQL Server deployment options on the Package/Publish SQL tab of the project Properties page. You can refer the illustration to learn the procedures below,
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue.
If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.
Member
13 Points
113 Posts
Database and deployment
Jun 22, 2013 09:34 PM|acheo|LINK
Hi,
I have built a WebSite on my laptop which takes his data from a local a SLQ database. I did not insert the database in the solution through "Add New Item" but rather created an Sql connection. Now for the deployment phase, woudl I be better off to add this database to my solution? I have never done this and I'm not sure what is better?
thanks
All-Star
52523 Points
15672 Posts
Re: Database and deployment
Jun 22, 2013 10:15 PM|oned_gk|LINK
http://msdn.microsoft.com/en-us/library/bb907585(v=vs.100).aspx
Suwandi - Non Graduate Programmer
Star
12651 Points
2375 Posts
Re: Database and deployment
Jun 23, 2013 05:06 PM|jats_ptl|LINK
Hi acheo,
Please go through the following threads that shows various ways to achieve this,
http://www.asp.net/web-forms/tutorials/deployment/deploying-web-site-projects/deploying-a-database-cs
http://www.windowshostingasp.net/windows_hosting_forums/showthread.php?t=22
http://forums.asp.net/t/1903127.aspx/1
http://msdn.microsoft.com/en-us/library/dd465343(v=vs.100).aspx
Hope this helps.
Thanks,
Jatin
All-Star
32817 Points
3815 Posts
Re: Database and deployment
Jun 26, 2013 03:31 AM|Angie xu - MSFT|LINK
Hi,
When you deploy a Web application that uses a SQL Server database, you might also have to propagate data structures, data, or both. Visual Studio can automatically create scripts (.sql files) to do this in the destination database, and these scripts can be included in the Web package. You can also include custom SQL Server scripts and specify the order in which the scripts should run. Web Deploy runs the scripts on the destination server when the package is installed.
You specify SQL Server deployment options on the Package/Publish SQL tab of the project Properties page. You can refer the illustration to learn the procedures below,
# Deploying a SQL Server Database - http://msdn.microsoft.com/en-us/library/dd394698(v=vs.100).aspx
Regards
Please remember to click "Mark as Answer" the responses that resolved your issue.
If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.