views:

323

answers:

4

Hello guys,

Here's my problem: I have a website that uses two different nonidentical sql server databases: one that is used to store information about the website users, the other stores information about my online retail store. But my hosting plan would only let me deploy a single database. Hence I want to combine my two databases, to form a single database.

Is there an easy way to combine the two databases into one, instead of creating every single table separately? The two databases do not share any data/columns/tables in common.

Can someone plz let me know how to get through this? I would really appreciate any help.

Thanks!

A: 

This link might provide some help: http://www.daniweb.com/forums/thread113335.html

Robert Harvey
There are lots of matches for this Google search: copy tables from one sql server to another. If the link I provided doesn't help, one of the other Google matches should.
Robert Harvey
A: 

If tables is all you want to move around, I suggest you use the Import and Export Data tool to import all the tables of database A into database B.

If you have views, SPs, etc. I suggest you generate scripts for all of them and run them scripts on the destination database once you have transferred the tables.

CesarGon
A: 

Use the Import Data tool to move the one database's tables and data from the second database into the first one.

thaBadDawg
+1  A: 

You can script the objects and import the data, ensuring that any dependencies are created in the right order.

If you need to maintain any sort of logical separation, you can also use SCHEMAs within the database (starting with SQL Server 2005) to organize them into two distinct areas - this would most likely require an application change, however.

Cade Roux