SQL Packager - 5.3
Learning SQL Packager - 5.3
Upgrading the database structure and data
When you use SQL Packager to upgrade the data in a database, you can select data only for those tables whose structure is identical.
If both the schema and the data has been updated for a particular table, and the schema changes include new columns that do not allow null values, you will have to run two packages; the first package to update the schema, and the second to update the data.
For example, the previous version of the database is called DatabaseOld, and the latest is called DatabaseNew. To upgrade DatabaseOld:
- Create a package to upgrade only the schema of DatabaseOld:
- On the Choose databases page of the Packager Wizard, select DatabaseOld as the previous version, and DatabaseNew as the latest version.
- On the Choose the database objects whose schema will be packaged page, select all the objects to package their schema.
- On the Choose the tables whose data will be packaged page, clear the selection for all of the tables so that no data is packaged.
- Generate the package (for example Package1).
- Run Package1 on DatabaseOld.
DatabaseOld now contains the upgraded schema, but still has the old data.
- Create a package to upgrade the data in DatabaseOld with the data in DatabaseNew.
- On the Choose databases page of the Packager Wizard, select DatabaseOld as the previous version, and DatabaseNew as the latest version.
- On the Choose the database objects whose schema will be packaged page, no objects will be available for schema packaging because they are now identical.
- On the Choose the tables whose data will be packaged page, select all of the tables so that all data is packaged.
- Generate the package (Package2).
- Run Package2 on DatabaseOld to complete the upgrade.
If you need to upgrade a number of databases, you should deploy both packages and run PackageĀ 1 followed by PackageĀ 2.
See Also |
Was this article helpful?
SQL Packager
- Logging and log files
- Package executable cannot load zlib1.dll
- Creating executables that use the .NET 2.0 runtime (version 5)
- Creating a database for an earlier version of SQL Server
- SQL comparison and synchronization automation capabilities
- Reseed applying "incorrect" identity values
- "Value cannot be null" error creating data script
- DEFAULT_SCHEMA clause cannot be used with a Windows group
- Package created from script always creates database
- SQL Packager not keeping the READ_COMMITTED_SNAPSHOT SQL option ON
- Setting the Database Options for a New Database
- Package execution failing because the login already has an account under a different user name
- Invalid SQL when synchronizing an index to a scripts folder when data compression is specified
- Logging and log files
all SQL products
- Compatibility of Red Gate tools in 64-bit environments
- Application has encountered an error and needs to close
- Error message after installing SQL Toolbelt - The description for Event ID ( 1 ) in Source ( nview_info ) cannot be found.
- Changing the temporary directory used by the installer
- Toolbelt Installer "hanging" while "scanning volumes"
- Login failing with "trusted SQL Server connection" error when using RunAs
all products
- Some Red Gate products identified as containing a trojan by Anti-Virus software
- Activation may fail with Unknown Error -1
- Product uses web help although a CHM file is available locally
- Argument exception resulting from missing environment variable
- Check for updates may fail when used through proxies
- 'Unidentified Publisher' error when repairing or uninstalling
- Licensing activates product as standard edition
- Moving Red Gate software products to another machine
- Red Gate tools log locations
- The application UI opening slowly when there is no internet access
SQL Packager
all SQL products
all products
- Red Gate product acknowledgements
- Red Gate bundle history
- Check for updates
- Troubleshooting Check for Updates errors
- Current versions
- Deactivating your products
- Installing Red Gate products from the .msi file
- Requesting additional activations
- Serial numbers for bundles
- Reactivating using a different serial number
- Extending your trial
- Finding your serial numbers
- Moving a serial number from one computer to another
- No response received for manual activation
- Licensing and activation resources
- Troubleshooting licensing and activation errors
- Licensing and activation FAQs
- Red Gate tools log file locations
- Download old versions of products
- Download product prerequisites & utilities
- Support & upgrades
- Upgrading your software
- Upgrading FAQs
- Installing Red Gate SQL Server tools across a network

Getting started
Tips and troubleshooting