How can i copy Tables from mssql server from my computer to oder /from my server to oder/. The Data Bases are ready created i must put only the Tables to oder DB. Please can you tell me how?

Recommended Answers

All 5 Replies

Member Avatar for Geek-Master

I am assuming that both databases are on the same SQL Server instance. If you want to transfer a table between databases, try using DTS if you are on SQL 2000. There should be a method for transferring database objects. I won't explain how to use DTS so you will have to go to Microsoft's website or Books Online.

Another method is to manually create a T-SQL script of the table structure. Run it against the other database and perform an insert command with the values being pulled in by a sub query.

INSERT INTO <databaseB>..<tableA>
(
    SELECT * FROM <databaseA>..<tableA>
)

Make sure to replace the examples <...> with the actual DB objects. Also for this script to work, both tables must have the exact table structure.

I woudn't recommend using the SELECT INTO method which will create a table and SQL will guess what the data types are and you will have to manually add the constraints back.

The databases are on two different computers

Member Avatar for Geek-Master

Well it really doesn't matter if the two databases are on different servers. All that you need to know is that you must have access to both servers. Then use DTS to copy the table object over.

good luck

If its in the other server or system. You can link the server to your Server name and use the commands that geek master suggested.

Thanks very much! It is all right

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.