connect to MS SQL server and Sybase from linux freetds sqsh freebcp


  • sudo apt-get install freetds-dev sqsh freetds-bin
  •  cat /etc/freetds/freetds.conf
    •  [tds1]
      host = 10.21.1.1
      port = 1433
      tds version = 7.0
  •  sqsh -S tds1 -U id -P password -i foo.sql -o foo.out
  • freebcp (from freetds-bin package)
    • freebcp mydb.dbo.table out table.csv -U id -P pwd -S service_name_in_freetds_conf
Advertisements
This entry was posted in mssql, sqsh, sybase and tagged . Bookmark the permalink.

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