khal
asked on
loading data to a SQL server
I have created a database and its devices in the SQL server, I need to populate data into this server. I have this data in a file at a different server, how can I transfer this data (just the data) into my database.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
If you want the simpliest soluution, use Access, but using ODBC to load huge amount of data could take hours. If you need performance,you should use SQL Server own facility, which will be several times faster. Difference can be more then 10 times.
If you want I can send you a BCP program that we have written to transfer data directly from one Sybase/MS SQL Server to another Sybase/MS SQL Server. It is much faster than having to BCP out to a file then BCP back in from a file. We usually build a batch file to call this EXE for each table by selecting all the tables in sysobjects.
ASKER
I am using Transact SQL, does your BCP program support that? if yes please send me this program, I would like to have it, thanks.
BCP is installed with SQL Server.
It does come with SQL Server, but you must BCP out to a file then in from a file. My program BCPs from server to server, no file involved, cutting the time in half. You can also specify the actual select statement from the source server so you can change the order of columns or actually BCP a subset of columns from one table into another table. Quite helpfull for removing a column from a table, and quickly moving the data. I am making some minor changes to the program right now, but I will try to e-mail it out in the next few days.
ASKER