Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / C# / February 2008

Tip: Looking for answers? Try searching our database.

Database Schema

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
jack - 14 Feb 2008 18:01 GMT
Hi

In my project there's a frequent change in database schema of
production and testing due to the weekly production.

so this talks lot of effort to figure out which is the exact table
which we have made the change

so for the purpose i thought of making an small application which will
list me the tables or columns which are not in sync.

I tried some of the stuff but was not successful in it

i was able to get the database tables but executing the below query.

Select * from sysobjects
where xtype='u

But when i tried to get the column schema to compare it with the table
from another database table, i was unable to do so.

below is my unsuccessful query string which i executed in the
SQLCommand object

Select * from sys.all_columns where object_id= object_id('TableName')

Please help
Nicholas Paldino [.NET/C# MVP] - 14 Feb 2008 18:19 GMT
jack,

   Not that I would disuade you from trying to do it yourself, but have you
looked at any tools to do this?  There are some very good tools on the
market that can determine changes in schema, and it would probably save you
a lot of time coding this yourself.

   I like the tools from Red Gate in particular (this is the link to SQL
Compare):

http://www.red-gate.com/products/SQL_Compare/index.htm?gclid=CMWs0PujxJECFSBMGgo
dv3FSDQ


   Apex also makes a tool to do this:

http://www.apexsql.com/sql_tools_diff.asp

   And another one I found on Google:

http://www.sqlaccessories.com/SQL_Examiner/?src=google1_1&gclid=CLOJsIukxJECFReQ
GgodZVagCA


Signature

         - Nicholas Paldino [.NET/C# MVP]
         - mvp@spam.guard.caspershouse.com

> Hi
>
[quoted text clipped - 23 lines]
>
> Please help
Sualeh Fatehi - 15 Feb 2008 12:33 GMT
The free, open-source SchemaCrawler for SQL Server tool is desinged to
do just this. You can take human-readable snapshots of the schema and
data, for later comparison. Comparisons are done using a standard diff
tool such as WinMerge. 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.

SchemaCrawler is available at SourceForge:
http://schemacrawler.sourceforge.net/

Sualeh Fatehi
jack - 15 Feb 2008 22:06 GMT
Thanks for replying me.

have surfed on net and found some of the interesting tools like
tablediff.exe which is the standard tool of sql and can be used with
the command prompt arguments

but still not very straight forward way of getting all the table
difference in one shot.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.