473,387 Members | 1,863 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Database Schema

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
Feb 14 '08 #1
2 3312
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...FSBMGgodv3FSDQ

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_Ex...FReQGgodZVagCA
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"jack" <ga**********@gmail.comwrote in message
news:c4**********************************@t16g2000 hsc.googlegroups.com...
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


Feb 14 '08 #2
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.
Feb 15 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Mike | last post by:
Hello, I'm trying to understand how to map hierarchical XML data to relational database tables, but I seem to be missing something. I'm not a database expert, but I know the basics. XML seems...
0
by: Pentti | last post by:
Can anyone help to understand why re-parsing occurs on a remote database (using database links), even though we are using a prepared statement on the local database: Scenario: ======== We...
19
by: Steve Jorgensen | last post by:
I've run across this issue several times of late, and I've never come up with a satisfactory answer to the best way to handle this schema issue. You have a large section of schema in which a...
4
by: Collin Peters | last post by:
I have searched the Internet... but haven't found much relating to this. I am wondering on what the best practices are for migrating a developmemnt database to a release database. Here is the...
29
by: MP | last post by:
Greets, context: vb6/ado/.mdb/jet 4.0 (no access)/sql beginning learner, first database, planning stages (I think the underlying question here is whether to normalize or not to normalize this...
10
by: shsandeep | last post by:
The ETL application loaded around 3000 rows in 14 seconds in a Development database while it took 2 hours to load in a UAT database. UAT db is partitioned. Dev db is not partitioned. the...
7
by: mkarbarz | last post by:
Hello, I need to come up with a stored procedure that will allow me to read data from another database. The database I need to read the data from is a UniData residing on a Unix server. The...
8
by: situ | last post by:
Hello all, i have Database1 and database2, is it possible to make database connection to database2 by running stored procedure on database1. Thanks and Regards Situ
12
by: nyathancha | last post by:
Hi, I have a question regarding best practices in database design. In a relational database, is it wise/necessary to sometimes create tables that are not related to other tables through a...
3
by: karanbikash | last post by:
Hi , I would like to know : 1.how to find all the schema in my DB2 database on Main frame machine . 2. How to see all the tables for a given schema . 3. What are the default schema in Db2 on...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.