Solved

loading data to a SQL server

Posted on 1998-07-02
7
258 Views
Last Modified: 2010-03-19
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.
0
Comment
Question by:khal
  • 2
  • 2
  • 2
  • +1
7 Comments
 

Accepted Solution

by:
peterprice earned 40 total points
ID: 1091646
Use a piece of software such as access/vb3 that can access the remote database via either ODBC through its own SQL or by sending natively. then use the software to read the flat file (I assume that is what you mean) and issue inserts to the database.
0
 

Author Comment

by:khal
ID: 1091647
could you explain more please? and is the insert command going to be implemented on each table !!(I have a huge database)
0
 
LVL 7

Expert Comment

by:spiridonov
ID: 1091648
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.
0
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 
LVL 1

Expert Comment

by:jboyd
ID: 1091649
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.
0
 

Author Comment

by:khal
ID: 1091650
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.
0
 
LVL 7

Expert Comment

by:spiridonov
ID: 1091651
BCP is installed with  SQL Server.
0
 
LVL 1

Expert Comment

by:jboyd
ID: 1091652
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.
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Having an SQL database can be a big investment for a small company. Hardware, setup and of course, the price of software all add up to a big bill that some companies may not be able to absorb.  Luckily, there is a free version SQL Express, but does …
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.
Via a live example, show how to shrink a transaction log file down to a reasonable size.

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now