Skip to content

Executing MS SQL store procedures from Solaris 10 using freeTDS

March 12, 2012

Introduction

ThIs post describes how to execute MS SQL store procedures from Solaris 10 using freeTDS.

Configuration

The procedure here described has been tested using the following environment:

  • SQL Server 9.00.3054.00 – SP2 (Standard Edition) running on Windows 2003 server SP2 using mixed authentication mode.
  • Solaris 10 on Sun Sparc x64 architecture.
  • FreeTDS ver. 0.64 for Solaris 10 Sparc 64X
  • A SQL server user account with limited access to execute the store procedure
  • Bsqldb tool provided with freeTDS.

Steps

1. On the Solaris machine, write the following script and saved in the file callmysp.sql:

use [testDB]
go
set ANSI_NULLS ON
set ANSI_WARNINGS ON
go
exec mysp.sql
go
set ANSI_NULLS OFF
set ANSI_WARNINGS OFF

2. Execute the following command line

/usr/local/bin/bsqldb -S testDB -U myuser -P mypwd -i /usr/test/scripts/callmysp.sql

Advertisements

From → MSSQL

Leave a Comment

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: