Tuesday, April 16, 2013

Connecting to a Remote SQL Server and Import Data from your local SQL Server (2008 Express)

I have a remote database sitting on VPS and I need to transfer the data to the remote server. All I do is first register/connect the remote Sql server in my Management Studio. For this, enter the provided server name using the registered domain name (or IP Address)  along with the provided port number. Append the Sql server name (I appended \SQLExpress).

Doing this will enable you to connect the remote server in your local management studio (assuming you enter the correct authentication details for username/password !).

Before you go ahead with the next step of doing data migration, make sure first you run the database scripts so that your indexes/foreign keys are intact. Once this is done, you can use the import/export wizard to export data from your local machine to the remote server. A tiny trick is to use the import wizard from the destination database rather than using the export wizard from the source database. This will ensure your configuration for destination database is aptly configured.

Sorry this is very bland write-up without any screenshots or proper explanation, but hopefully I'll provide them when I have more time.



No comments: