Tuesday, March 20, 2012

Copying schema

Hi Everyone,
Using SQL 2000 or 2005 (I have both in my lab), how can I copy the schema?
I'm not trying to do a migration or anything, just need a copy of the schema
to compare it to the schema from another database, for a homegrown app
database our team is working on.
Thanks in advance!
If you want to compare schemas, there are a few tools that you can use that
work quite well. I have used Red Gate's Schema Compare many times and I
have found it helpful. I don't have direct experience with the other tools
in this list, but I know that they offer similar features to SQL Compare.
Red Gate has a tool called SQL Compare
http://www.red-gate.com/
Quest - Comparison Suite for SQL Server
http://www.quest.com/sql_server/
Innovartis DB Ghost
http://www.dbghost.com
WinSQL
http://synametrics.com/SynametricsWebApp/WinSQL.jsp
Database Workbench
www.upscene.com
If you want to script the schema you would do so (within SQL 2005) by
right-clicking on the database within SSMS's Object Explorer and choose
Tasks then Generate Scripts.
In SQL Server 2000 the steps are the same but the text on the right-click
menu is slighly different. It is All Tasks then Generate SQL Script.
Keith Kratochvil
"Samantha B." <nospam@.myisp.com> wrote in message
news:OrbxHHV8GHA.4552@.TK2MSFTNGP05.phx.gbl...
> Hi Everyone,
> Using SQL 2000 or 2005 (I have both in my lab), how can I copy the schema?
> I'm not trying to do a migration or anything, just need a copy of the
> schema to compare it to the schema from another database, for a homegrown
> app database our team is working on.
> Thanks in advance!
>
|||Samantha,
If all you are looking for is to compare a schema against a reference
schema, you can use the SchemaCrawler tool. SchemaCrawler outputs
details of your schema (tables, views, procedures, and more) in a
diff-able plain-text format (text, CSV, or XHTML). SchemaCrawler can
also output data (including CLOBs and BLOBs) in the same plain-text
formats. You can use a standard diff program to diff the current output
with a reference version of the output.
SchemaCrawler is free, open-source, cross-platform (operating system
and database) tool, written in Java, that is available at SourceForge:
http://schemacrawler.sourceforge.net/
You will need to provide a JDBC driver for your database. No other
third-party libraries are required. A lot of examples are available
with the download to help you get started.
Sualeh Fatehi.

No comments:

Post a Comment