Upload T-SQL and execute at your hosting provider using an ASP.NET page
With this approach, you can use the Database Publishing Wizard to generate a T-SQL file from your local database. Then, you can upload the script to your hosting provider, and use the sample ASP.NET page provided to execute this file.
This approach is useful in the following circumstances:
- Your hosting provider has not deployed the Database Publishing Services, enabling simple publishing of your SQL Server database
- Your hosting provider does not have a T-SQL script execution window or the T-SQL script generated by the Database Publishing Wizard is too large to paste into the T-SQL script execution window
Below are the instructions to use this approach:
- Run the Database Publishing Wizard to generate a T-SQL script file for your local database
- Using FTP (or another approach if applicable), upload this T-SQL file to your hosting account
- Download the sample ASP.NET page by clicking on this link:
- Edit the ASPX page and change the values of the variables fileUrl and
connectionString as follows:
- fileUrl should be the url of the T-SQL file you uploaded. For example if your domain name is www.mydomain.Com, then the url would be http://www.mydomain.com/File.Sql
- connectionString should be the connection string of your hosted SQL Server database
- Upload the ASPX page to your hosting account
- Point your web browser to the ASPX page you uploaded. When this page has completed loading, your database should now be populated in the remote SQL Server database
- Important: Delete the T-SQL file and ASPX page in your hosting account. This will prevent others from reading your data or tampering with your database.