|
You can export the objects present in
a Database into Single or Multiple SQL Script file by invoking the
Export
Database option present at the top of every page, just below
the main tab. A Snapshot of the "Export Database" screen is shown below
:
To export a live SQL Server database the following details are to be provided:
The Export Database utility comes
with options to specify how the exported contents would be generated.
You can choose to export the entire database object definitions into a
single SQL Script file or choose to export the definitions into
Multiple SQL Script files.
When you choose to "Export the
objects to Multiple files", DBChangeManager creates one file per
database object and stores the corresponding Object definition. The
name of the file created will be the fully qualified name of the
Database Object. The files will be stored categorized in various
Folders named after the type of the Object (e.g. Tables, Functions,
Users etc.)
If you choose to "Export objects to a
Single file", the entire database object would be scripted into a
single SQL script file, with each object definition being seperated by
a GO statement.
Saving Exported Files in the Default Folder in DBChangeManager Server Machine:
When you choose the "Save in Default folder"
option the exported SQL Files will be written into the DBChangeManager
Server machine under a default folder, which is <product_home>/webapps/Exported_Databases/<host_name>/<database_name>/<time_stamp>",
where <time_stamp> is the
time at which the export was done. Also the SQL Files would be grouped
under different sub-folders based on the type of the object ie all
table related SQLs will be stored under 'Tables' folder etc., if you
export the database into Multiple files.
Note
that the "Save in Default folder" option would be enabled only when you
access DBChangeManager from the same machine as that of the server
machine.
Saving Exported files in a different location in DBChangeManager Server Machine:
If you
would like to store the
exported files in a different location in the server machine choose the
"Save in a Different Location" setting. This would Zip the generated
SQL file(s). If you had chosen to export the database as multiple SQL
files then, the files would be grouped under different folders based on
the type of the object and a zip file would be generated for you to
save in your own prefered location.
Note
that the "Save in a Different
Location" option will appear only when you access
DBChangeManager from the same machine as that of the server.
Saving in a Local Machine (not the
DBChangeManager server):
If you
are accessing DBChangeManager
from some other machine (not the DBChangeManager server) and would like
to store the exported SQL files in the local machine, you can do so by
choosing the "Save in Local File" setting (note: this option will
appear only when you connect to DBChangeManager from another machine,
not the DBChangeManager server).
Choosing
this option and exporting the
database will generate the SQL file(s) and zip it in the same folder structure as above (SQL
files grouped under different folders based on the type of the object)
and provide a file for you to save in your own location in the local
machine.
Once you provide the database connection details, and the options you can export the database by clicking on the 'Export' button at the bottom of the window. DBChangeManager will perform the following steps to export the database:
As mentioned earlier, the exported SQL Script files can be used as a source for schema comparison using DBChangeManager. SQL files can be compared with other SQL files or with a live database. Once compared, the exported files can also be Synchronized as per need
|