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


Validating DB Schema


Validating DB Schema

Author
Message
Speedtest
Speedtest
Forum Newbie
Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)

Group: General Forum Members
Points: 7 Visits: 56
Hi , Im trying to validate if the db schema of about 3000 fields spread in about 15 tables matches the data dictionary(in excel) and also to keep a watch on it incase someone changes a column name or adds new column, i need to be alerted an hence would like to know if there is any easy way to validate it.Thanks for all the help
Sean Lange
Sean Lange
SSCoach
SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)

Group: General Forum Members
Points: 16632 Visits: 17024
Speedtest (5/22/2014)
Hi , Im trying to validate if the db schema of about 3000 fields spread in about 15 tables matches the data dictionary(in excel) and also to keep a watch on it incase someone changes a column name or adds new column, i need to be alerted an hence would like to know if there is any easy way to validate it.Thanks for all the help


Why do you have the data dictionary in Excel? You already have it defined exactly as sql server has it, right there in sql server. Trying to keep an external file up to date is going to be nearly impossible.

You might to take a look at DDL triggers. http://msdn.microsoft.com/en-us/library/ms175941.aspx

_______________________________________________________________

Need help? Help us help you.

Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

Need to split a string? Try Jeff Moden's splitter.

Cross Tabs and Pivots, Part 1 – Converting Rows to Columns
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs
Understanding and Using APPLY (Part 1)
Understanding and Using APPLY (Part 2)
Speedtest
Speedtest
Forum Newbie
Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)

Group: General Forum Members
Points: 7 Visits: 56
May be i wasnt clear in my question.....what i am trying to achieve is that when one developer makes changes to the tables, there got to be a way to check if its breaking another developers work...and hence i was thinking if we have some way to monitor the schema changes , then we can track and test such changes happening on db.....hope this helps
DouglasH
DouglasH
SSC-Enthusiastic
SSC-Enthusiastic (125 reputation)SSC-Enthusiastic (125 reputation)SSC-Enthusiastic (125 reputation)SSC-Enthusiastic (125 reputation)SSC-Enthusiastic (125 reputation)SSC-Enthusiastic (125 reputation)SSC-Enthusiastic (125 reputation)SSC-Enthusiastic (125 reputation)

Group: General Forum Members
Points: 125 Visits: 1469
Are your table scripts under source control? Most (all?) source control systems can be set to email certain people when file changes are checked in.
Do you have a formal development process which involves impact analysis and code review? Do you have a daily build or continuous integration process with smoke tests?

Do you create your test database from scratch as part of your build? If so, you could run a schema check script against the previous build.
Do you have coding standards that say 'Don't use select *'? Do you limit the use of nullable columns and force default values for new columns added?

There are lots of ways to catch what you want.



Speedtest
Speedtest
Forum Newbie
Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)

Group: General Forum Members
Points: 7 Visits: 56
Thank you so much for the reply. Apologies for still being unclear about the question raised by me , its a new job I started just few weeks back , and it looks like we are looking for automated unit tests to be carried out and its a continuos integfration with no smoke tests,Can you please guide me of what needs to be done to build some smoke tests for the datawarehouse in continuos integration ...are there any tools or any manual approach to do this.
DouglasH
DouglasH
SSC-Enthusiastic
SSC-Enthusiastic (125 reputation)SSC-Enthusiastic (125 reputation)SSC-Enthusiastic (125 reputation)SSC-Enthusiastic (125 reputation)SSC-Enthusiastic (125 reputation)SSC-Enthusiastic (125 reputation)SSC-Enthusiastic (125 reputation)SSC-Enthusiastic (125 reputation)

Group: General Forum Members
Points: 125 Visits: 1469
Ok, we are getting somewhere now. You have a data warehouse and it is running on data extracted from an OLTP database presumably.

Is your ETL process (extract,transform, load) process breaking because of schema changes in the OLTP database? Have you talked to the developers to make them aware that you need to know about schema changes? That's the easiest way to find out.

Do you have this on a development setup? Are the script changes stored in source control before being rolled out? What tools are you using? What's your development process?



Speedtest
Speedtest
Forum Newbie
Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)

Group: General Forum Members
Points: 7 Visits: 56
Thank you so much for your help. Sorry for the late response ......Yes all I managed to find now it that we are looking to automate unit tests in the BI more like a regression pack and still its all vague and will try to dig deep into what exactly is needed and will get back shortly...But thank you so much for your time and help.
MMartin1
MMartin1
Ten Centuries
Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)

Group: General Forum Members
Points: 1120 Visits: 2015
TFS has a schema compare feature, not sure if you use this source control program. I fished this out with a quick Internet search on applying the schema change function. http://msdn.microsoft.com/en-us/library/aa833435(v=vs.100).aspx. (TFS is integrated into Visual Studio).

----------------------------------------------------
How to post forum questions to get the best help
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