ASP.Net Host

How to upload SQL Express to SQL 2005

A common issue with SQL Express has been that it lacks the ability to upload data to remote server. As a result, we the staff of Aquest Hosting have had to have customers send us a backup (.bak) or detached copy (.mdf file) so that we could restore the database to a SQL 2005 server on our side. This is a manual process and we've been forced to charge for it (because we can't work for free, sorry).
 
You will need a hosting account with us, and you will need to have a SQL 2005 database added to your account, which will be the destination for the copy of your SQL Express database.
 
This solution involves creating a script for your database, uploading to the webserver using FTP, and adding a page to your site which executes to run the script and copy the structure and data from the script into your SQL 2005 database on our SQL server.
 
Below are the instructions to use this approach:
  1. Run the Database Publishing Wizard to generate a T-SQL script file for your local database ( Free Download)
  2. Using FTP (or another approach if applicable), upload this T-SQL file to your hosting account
  3. Download the sample ASP.NET page by clicking on this link: RunSQL.aspx
  4. Edit the ASPX page and change the values of the variables fileName and connectionString as follows:
    1. fileName should be the full path of the T-SQL file you uploaded. AquestHosting customers can get the full path to your domain folder on the 'Domains' page in the control panel, and then append the 'sql' file name to it. (example:  F:\Websites\myaccount\mysitecom\mydatabase.sql ) 
    2. connectionString should be the connection string of your hosted SQL Server database. Aquest Hosting customers can get their connection string on the 'SQL 2000' or 'SQL 2005' page of the control panel.
  5. Upload the ASPX page to your hosting account
  6. 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
  7. 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.
  8. Change the web.config file of your application to point to the SQL 2005 database.
These details came from,  http://www.codeplex.com/sqlhost/Wiki/View.aspx?title=UploadAndExecute, with the exception of step 8, which we added.
 
If' you'd rather pay us to restore the database for you, we still will at the current price for doing so, but this will allow you more control and save you a few bucks too.
[ 1/16/2007 ]

0 Comments

We recommend Aquest Hosting for your ASP.Net 2.0 hosting, Community Server hosting, and DotNetNuke hosting.