Combine two databases
I have a requirement to combine two different databases in One. In fact, both databases exists in the same instance same server. There were two different applications using these DBs - for example, OrderingSystem was using Order DB and InvoicingSystem was using Invoice DB. Now the effort is to combine these two applications to one single application and so the requirement of combining the databases.
We are not worried about the performance or any negative things etc. The objective is to combine two databases without tampering the structure, keys, indexes etc etc.
Any idea is appreciated
Re: Combine two databases
First you have to create the new database and create the tables using the structure of one of your database (you can generate the script from Enterprise Manager). Then copy the records of all your records from one of your database to this new database. Then to copy the records from the other database, your INSERT query will look like the following:
INSERT INTO YourTable()
SQL Server Helper