CASE 1: you have direct access to both the SQL Server where the source database is and the SQL Server where the target database is.
- First time deployment
- Backup / restore method
- Backup the database on the source
- Copy the backup file to the target machine
- Restore the database on the target
- Create logins and set permissions as needed
- Compare and Synchronize method
- Create database on the target machine (blank)
- Use xSQL Schema Compare to compare and synchronize the database schemas of the source and the target.
- Use xSQL Data Compare to populate the remote database with whatever data you might have on the source that you want to publish (lookup tables etc.)
- Database exists in the target server
- Compare and Synchronize method
- Use xSQL Schema Compare to compare and synchronize the database schemas of the source and the target.
- Use xSQL Data Compare to push any data you need from the source to the target. Caution: be careful not to affect any data that exists on the target already.
CASE 2: You can not directly access the target server but you have a way to deploy SQL scripts on that server. As is indeed the case in most scenarios you also should have a way to get a backup of your database from that remote host. In this case follow those simple steps:
- Restore the remote database on your local environment
- Use xSQL Schema Compare to compare your source database with the restored database. Generate the schema synchronization script and save it.
- Use xSQL Data Compare to compare your source database with the restored database. Carefully make your selections to ensure you push only the data you want to push from the source to the target. Generate the data synchronization script and save it.
- Deploy your schema synchronization script to the target machine.
- Deploy your data synchronization script to the target machine.
Both xSQL Schema Compare and xSQL Data Compare are completely free for SQL Server Express with no restrictions or limitations. Furthermore, for other editions of SQL Server the tools are free if the database has under a certain number of objects in it (current limitations are listed here).