Page 1 of 1

Unix Script to Connect to SQL Server

Posted: Mon May 01, 2017 2:22 pm
by Naren12345babu
Hi All,

Any idea how to write a script to connect to SQL server from unix?

thanks
Naren

Posted: Mon May 01, 2017 3:50 pm
by PaulVL
So you have this big expensive tool that prides itself on connecting to various database platforms... why not use it?

Posted: Tue May 02, 2017 12:35 am
by Naren12345babu
Hi

I have to insert XML content present in a file into an XML column in SQL server table. through datastage, I am not able to insert complete XML into single column.
SO , I want to use a Bulk insert command in Unix SQL script and insert this data.

Any help is much appreciated.

thanks
Naren

Posted: Tue May 02, 2017 7:12 am
by chulett

Posted: Tue May 02, 2017 1:42 pm
by Naren12345babu
Hi Chulette, the post was posted by me only, I am trying to find a way to load xml data into a single column., I am exploring a way thorugh datastage and another way through unix.

do you know how to write a unix script I have to write to connect to SQL Seerver table

Posted: Tue May 02, 2017 5:11 pm
by chulett
I know that, was just linking the two posts in case anyone cared.

And while I've written many a UNIX script, they've never involved loading anything to SQL Server.

Posted: Wed May 03, 2017 8:19 am
by FranklinE
My experience with SQL Server is limited, so you'll need to research or find someone better at this to help.

The first design choice is usually a stored procedure. Every DBMS has an API for command lines -- it should be noted that DataStage connectors build those command lines for us -- and building a script around those command lines is easy to look at if difficult to get right.