Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Schema validation


Schema validation

Author
Message
Dustin W. Jones
Dustin W. Jones
SSC-Enthusiastic
SSC-Enthusiastic (147 reputation)SSC-Enthusiastic (147 reputation)SSC-Enthusiastic (147 reputation)SSC-Enthusiastic (147 reputation)SSC-Enthusiastic (147 reputation)SSC-Enthusiastic (147 reputation)SSC-Enthusiastic (147 reputation)SSC-Enthusiastic (147 reputation)

Group: General Forum Members
Points: 147 Visits: 548
Our company has over 5000 sql server instances spread out over the country. The servers are connected to our corporate central data center via a high latency satelite connection. I'm looking for a way to export a our applications schema (tables,constraints,data types..etc) to some type of flat file result (xml,text,....etc) that can be easily transmitted via our network to a central server, imported in to a database, and compared against a "golden" copy of the application database schema. Anybody have any advice or scripts that will export a database schema to a flat file? Thanks

Dustin W. Jones - Database Tech.
Henry Treftz
Henry Treftz
SSC Veteran
SSC Veteran (217 reputation)SSC Veteran (217 reputation)SSC Veteran (217 reputation)SSC Veteran (217 reputation)SSC Veteran (217 reputation)SSC Veteran (217 reputation)SSC Veteran (217 reputation)SSC Veteran (217 reputation)

Group: General Forum Members
Points: 217 Visits: 365
Do you want to do the compare inside or outside of SQL Server? That is do you want a file you would import into the remote SQL server (perhaps as a new DB) and do the compare within SQL Server or do you want to export the local information to a flat file and do a flat file compare?

Also what is the amount of data (not schema) that you need to compare (in the KB, MB or GB?)?

You might want to take a look at SQL Compare from Red Gate
Dustin W. Jones
Dustin W. Jones
SSC-Enthusiastic
SSC-Enthusiastic (147 reputation)SSC-Enthusiastic (147 reputation)SSC-Enthusiastic (147 reputation)SSC-Enthusiastic (147 reputation)SSC-Enthusiastic (147 reputation)SSC-Enthusiastic (147 reputation)SSC-Enthusiastic (147 reputation)SSC-Enthusiastic (147 reputation)

Group: General Forum Members
Points: 147 Visits: 548
Do you want to do the compare inside or outside of SQL Server?
That is do you want a file you would import into the remote SQL server (perhaps as a new DB) and do the compare within SQL Server or do you want to export the local information to a flat file and do a flat file compare?

I suppose either way would work. I would like to export the schema from the remote servers to a flat file to the local file system. I could then write a process that resides on the Central master server to collect these flat files from each remote server, import them into a table on the central master server, and then then compare the schema against a master "golden copy". There is no need to compare data, just schema.

I do not think SQL compare will work for us.

Dustin W. Jones - Database Tech.
Henry Treftz
Henry Treftz
SSC Veteran
SSC Veteran (217 reputation)SSC Veteran (217 reputation)SSC Veteran (217 reputation)SSC Veteran (217 reputation)SSC Veteran (217 reputation)SSC Veteran (217 reputation)SSC Veteran (217 reputation)SSC Veteran (217 reputation)

Group: General Forum Members
Points: 217 Visits: 365
Well then you could look at doing a select on sysobjects, sysindexes and syscolumns that saves those results to a flat file and then compare that to your 'master copy' of each of those files.
Dustin W. Jones
Dustin W. Jones
SSC-Enthusiastic
SSC-Enthusiastic (147 reputation)SSC-Enthusiastic (147 reputation)SSC-Enthusiastic (147 reputation)SSC-Enthusiastic (147 reputation)SSC-Enthusiastic (147 reputation)SSC-Enthusiastic (147 reputation)SSC-Enthusiastic (147 reputation)SSC-Enthusiastic (147 reputation)

Group: General Forum Members
Points: 147 Visits: 548
I was thinking about something along those lines, I guess I was hoping somebody already had something they would could share that I could use a starting point or maybe not reinvent something somebody else already invented.

Dustin W. Jones - Database Tech.
nekonecny
nekonecny
Valued Member
Valued Member (58 reputation)Valued Member (58 reputation)Valued Member (58 reputation)Valued Member (58 reputation)Valued Member (58 reputation)Valued Member (58 reputation)Valued Member (58 reputation)Valued Member (58 reputation)

Group: General Forum Members
Points: 58 Visits: 493
And what about try "Transfer database task" in SQL Server integration services to import remote databases and then you can do some comparations?
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search