Is there an easy way to combine to SQL databases? Both DBs have the same structure but different data. If there just so happens to be duplicate records what will happen? Does anyone have any idea of where I should start at?
There are a number of ways to skin this cat and there are a number of issues to look out for. Don't use the copy database wizard, it's a real peice of crap and it requires all users to be logged out and all connections to be cut.
Personally I would go into the SQL EM, right click on your database, go to Generate SQL Script and I would script out the database and all objects. Then I would open up the generated file in the QA and change the database name and execute the script.
This is where things get a little sticky. You might have problems with duplicate primary keys because of your 2 sets of tables and any foriegn keys that these primararies populate. Your going to have to figure this one out and without knowing your DB I am going to leave this one to you. Other things you might want to disable or look out for before you move the data are constraints and triggers (especially triggers that insert or update other records).
Once you have all of these little things compensated for, I would then DTS all of the data over from the original 2 DBs.
As for dupes, welcome to the world of the DBA. Your just going to have to clean these up using queries. Regular part of the job.
SQL EM is the SQL Enterprise Manager. The QA is the query analyzer. Both of these and Books Online can be installed on your desktop using the installation disks. If you are this new, I would'nt attempt anything as complicated as this until you do a little reading. Buy a book. Take a class. Do something.
But if you insist on moving forward make backups of everything before you start thrashing around.
On your server, and maybe on your desktop you can find these tools by going to Start \ Programs \ Microsoft SQL Server.
I just jumped behind my SQL server ad generated a script off of one of the DBs. It of course created a .sql file which I can use to re-create the tables. So I need to do that for both. How do I get them in the same db...just change the name of the DB it creates and then run both scripts?
The objects are all the same structure, but the data if different for the most part. Some customers are in both databases because we employ a lot of jackasses...(excuse me)....nice people...who don't follow directions. There are two many dups to go in a manually delete all of them. Lucky for us the software we use has a utility to combine two records.
So I take the scripts I have and run them in the query analyzer...
And what do you mean there is no need to combine them?