Monday, March 19, 2012

Oracle/Unix Environments --> SQL Server 2005/Windows 2003 Server

I was a Oracle Developer / DBA on Unix Environments all along my career, Very recently iam starting to manage a SQL Server 2005/Windows 2003 Server setup.

Part of my new job is to automate to load Huge Data files/Flat Files (3/4 GB in size) into SQL Server 2005 DB.

Have these initial questions..
Since the files are too large to open at once... What sort of Command Line Interfaces people use on the Windows Boxes.. like doing a "wc" (Word Count) / GREP 'ng Files / Massaging Data Files one line at a time (Like using SED / AWK Commands).. Etc

Any Input / Direction is appreciated...

The data load took for SQL Server is called BCP. It's a command line tool.

The typical practice would be to load all the data into a holding table, then massage it within SQL with T/SQL code.

When working with data inside of SQL Server don't forget that SQL Server doesn't like cursors like Oracle does. Do as much as possible with SET based commands.

|||Thanks for your response..

We are using SSIS as our Data Loading Tool for now..
However, if you were to look at the last record in a HUGE data file.. How do you do that in Windows Environment.

Something like.. In Unix..
tail 100 datafile.dat
head 200 datafile.dat
grep "findstring" datafile.dat

How are the above functionalities achieved in a Windows DB Environment in general?
|||

Something like.. In Unix..
tail 100 datafile.dat
head 200 datafile.dat
grep "findstring" datafile.dat

How are the above functionalities achieved in a Windows DB Environment in general?

I google for tail.exe head.exe and grep.exe and do it in the same method. The nice folks at unxutils.sourceforge.net have ported all your favorite unix utilities to DOS commands so that you can use them in Windows. We do like to try to make the transition from Unix to windows as painless as possible.

No comments:

Post a Comment