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


ADVERTISEMENT

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

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

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 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

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

HowTo Compare Data From 2 Different Db-sources (xls,csv,sql Server, Mysql Server)?

Jan 28, 2008

Hello Guys,

I'm searching for a way to compare informations from one database against another database.

E.g. i want to check if serialnumbers of my first database (eg hardware.xls or hardware.csv ) are already stored in my sql server database.

I know i can use sql querys (Joins) for that task but i don't know how i can access 2 different databases at the same time. Do i need a tool for it? Does Excel is able to compare those data? But how? I'm searching for that thread since 2 days testing with some tools without any success...

So please help...

Kindly Regards...

Be

View 4 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

How Do I Compare Dates In Sql Server?

Jun 23, 2006

Hi,
I wanted to display the createDate provided by the asp membership table.
my where clause is this .. WHERE CreateDate = GetDate()
I have create an account today but when i run my select statement with this where clause, the result doesnt show up. It seem like they compare the time as well. How can i make the GetDate to compare only the dates but not the time?
 
 

View 1 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

How To Compare The Date In SQL Server 2000?

May 16, 2004

Hi all,
I have encountered a problem that I can't compare the date in SQL Server 2000.
But I know that maybe I have used "datetime" as data type for that field.
My question is that, how can I get ONLY the "date" in stead of "datetime" from the database?
Your attention is appreciated!
Thank you.

Regards,
katszeto

View 8 Replies View Related

Compare Data Between 2 Sql Server Databases

Nov 20, 2000

How can I create a database link so that I can check data between 2 similar
SQL Server 7 databases ?

View 1 Replies View Related

SQL Server 2012 :: Compare Two XML Variables?

Mar 19, 2015

I'm rewriting a huge FOR XML EXPLICIT procedure to use FOR XML PATH, and need to compare previous output to the refactored one, so i didn't mess up XML structure.

The thing is, i'm not sure that SQL Server will always generate exactly same xml **string**, so i'd rather not compare by:

WHERE CAST(@xml_old AS NVARCHAR(MAX)) = CAST(@xml_new AS NVARCHAR(MAX))

nor do i want to manually validate every node, since the generated xml-structure is quite complex.

compare xmls by their "semantic value" ?

View 8 Replies View Related

SQL Server 2008 :: How To Compare String

Jun 19, 2015

I need to compare to string in sql

requirement is

Select Reson_id from reason_data where reason='ryete / werewr ddsad '

is there any way without string function? bcz string function take more exaction time

View 9 Replies View Related

Transact SQL :: How To Compare More Than Two Dates In Server

Oct 10, 2015

I have three date columns startdate,enddate,rmd

I need to write a query like get all the rows by comparing rmd with system todaydate and these must be with in startdate and enddate

id startdate enddate rmd
1  10-oct-15   16-oct-15    11-oct-15
2   11-oct-15    14-oct-15     11-oct-15
3   09-oct-15     11-oct-15      10-oct-15
4   07-oct-15      08-ot-15        07-oct-15
5
if sysdate(today) is 11-oct-15 then i need to get all the rows of 1, 2,3

View 5 Replies View Related

Favorite Sql Server Db Compare/diff Tools

Dec 15, 2003

guys...do you have any recommendations for a tool that compares specific MS sql databases including data comparisons?

I typically develop locally, then deploy remotely.

it's getting to be quite a pain to not only remember which schema objects to update on the remote host, but the data elements that need to be keyed in as well.

are there any shareware tools out there you'd recommend? (I don't have a great budget as this is coming out of MY pocket and not my companies.)

THanks!

View 1 Replies View Related

Sql Server Express Cost, Compare Question

Jul 25, 2005

I am collecting cost and other information for my manager who is
willing to set up an "in house" web dev dept.  Will SQL server
express always be free?  What does it lack from the regular
version of SQL server? How would it compare with other DB's available
for web use. This isn't a retooled Access thing, is it?

View 2 Replies View Related







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