bulk copy data


the main goal of this blog is to focus on tools available for doing a bulk copy to a SQL server on windows.

Inserting sequentially –
Sqlcmd – it is a freat tol if you have the data on the machine hosting the SQL server. You can use it if you have the data on a network share but you run into issues with credentials.

BCP- It is a great tool but you need to understand the format files and the syntax of the command. Bcp is like a scripting language where the sepecial characters like “,”, “;” etc. are to be carefully monitored. Also, it is very fical when it comes to validity of source data. For eg: Data time format fields with hours or minutes or seconds not in the HH:MM:SS format will give you a lot of trouble. Missing leading 0’s can be cause of many an issue.

Debugging – Insert a field manually and get it using bcp out.

Advertisements

Tags:

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: