Database Compare Utility

Jun 21, 2005

Can anyone recommend any utilities which compare 2 databases and report on the differences? A developer would like to compare the before/after images of a database once an upgrade has been applied.

He has looked at Red Gate ( http://www.red-gate.com/SQL_Data_Compare.htm ) and would like any recommendations about this product or any other.

Thanks.
Joseph

View 3 Replies


ADVERTISEMENT

The Database File May Be Corrupted. Run The Repair Utility To Check The Database File. [ Database Name = SDMMC Storage Cardwinp

Oct 9, 2007

yes,I have an error, like 'The database file may be corrupted. Run the repair utility to check the database file. [ Database name = SDMMC Storage Cardwinpos_2005WINPOS2005.sdf ]' .I develope a program for Pocket Pcs and this program's database sometimes corrupt.what can i do?please help me

View 4 Replies View Related

Utility To Document Database

Feb 27, 2008

Is there any utility that can document some sql server 2005 tables that I have in my database?I mean to add some description to column names so that I can know what they represent.Thank you!

View 3 Replies View Related

How To Display All The Database Using Osql Utility

Oct 13, 2006

I am using the osql utility to access my sql server express edition.

My problem is that i don't know how many database is in the sql server so can any teach me how to list out all the name of the database in the sql server using a sql statment?

Oh, and can anyone teach me how i can attach and detach a database in the sql server using sql statment.

Thanks for the help...

View 3 Replies View Related

Scptxfr.exe, Utility That Generate Database Structure

Jan 23, 2002

Hi All,
I am using scptxfr.exe to get the structure of a dababase. Problem is that its creating GRANT statements which I don't want. Also its selecting sysusers object. I have checked the parameters. My parameters look something like this:
dos promptmssql7upgradescptxfr.exe /S(servername) -d (databasename) /P sa /f (filename) -r

How can I run this utility without creating grant statements?
Any thoughts will help!
Thank you in advance!

View 1 Replies View Related

Import Wizard - Using Query For Remote Database To Compare Local Database

Apr 10, 2008

I am trying to use the Import Wizard to setup a daily job to import new records based on an ID field (PK). The source database is remote and a replica. I am inserting new records to update my table called the same thing. Both are SQL Native Client


Code Snippet
select *
from [CommWireless].[dbo].[iQclerk_SaleInvoicesAndProducts] as S1
join [IQ_REPLICA].[dbo].[iQclerk_SaleInvoicesAndProducts] as S2
on S1.SaleInvoiceID = S2.SaleInvoiceID
where S1.SaleInvoiceID > S2.SaleInvoiceID


When I parse the query, I keep getting an error message.

Deferred prepare could not be completed.
Statement(s) could not be prepared.
Invalid object name 'IQ_REPLICA.dbo.iQ_SaleInvoicesAndProducts'. (Microsoft SQL Native Client)

Anyone know an easy why to get this to work? Or should I add a create table to verify new records?

View 8 Replies View Related

Error 25115 Wrong Page (potential Database Corruption). Try Running The Repair Utility.

May 2, 2008



Hi,

Please Help, I am very desparate for a solution to this one.

I have an error appearing

"Error 25115 Wrong Page (potential database corruption). Try Running the Repair Utility."

I have SQL Server Enterprise set up with Merge replication, it is being used to Sync with Windows Mobile Devices as the subscribers.

All the Windows Mobile subscribers have been synchronising fine up until recently, when 1 of the Subscribing Windows Mobile devices received this error.
The day after, another device Synchronised fine the first time (note that the Synchronisation was a long one and the SDF grew in size dramatically while the synchronisation occured, but the Sync worked fine and the SDF dropped back to its initial size) The 2nd sync 5 mins later failed however so this Mobile device has the same error also.

Any suggestions as to the below are much appreciated

a) Why this error occurs?
b)How do you resolve this error?
c)What is the Repair utility mentioned in the error, and is it of use to me?


Thanks in advance, I am very greatful for any advice.

View 8 Replies View Related

How To Compare A Value In Database?

May 14, 2008

i am making a transaction function for my website, when people transfer an amount from account A to account B, it should check the amount if account A has enough money to transfer. here is my codes, should i add an if statement before the tra.update()? how to write this codes? SqlDataSource tra = new SqlDataSource();                tra.ConnectionString = ConfigurationManager.ConnectionStrings["shuliConnectionString"].ToString();                tra.UpdateCommand = "update account set balance=balance" + -Convert.ToDecimal(TextBox5.Text) + " where AccountNumber = '" + TextBox3.Text + "'";                tra.Update();                tra.UpdateCommand = "update account set balance=balance+" + Convert.ToDecimal(TextBox5.Text) + "where AccountNumber = '" + TextBox4.Text + "'";                tra.Update();                tra.InsertCommand = "insert into Transactions(TransactionType,AccountNumber,DestAccount,Amount,Comment,ModifyDate) values ('T','" + TextBox3.Text + "','" + TextBox4.Text + "','" + TextBox5.Text + "','" + TextBox2.Text + "','" + DateTime.Now.ToLocalTime() +"')";                int inertRowNum = tra.Insert();                Server.Transfer("deposit_withdraw_confirm.aspx");

View 5 Replies View Related

Sql Database Compare

Jul 19, 2006

what is the best tool to compare to sql database structure and if i want to do it programaticaly by c# and sql smo is there any sample in this project

View 2 Replies View Related

Database Compare

Dec 21, 2006

Language : VB.NET
Database : MSSQLserver2000
i have developed a tool to compare two databases, but it is taking long time to compare. First it will take the whole table into main memory(order by primary key). Same procedure for table2 of second database. Then it will start comparison by taking row by row. i tested with one third party tool, which is taking only 2 min to compare 800000 records of a table. My tool is taking 1 hour,40 mins to do that. Is there any other optimized method?

Regards,
Loka

View 13 Replies View Related

How To Compare Structure Of Two Database ?

Oct 3, 2006

I have one databaseand I create new database by copy everything from first db I then alter some column on new database and now I would like to compare two databaseHow can I do it ? 

View 4 Replies View Related

Compare 2 Database Schemas?

Nov 17, 2006

We're using Sql Server 2000. The one database contained tables and stored procedures which were possibly updated with some script information. Is there an application(commercial or free) or script I can use to compare the base database against this updated database to confirm there schema information is the same.

Thanks

View 1 Replies View Related

How To Compare Identity.name To Another Database

Jan 11, 2008

Here's my scenario.  I've got an web site that is going to allow access across two different domains.  So I pull out the user name and domain with a split.  At that point I want to say If user name = a value in bug_user table then redirect ~default.aspx Else redirect to other page.  I'm kind of stuck.  Here is what I got so far.   Imports System.DataImports System.Data.SqlClientPartial Class MasterPage    Inherits System.Web.UI.MasterPage    Sub page_load()        Dim user As System.Security.Principal.IPrincipal        user = System.Web.HttpContext.Current.User        Dim username As String        username = user.Identity.Name        Dim namer As String        Dim domain As String        Dim firstname As String        namer = username.Split("")(1)        domain = username.Split("")(0)        Dim objcon As ConnectionStringSettings = ConfigurationManager.ConnectionStrings("bug_trackerConnectionString")        Dim str As String = objcon.ConnectionString        Dim con As New SqlConnection(str)        Dim com As New SqlCommand("", con)??????????????????????????        con.Open()             com.commandText = "Select FirstName, LastName, Userid, Domain from bug_user"        con.Close()??????????????????????? Between the question marks is where i start to get lost.  I don't know how to look into the column Userid in the table bug_user table to see if my variable namer is present and I don't know where I should start my if statement.  Thank for your help.   

View 1 Replies View Related

Compare Inserted Value In Database ?

May 15, 2008

How could i compare value or string in my database with text in textbox1 before i inserted in the same database ?

View 5 Replies View Related

How To Compare Database Structures?

Jul 20, 2005

Let us suppose that I have two similar databases and need to create ansql-script upgrating one database structure to another. For example, thesedatabases are from different versions of some software, first is from earlyversion, next is from current, and second one contains several new tables,sevelal new fields in old tables, several new or changed stored procedures,UDFs and so on.How to solve this problem using standard tools?

View 6 Replies View Related

Compare Database Version

May 23, 2007

Greetings All,

I have a SQL Server 2005 DB that contains a version number that is specific to its schema. I have an SSIS package that performs an export/import of user data. I need to be able to compare the DB version number of both the target and the source database before the migrate operation can continue. Does anyone know if there is a Control Flow Task (or some other task) to do such a thing or will I need to write a custom Script Task?

Any help at all would be greatly appreciated.
Thanks!

View 12 Replies View Related

Want To Compare Webform Input To Database

Apr 9, 2008

 Hello, I am writing a website (in vb) to allow for room use reservations and I am looking for a way to compare the selected start and end times which are date-time format to records already in the database for that  day/time  and specific room.  If the selected time does not fall within an already reserved time frame I then want to insert it into the table.  I have already written a procedure to do the inserting and that works fine.  I just want to validate it before calling the insert.  Any ideas?  The fields to be validated on the form are textboxes containing date time which populate as read only after the time selection is chosen from dropdown. Thanks in advance It's greatly appreciated.

View 7 Replies View Related

Utlity To Compare Database On Different Server

Feb 28, 2000

We have three database server . Development, Test and Production. would appreciate if any body could receommend utilities/ways to compare apart from sqlcomp or ERWin

regards
rajeev

View 1 Replies View Related

SQL 2012 :: Compare Database Across Servers

May 28, 2014

I want to compare the database structures(columns,datatypes..etc) across same databases located in different servers.

View 9 Replies View Related

Database Compare Software Question

Jul 20, 2005

Hello. I have an information question. In my work I often have tocompare databases between releases in order to upgrade them to neededversion of software we developing.And I am looking for software that could do that. It doesn't have tobe free, but have to be good.I need to be able to compare table structures, amount of rows,procedures, triggers.I found one: Red Gate , but I am not sure that it is the best in themarket, and it is pretty expensive too.Any suggestions are appreciated.Thank you in advance.

View 3 Replies View Related

Transact SQL :: How To Compare Two Database Field

Sep 23, 2015

I have 2 database, databaseA and DatabaseB with same table structure.

I change lot of table structure in databaseB.

So i want compare what field that i add or delete in databaseB.

it's like what field there are in databaseB and not found in databaseA or nothing in databaseB but exist in databaseA.

How can i do that?

View 7 Replies View Related

Synchronize And Compare Two Database In Real Time

Sep 7, 2006

how to synchronize and compare two database in sql server 2000 without using any others software in real time.

my purpose is to check the two database in two different server if there has any different. And synchronize these two database continusly.

if one database had change, the other will also change

View 4 Replies View Related

Synchronize And Compare Two Database In Real Time

Sep 7, 2006

how to synchronize and compare two database in sql server 2000 without using any others software in real time.

my purpose is to check the two database in two different server if there has any different. And synchronize these two database continusly.

if one database had change, the other will also change

View 3 Replies View Related

Transact SQL :: Pull Dates From Database And Then Compare

Jun 10, 2015

I need to pull dates from a DB2 database via TSQL (Linked server - IBM DB2 for i IBMDASQL OLE DB Provider) and compare it to today for a less than or greater than type comparison.

Database: DB2, Customer information housed here
Columns:
UTOFMM - Month (2 character, numeric)
UTOFDD - Day (2 character, numeric)
UTOFYY - Year (2 character, numeric. Problem: years from 2000 to 2009 are stored as 0, 1, 2, ... etc)
UTOFCV - Century Value (2 char, numeric.  0 = before 2000, 1 = in or after 2000)

I need to concatenate the date to be "sql" friendly, and then compare to today's date.  It's to find any customer with date values in the fields above, and then differentiate between dates before today and after today.Here is the snippet of what I'm trying to fix.  This portion of a nightly job is just checking for <u>any</u> value in the UTOFMM column of the current record.

Add Customer ID
Update [responder].[Temp_RX_CUSTOMERS]
set CustomerID = lf.UTCSID
from [responder].[Temp_RX_CUSTOMERS] LEFT Outer Join
[HTEDTA].[THOR].[HTEDTA].UT210AP lf ON [responder].[Temp_RX_CUSTOMERS].LocationID = lf.UTLCID
where lf.UTOFMM = 0
GO

View 4 Replies View Related

Compare Column Names From Two Tables In Same Database

May 17, 2008

I'm not a full-time DBA, so excuse my style of expressing my question.I have a database which has 2 tables in SQL 2005. Both these tables have similar column names, EXCEPT for new extra columns in FY2007_DATA. I can visually see the difference in columns in Database Diagrams. My goal is to :- I want to compare FY2007 tbl column names to FY2006 column names and display only those columns as results that do not match.Tbl 1 :- FY2006_DATA Tbl 2:-



FY2007_DATA

With online reading and help I have managed to get this script to do exactly opposite of what i want. Below is the query

/* This query compares the column names from two tables and displays the ones that have an exact match. It does not care for case-sensitiveness */

Select a.Table_Name, a.Column_Name, (b.Table_Name), (b.column_name)
From [2006-2011].INFORMATION_SCHEMA.Columns AS a
Join [2006-2011].INFORMATION_SCHEMA.Columns AS b on a.Column_Name = b.Column_Name
Where a.TABLE_NAME = 'FY2006_DATA'
And b.TABLE_NAME = 'FY2007_DATA'
AND a.Column_Name IN
(Select Column_Name = LEFT(c.column_name, 20) FROM
[H1B_2006-2011].INFORMATION_SCHEMA.Columns AS c WHERE c.TABLE_NAME = 'FY2007_DATA' )


When I change "AND a.Column_Name IN.." to "AND a.Column_Name NOT IN.." so that the results will (should) display the extra columns in FY2007, in fact I do not see any results, but query executes perfect.

How can I achieve my goal.?

Thank you

View 1 Replies View Related

VS 2013 - Schema Compare Is Not Applying Changes To Target Database Project

Aug 11, 2015

I have created Database projects in VS 2013 using SSDT. I have been mostly successful in creating and building the projects without any errors/warnings.

However for one of the databases in the project, when i do schema compare to apply the changes from a SQL Server Database to a Database Project in VS, code changes are not applied to the database project.

After i select the Update option in Schema compare window, I'm getting the following message

"Target update complete. Press Compere to refresh the comparison."

Even tough the message implies that target database is updated successfully, I do not see the objects i selected in schema compare being added to the target database project.

I see the following warning

"Target update: Could not update script for element 'dbo'"

I have 9 Database projects in the Solution and I'm able to apply changes to 8 of the database projects through schema compare successfully. I get the same warning after schema compare for all database projects.

I have same project level setting for all database projects in the solution. I'm using Visual Studio 2013 Premium Update 5 SQL Server Data Tools 12.0.41012.0

View 3 Replies View Related

SQL 2012 :: Database Project Schema Compare Fails To Pull In CDC Tables

Jul 11, 2014

I have a database project where objects have been pulled in from the database using schema compare.

Unfortunately CDC tables which are referenced in stored procedures on the database have not been pulled in by the schema compare & hence I cannot build the project and deploy changes back to the database.

How to get these tables included in the project .

View 1 Replies View Related

Compare And Update A Table From One Database To Another Table On Another Database

Jul 17, 2007

Hi everybody.. need help on this situation which i am to.

I have two databases named db1 and db2
both of which has two identical tables named tbl1 and tbl2

I need to compare tbl1 of db1 to the tbl2 of db2
if there is a record that is existing on tbl1 and not on the tbl2 then
i need to create a tblnew on db2
from that tblnew then i need to append all the data from tblnew to tbl2 of db2.

I don't know how to start with it because i'm used to appending data on two tables on the same database but not on a different one...

thanks
alex

View 3 Replies View Related

When Have 4 Tables How To Compare Table With 4nd Table? ( Need To Join And Compare With Datatime)

Jul 22, 2007

Table MediaImportLog
column ↘ImportIndex     ImportFileTime            ImportSource
value    ↘80507             20060506001100          815
              80511             20061109120011           CRD                       ã€? P.S the values type of ImportFileTime 20060506001100 → 2006 -year 05-month 06-day 00-HH 11-minute 00-second】
Table  BillerChain
column↘BillerInfoCode       ChainCode
value   ↘750                      815
value   ↘81162                  CRD
Table   Biller
column↘CompanyCode         BillerCode
value   ↘999                     750
value   ↘81162                  516
TAble DataBackup
column↘CompanyCode         Keepmonth
value   ↘999                     6
value   ↘81162                 12
 
---------------------------------------------------
 
when I'm in MediaImportLog , I want use column ImportSource to compare with column ChainCode in table BillerChain ( so I get BillerInfoCode) and then use the BillerInfoCode I got to compare with column BillerCode in Table Bill ( I get CompanyCode) finally I use CompanyCode to compare with column CompanyCode in table DataBackup so I can get the company's keepmonth
How can I get the keepmonth? can I use parameters ? 
 
thank you very much 

View 3 Replies View Related

Compare Incoming Input File Row Values With Database Row Values In SSIS

Jan 23, 2008

Hi All,

I receive the input file with some 100 columns and some 20k+ rows and I want to check the incoming input row is existed in the database or not based on 2 key columns. If the row is existed then I need to check all the columns (nearly 100 columns) values in input and the database are equal or not. If both are equal I need to treat them seperately if not there is a seperate logic. How Can I do that check for each row and for each column?

Basically the algorithm is like this, if the input file row is not existed in the database then treat that as new row else if the input row is existed in the database then check all the columns are equal or not. If all the columns are equal then treat that as existing row and do nothing else if some columns are not equal then treat this row seperately.

I found some thing to achieve the above thing.
1. Take the input row and check in the database.
2. If the row is not found in the database then treat it as new row.
3. If row is found in the database then
a) Take the source row and prepare a concatenated string for all the columns
b) Take the database row and prepare a concatenated string for all the columns
c) Find out the hash code for the 2 strings and then compare hash codes for equal.

The disadvantage of this is running a loop 2*m*n times where m is the number of rows and n is the number of columns. It should be done 2 times for input file row and database row.

Can anybody suggest a good method to do this?

What does the function "GetHashCode" for InputBuffer in method "Public Overrides Sub Input0_ProcessInputRow(ByVal Row As Input0Buffer)" will do?
Will it generates hash code based on all the columns values?

Pls clarify.

Regards
Venkat.

View 1 Replies View Related

BCP Utility .

Aug 6, 2002

Hello ,

I want to know how can i can use the bcp coomand to import a text file into a SQL database table . The text file contains info. like servername , date , time , logininfo and description .

The problem is i cannot import that file into the table through data import wizard . The wizard is not able to separate the fields properly and the import takes place with mixed up data in different columns . The separator in the text file is colon . I even tried fixed length with manual column separation .
The text in the text file are not aligned properly as these are log files generated by the system which i am trying to import in a table .

So how can use the bcp command to specify the column length properly and seperate the fields uniformly so that the data gets imported neatly .

Any thoughts how could the command look like ?

Thank you very much .
Anita.

View 1 Replies View Related

Bcp Utility

Aug 2, 2001

Hi,
I used bcp utility to import and export data between databases. These exported data is it read only? If so how can I change the parameter so that we could edit as well.
Any suggestions will be helpful. Thank you!

View 1 Replies View Related

Bcp Utility

Oct 8, 2002

I'm trying to use the bcp command to bcp out a single table in a database, what is the best way to do this in the query analyzer? Thanks in advance.

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved