How to merge two database schemes using toad - sql-server

I use toad for sql server to compare databases.
Is it possible to merge results between 2 database schema changes?

TOAD for SQL Server (6.1 +) has a neat compare Schema tool, which allows you to compare two databases. It also comes with a wizard that will allow you control how to merge the objects from one database to another.
Without more information about your current setup and what sorts of objects you're trying to merge, there is not much I can do to help you.

Related

How can I compare the schema of objects in SQL server that belong to two different schemas?

I have a table under dbo and an almost identical table under a schema called tmp. Visual Studio Schema Compare does not appear to let me select one set of dbo-based objects and compare them with a similar set of tmp-based objects.
The database server is locked down and it is not possible to create a second database. Also, SQL server is unusable on a local dev machine due to resource constraints. The tmp schema would allow me to make changes to tmp, then compare and push those changes to the dev schema of "dbo".
What's the best way to compare these two sets of objects?
You can compare your objects with different schemas with ApexSQL Diff and it has free Community edition.
By creating custom schema mapping, you’ll be able to match objects with different schemas compare them and synchronize if needed.
If you just want to compare objects to see differences and create a merge script, you can check out a free tool - ApexSQL Compare.
Since RedGate tool is already mentioned, one more tool that can help you out is dbForge Schema Compare.
Two methods come to mind. Try redgates sql-compare tool, worth its weight in gold imo.
Another option would be to use the 'generate scripts' functionality of ssms and then use the diff tool of your choice to compare the resultant sql text files.

How to use SSDT to compare database with different default schema

I have two database that belongs to two different SQL Server. Their database schema should be very similar but somehow different application generate different 'default schema' on the tables and views. Now when I am trying to compare the schema by using SSDT, I don't know how to ignore this default schema (I found it has a setting but it didn't value, same result showing as treating them as different set of objects).
e.g. Database A vs Database B
[dbuser].[TableA] vs [dbo].[TableA]
SSDT claims they are different..... :S
Please give me some advice... I expect I don't have to hack the database in order to achieve the comparison....
Save yourself the headache get sql-compare from redgate. You shoukd be able to get a trial and test your scenaior. This tool plus their SQL toolbelt is a must for anyone dealing with multiple sql servers. http://www.red-gate.com/products/sql-development/sql-compare/

How do you pull data from SQL Server to Oracle?

I'm wanting to take data from a SQL Server table and populate a Oracle table. Right now, my solution is to dump the data into a Excel table, write a macro to create a sql file that I can load into Oracle. The problem with this is I want to automate this process and I'm not sure I can automate this.
Is there an easy way to automate populating a Oracle table with data from a SQL Server table?
Thanks in advance
I suppose it depends on your definition of "easy".
The most robust approach would be to either use heterogeneous connectivity in Oracle to create a database link to the SQL Server database and then pull the data from SQL Server or to create a linked server in SQL Server that connects to Oracle and then push the data from SQL Server to Oracle.
Yes. Take a look at MS SQL's SSIS which stands for SQL Server Integration Services. SSIS allows all sorts of advanced capabilities, including automated with Sql Server Jobs, for moving data between disparate data sources. In your case, connecting to Oracle can be achieved a variety of ways.
There are three ways to automate this:
1) You can do as Paul suggested and created an SSIS package that will do this and it can be scheduled via SQL Agent,
2) If you don't want to deal with SSIS, you can download the free SQL# (SQLsharp) CLR Library from http://www.SQLsharp.com/ and use the DB_BulkCopy Stored Procedure to do this in a T-SQL Stored Proc which can also be scheduled via SQL Agent. [note: I am the author of SQL#]
3) You can also set up a Linked Server from SQL Server to Oracle, but this has the draw-back of being a potential security hole. Of course, you could use an Oracle Login that only has write-access to that single table (or something similar to that).
There are lots and lots of ways to do it. Which you choose depends on your requirements.
Using Excel is fine if it's a one time thing.
If it's a once-in-a-while thing, then you could write a simple .NET app that uses a single DataSet and multiple DataAdapters to do the data dump. C# code example here.
if it's a regular thing, then you could put the above in a Schtasks task, or you could use SSIS. I think SSIS is an extra-cost option.
if the requirement is for "online access", then a linked database is probably appropriate.

How do I migrate table schemas from one DB to another without damaging the data in the destination DB?

How do I migrate table schemas from one DB to another without damaging the data in the destination DB?
I want to move my data from my deployed development copy to the live database and would like to run some scripts to do it. I need to upgrade the schema for some tables and create others. I figure right now that I'll have to check each of the tables in the destination DB against the deployment one and then copy the new tables but that will be quite tedious. Are there any suggestions on how I can do this?
Check out SQL Compare tool by Redgate
http://www.red-gate.com/products/SQL_Compare/index.htm
You should be able to compare both the databases and then generate scripts based on the differences.
You can use a tool to generate the scripts. Redbrick has one, and Erwin can do deltas as well.
Another one besides the excellent Red-Gate SQL Compare is ApexSQL's SQL Diff.
ApexSQL also has a SQL Data Diff if you also need to compare and synchronize data from various sources.
Highly recommended!
Marc
In addition to the RedGate software mentioned above, Embarcadero Change Manager can do both schema and data instance compares, then generate alter scripts for the schemas and DML scripts for the data to bring two database in sync.

Create & Copy Access tables to SQL via SSIS? SQL 2008

I am trying come up with a way to pull the tables out of an Access database, automate the creation of those same tables in a SQL 2008 DB, and move the data to the new tables. This process will happen on a regular basis and there may be different tables each time.
I would like to do this totally in SSIS.
C# SQL CLR objects are an option.
The main issue I have been running into is how to get the Access table's schema and then convert that to a SQL script that I can run via SSIS.
Any ideas?
TIA
J
SSIS cannot adapt to new tables at runtime. (You can change connections, move a source to a table with a different name, but the same schema) So, it's not really easy to do what I think you are saying: Upsize an arbitrary set of tables in an Access DB to SQL (mirroring their structure and data, naming, etc), so that I can then write some straight SQL to transform the data into another SQL database or the same part of the database.
You can access the SSIS object model from C# and build a package (or modify a template package) programmatically and then execute it. This might offer the best bang for your buck, but the SSIS object model is kind of deep. The SSIS Team blog have finally started putting up examples (a year after I had to figure a lot of this out for myself)
There is always the upsizing wizard, and I'm sure there are some third party tools.

Resources