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
- 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
- Create database on the target machine (blank)
- Use xSQL Object to compare and synchronize the database schemas of the source and the target.
- 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
- Use xSQL Object to compare and synchronize the database schemas of the source and the target.
- Use xSQL Data Compare to push any data you need to push 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 Object 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.