---
author:
  email: rkitover@io.com
  keyid: ecfd90663e4a2921
  name: Rafael Kitover
categories: []
date: 2010-02-03T01:20:44Z
guid: 9400932A-1062-11DF-B0D5-590369D39F9F
modified: 2010-02-15T10:59:25Z
raw: "-----BEGIN PGP SIGNED MESSAGE-----\nHash: SHA1\n\n=pod\n\nI will briefly discuss
  setting up the development version of Sybase SQL Anywhere\n(ASA) on linux (or similar)
  and using it with Perl.\n\nYou can download it from:\n\nL<http://www.sybase.com/detail?id=1016644>\n\nGo
  through the install process, and make a separate user for it (e.g.\nC<sybase-asa>).\n\nIn
  the C<.bashrc> for the user, add:\n\n  lang:bash\n  . /opt/sqlanywhere11/bin32/sa_config.sh
  \n\nChange to that user, and now lets create a database:\n\n  lang:bash\n  mkdir
  logs\n  dbinit -t ./logs/hlaghdb.log -p 4096 -dba DBA,SQL hlaghdb.db\n\nThis sets
  the username to C<DBA> and the password to C<SQL>.\n\nLet's make an init script.
  Note that you should not install the init script to\nrun automatically because of
  the obnoxious agree to license prompt on startup,\nuse it as just a utility for
  starting the database. Edit the part at the top.\n\n  lang:bash\n  #!/bin/sh\n  #\n
  \ # Startup script for Sybase SQL Anywhere\n  # \n  # description: Sybase SQL Anywhere
  RDBMS System\n  # processname: dbsrv11\n\n  ASA_USER=sybase-asa\n  ASA_BIN=/opt/sqlanywhere11/bin32/\n
  \ DB_FILE=hlaghdb.db\n  SRV_NAME=ASA\n\n  # Find the name of the script\n  NAME=`basename
  $0`\n\n  # For SELinux we need to use 'runuser' not 'su'\n  if [ -x /sbin/runuser
  ]\n  then\n          SU=runuser\n  else\n          SU=su\n  fi\n\n  # Find home\n
  \ ASA_HOME=`$SU $ASA_USER -c 'echo \\$HOME'`\n\n  start() {\n      ASA_START=$\"Starting
  ${NAME} service: \"\n\n      $SU $ASA_USER -c \". $ASA_BIN/sa_config.sh; $ASA_BIN/dbsrv11
  -ud -n $SRV_NAME $ASA_HOME/$DB_FILE\"\n\n      ret=$? \n      if [ $ret -eq 0 ]\n
  \     then\n              echo \"$ASA_START Success.\"\n      else\n              echo
  \"$ASA_START Failed!\"\n              exit 1\n      fi\n      echo\n  }\n\n  stop()
  {\n      echo -n $\"Stopping ${NAME} service: \"\n\n      pkill dbsrv11\n\n      ret=$?\n
  \     if [ $ret -eq 0 ]\n      then\n              echo \"Success.\"\n      else\n
  \             echo \"Failed!\"\n              exit 1\n      fi\n      echo\n  }\n\n
  \ restart() {\n      stop\n      start\n  }\n\n  case \"$1\" in\n      start)\n
  \         start\n          ;;\n      stop)\n          stop\n          ;;\n      restart)\n
  \         restart\n          ;;\n      *)\n          echo $\"Usage: $0 {start|stop|restart}\"\n
  \         exit 1\n  esac\n  exit 0\n\nSQL Anywhere comes with a GUI and a Curses
  SQL shell, named C<dbisql> and\nC<dbisqlc> respectively.\n\nSince it uses the TDS
  protocol, you can also use the ASE C<isql> with C<rlwrap>\nor the freely available
  C<sqsh> utility.\n\nTo use C<sqsh>, first set the SYBASE environment variable to
  some directory, for\nexample C<$HOME/sybase>. In that directory make a file called
  C<interfaces> that\ncontains the following:\n\n  ASA\n          master tcp ether
  localhost 2638\n          query tcp ether localhost 2638\n\nThen to connect use:\n\n
  \ sqsh -S ASA -D hlaghdb -U DBA -P SQL\n\nstatements are executed by typing C<go>
  on a new line. To quit type C<quit> on a\nnew line.\n\nTo make a non-DBA user, use
  the following commands in a SQL shell:\n\n  grant connect to hlagh identified by
  dongs\n  grant resource to hlagh\n\nNow install the C<DBD::SQLAnywhere> perl driver.\n\nSource
  the C<sa_config.sh> and make a copy of the C</opt/sqlanywhere11/sdk/perl>\ndirectory.
  Change to the directory and:\n\n  lang:bash\n  perl Makefile.PL\n  make\n  sudo
  make install\n\nDo not use the C<DBD::SQLAnywhere> on CPAN, it is outdated and doesn't
  work.\n\nAdd C</opt/sqlanywhere11/lib32> to your C<LD_LIBRARY_PATH>, and try connecting\nfrom
  DBI:\n\n  lang:bash\n  perl -MDBI -le 'my $dbh = DBI->connect(\n    \"dbi:SQLAnywhere:ASA\",
  \"DBA\", \"SQL\"); \\\n    print for $dbh->selectrow_array(\"select 42\")'\n\nC<DBIx::Class>
  support for both the DBD and via DBD::ODBC is available in the\ncurrent version.\n\nC<DBIx::Class::Schema::Loader>
  support is available as of version C<0.05002>.\n\nTo use with unixODBC, add the
  following to C</etc/odbcinst.ini>:\n\n  lang:ini\n  [SybASA]\n  Description = Sybase
  SQL Anywhere\n  Driver = /opt/sqlanywhere11/lib32/libdbodbc11.so\n  Setup = /opt/sqlanywhere11/lib32/libdbodbc11.so\n
  \ FileUsage = 1\n\nThere are also C<_r> versions of the drivers in that directory,
  these are the\nthreaded libraries.\n\nThen to connect from Perl:\n\n  lang:bash\n
  \ perl -MDBI -le 'my $dbh = DBI->connect( \\\n    \"dbi:ODBC:driver=SybASA;ENG=ASA\",
  \\\n    \"DBA\", \"SQL\"); \\\n    print for $dbh->selectrow_array(\"select 42\")'\n\n=cut\n-----BEGIN
  PGP SIGNATURE-----\nVersion: GnuPG v1.4.9 (GNU/Linux)\n\niQCVAwUBS3kpC+z9kGY+SikhAQJICgP/RZSGO+Aed0di6gKHrID5qyjSdOFEDJFx\nhTipY4bVDvGUrCx0JR/hyrPvHIq2AnXqbzvnwsGfpQj3G6iTiGQtAxF69OauxRAa\ndjaKzyaPGdaQXk4XhAr41SlEAJmWHUOAFiMQbhbsHCXR06N1hfXMX0MITvbPDK8m\n/eyFlWc6178=\n=Dzse\n-----END
  PGP SIGNATURE-----\n"
signed: 1
summary: ' I will briefly discuss setting up the development version …'
tags:
- dbix-class: 0
- databases: 0
- dbic: 0
- asa: 0
- perl: 0
- sybase-asa: 0
- sql-anywhere: 0
- sybase: 0
text: "    I will briefly discuss setting up the development version of Sybase\n    SQL
  Anywhere (ASA) on linux (or similar) and using it with Perl.\n\n    You can download
  it from:\n\n    http://www.sybase.com/detail?id=1016644 <http://www.sybase.com/de-\n
  \   tail?id=1016644>\n\n    Go through the install process, and make a separate
  user for it\n    (e.g. sybase-asa).\n\n    In the .bashrc for the user, add:\n\n
  \     lang:bash\n      . /opt/sqlanywhere11/bin32/sa_config.sh\n\n    Change to
  that user, and now lets create a database:\n\n      lang:bash mkdir logs dbinit
  -t ./logs/hlaghdb.log -p 4096 -dba\n      DBA,SQL hlaghdb.db\n\n    This sets the
  username to DBA and the password to SQL.\n\n    Let's make an init script. Note
  that you should not install the init\n    script to run automatically because of
  the obnoxious agree to li-\n    cense prompt on startup, use it as just a utility
  for starting the\n    database. Edit the part at the top.\n\n      lang:bash\n      #!/bin/sh\n
  \     #\n      # Startup script for Sybase SQL Anywhere\n      #\n      # description:
  Sybase SQL Anywhere RDBMS System processname: db-\n      # srv11\n\n      ASA_USER=sybase-asa
  ASA_BIN=/opt/sqlanywhere11/bin32/ DB_FILE=h-\n      laghdb.db SRV_NAME=ASA\n\n      #
  Find the name of the script\n      NAME=`basename $0`\n\n      # For SELinux we
  need to use 'runuser' not 'su'\n      if [ -x /sbin/runuser ] then SU=runuser else
  SU=su fi\n\n      # Find home\n      ASA_HOME=`$SU $ASA_USER -c 'echo \\$HOME'`\n\n
  \     start() { ASA_START=$\"Starting ${NAME} service: \"\n\n          $SU $ASA_USER
  -c \". $ASA_BIN/sa_config.sh; $ASA_BIN/dbsrv11\n          -ud -n $SRV_NAME $ASA_HOME/$DB_FILE\"\n\n
  \         ret=$? if [ $ret -eq 0 ] then echo \"$ASA_START Success.\" else\n          echo
  \"$ASA_START Failed!\" exit 1 fi echo }\n\n      stop() { echo -n $\"Stopping ${NAME}
  service: \"\n\n          pkill dbsrv11\n\n          ret=$? if [ $ret -eq 0 ] then
  echo \"Success.\" else echo\n          \"Failed!\" exit 1 fi echo }\n\n      restart()
  { stop start }\n\n      case \"$1\" in start) start ;; stop) stop ;; restart) restart
  ;; *)\n      echo $\"Usage: $0 {start|stop|restart}\" exit 1 esac exit 0\n\n    SQL
  Anywhere comes with a GUI and a Curses SQL shell, named dbisql\n    and dbisqlc
  respectively.\n\n    Since it uses the TDS protocol, you can also use the ASE isql
  with\n    rlwrap or the freely available sqsh utility.\n\n    To use sqsh, first
  set the SYBASE environment variable to some di-\n    rectory, for example $HOME/sybase.
  In that directory make a file\n    called interfaces that contains the following:\n\n
  \     ASA master tcp ether localhost 2638 query tcp ether localhost 2638\n\n    Then
  to connect use:\n\n      sqsh -S ASA -D hlaghdb -U DBA -P SQL\n\n    statements
  are executed by typing go on a new line. To quit type\n    quit on a new line.\n\n
  \   To make a non-DBA user, use the following commands in a SQL shell:\n\n      grant
  connect to hlagh identified by dongs grant resource to hlagh\n\n    Now install
  the DBD::SQLAnywhere perl driver.\n\n    Source the sa_config.sh and make a copy
  of the /opt/sqlanywhere11/s-\n    dk/perl directory. Change to the directory and:\n\n
  \     lang:bash perl Makefile.PL make sudo make install\n\n    Do not use the DBD::SQLAnywhere
  on CPAN, it is outdated and\n    doesn't work.\n\n    Add /opt/sqlanywhere11/lib32
  to your LD_LIBRARY_PATH, and try con-\n    necting from DBI:\n\n      lang:bash
  perl -MDBI -le 'my $dbh = DBI->connect( \"dbi:SQLAny-\n      where:ASA\", \"DBA\",
  \"SQL\"); \\ print for $dbh->selectrow_array(\"se-\n      lect 42\")'\n\n    DBIx::Class
  support for both the DBD and via DBD::ODBC is available\n    in the current version.\n\n
  \   DBIx::Class::Schema::Loader support is available as of version\n    0.05002.\n\n
  \   To use with unixODBC, add the following to /etc/odbcinst.ini:\n\n      lang:ini
  [SybASA] Description = Sybase SQL Anywhere Driver = /op-\n      t/sqlanywhere11/lib32/libdbodbc11.so
  Setup = /opt/sqlany-\n      where11/lib32/libdbodbc11.so FileUsage = 1\n\n    There
  are also _r versions of the drivers in that directory, these\n    are the threaded
  libraries.\n\n    Then to connect from Perl:\n\n      lang:bash perl -MDBI -le 'my
  $dbh = DBI->connect( \\ \"dbi:ODBC:-\n      driver=SybASA;ENG=ASA\", \\ \"DBA\",
  \"SQL\"); \\ print for $dbh->selec-\n      trow_array(\"select 42\")'\n"
title: Sybase SQL Anywhere
type: pod
uri: http://blog.cachemiss.com/articles/Sybase%20SQL%20Anywhere.pod
xhtml: '<div class="pod">

  <p>I will briefly discuss setting up the development version of Sybase SQL Anywhere

  (ASA) on linux (or similar) and using it with Perl.</p>

  <p>You can download it from:</p>

  <p><a href="http://www.sybase.com/detail?id=1016644">http://www.sybase.com/detail?id=1016644</a></p>

  <p>Go through the install process, and make a separate user for it (e.g.

  <code>sybase-asa</code>).</p>

  <p>In the <code>.bashrc</code> for the user, add:</p>

  <pre><span class="Normal">. /opt/sqlanywhere11/bin32/sa_config.sh </span>

  </pre>

  <p>Change to that user, and now lets create a database:</p>

  <pre><span class="BString">mkdir</span><span class="Normal"> logs</span><span class="Normal">

  </span><span class="Normal">dbinit -t ./logs/hlaghdb.log -p 4096 -dba DBA,SQL hlaghdb.db</span>

  </pre>

  <p>This sets the username to <code>DBA</code> and the password to <code>SQL</code>.</p>

  <p>Let''s make an init script. Note that you should not install the init script
  to

  run automatically because of the obnoxious agree to license prompt on startup,

  use it as just a utility for starting the database. Edit the part at the top.</p>

  <pre><span class="Comment">#!/bin/sh</span><span class="Comment">

  </span><span class="Comment">#</span><span class="Comment">

  </span><span class="Comment"># Startup script for Sybase SQL Anywhere</span><span
  class="Comment">

  </span><span class="Comment"># </span><span class="Comment">

  </span><span class="Comment"># description: Sybase SQL Anywhere RDBMS System</span><span
  class="Comment">

  </span><span class="Comment"># processname: dbsrv11</span>


  <span class="Others">ASA_USER=</span><span class="Normal">sybase-asa</span><span
  class="Normal">

  </span><span class="Others">ASA_BIN=</span><span class="Normal">/opt/sqlanywhere11/bin32/</span><span
  class="Normal">

  </span><span class="Others">DB_FILE=</span><span class="Normal">hlaghdb.db</span><span
  class="Normal">

  </span><span class="Others">SRV_NAME=</span><span class="Normal">ASA</span>


  <span class="Comment"># Find the name of the script</span><span class="Comment">

  </span><span class="Others">NAME=</span><span class="Keyword">`</span><span class="Normal">basename
  </span><span class="Others">$0</span><span class="Keyword">`</span>


  <span class="Comment"># For SELinux we need to use &apos;runuser&apos; not &apos;su&apos;</span><span
  class="Comment">

  </span><span class="Keyword">if</span><span class="Reserved"> [</span><span class="Normal">
  -x /sbin/runuser</span><span class="Reserved"> ]</span><span class="Normal">

  </span><span class="Keyword">then</span><span class="Normal">

  </span><span class="Normal">        </span><span class="Others">SU=</span><span
  class="Normal">runuser</span><span class="Normal">

  </span><span class="Keyword">else</span><span class="Normal">

  </span><span class="Normal">        </span><span class="Others">SU=</span><span
  class="Normal">su</span><span class="Normal">

  </span><span class="Keyword">fi</span>


  <span class="Comment"># Find home</span><span class="Comment">

  </span><span class="Others">ASA_HOME=</span><span class="Keyword">`</span><span
  class="Others">$SU</span><span class="Normal"> </span><span class="Others">$ASA_USER</span><span
  class="Normal"> -c </span><span class="String">&apos;echo \$HOME&apos;</span><span
  class="Keyword">`</span>


  <span class="Char">start()</span><span class="Normal"> </span><span class="Keyword">{</span><span
  class="Normal">

  </span><span class="Normal">    </span><span class="Others">ASA_START=</span><span
  class="String">$&quot;Starting </span><span class="Others">${NAME}</span><span class="String">
  service: &quot;</span>


  <span class="Normal">    </span><span class="Others">$SU</span><span class="Normal">
  </span><span class="Others">$ASA_USER</span><span class="Normal"> -c </span><span
  class="String">&quot;. </span><span class="Others">$ASA_BIN</span><span class="String">/sa_config.sh;
  </span><span class="Others">$ASA_BIN</span><span class="String">/dbsrv11 -ud -n
  </span><span class="Others">$SRV_NAME</span><span class="String"> </span><span class="Others">$ASA_HOME</span><span
  class="String">/</span><span class="Others">$DB_FILE</span><span class="String">&quot;</span>


  <span class="Normal">    </span><span class="Others">ret=$?</span><span class="Normal">
  </span><span class="Normal">

  </span><span class="Normal">    </span><span class="Keyword">if</span><span class="Reserved">
  [</span><span class="Normal"> </span><span class="Others">$ret</span><span class="Normal">
  -eq 0</span><span class="Reserved"> ]</span><span class="Normal">

  </span><span class="Normal">    </span><span class="Keyword">then</span><span class="Normal">

  </span><span class="Normal">            </span><span class="Reserved">echo</span><span
  class="Normal"> </span><span class="String">&quot;</span><span class="Others">$ASA_START</span><span
  class="String"> Success.&quot;</span><span class="Normal">

  </span><span class="Normal">    </span><span class="Keyword">else</span><span class="Normal">

  </span><span class="Normal">            </span><span class="Reserved">echo</span><span
  class="Normal"> </span><span class="String">&quot;</span><span class="Others">$ASA_START</span><span
  class="String"> Failed!&quot;</span><span class="Normal">

  </span><span class="Normal">            </span><span class="Reserved">exit</span><span
  class="Normal"> 1</span><span class="Normal">

  </span><span class="Normal">    </span><span class="Keyword">fi</span><span class="Normal">

  </span><span class="Normal">    </span><span class="Reserved">echo</span><span class="Normal">

  </span><span class="Normal">}</span>


  <span class="Char">stop()</span><span class="Normal"> </span><span class="Keyword">{</span><span
  class="Normal">

  </span><span class="Normal">    </span><span class="Reserved">echo</span><span class="Normal">
  -n </span><span class="String">$&quot;Stopping </span><span class="Others">${NAME}</span><span
  class="String"> service: &quot;</span>


  <span class="Normal">    pkill dbsrv11</span>


  <span class="Normal">    </span><span class="Others">ret=$?</span><span class="Normal">

  </span><span class="Normal">    </span><span class="Keyword">if</span><span class="Reserved">
  [</span><span class="Normal"> </span><span class="Others">$ret</span><span class="Normal">
  -eq 0</span><span class="Reserved"> ]</span><span class="Normal">

  </span><span class="Normal">    </span><span class="Keyword">then</span><span class="Normal">

  </span><span class="Normal">            </span><span class="Reserved">echo</span><span
  class="Normal"> </span><span class="String">&quot;Success.&quot;</span><span class="Normal">

  </span><span class="Normal">    </span><span class="Keyword">else</span><span class="Normal">

  </span><span class="Normal">            </span><span class="Reserved">echo</span><span
  class="Normal"> </span><span class="String">&quot;Failed!&quot;</span><span class="Normal">

  </span><span class="Normal">            </span><span class="Reserved">exit</span><span
  class="Normal"> 1</span><span class="Normal">

  </span><span class="Normal">    </span><span class="Keyword">fi</span><span class="Normal">

  </span><span class="Normal">    </span><span class="Reserved">echo</span><span class="Normal">

  </span><span class="Normal">}</span>


  <span class="Char">restart()</span><span class="Normal"> </span><span class="Keyword">{</span><span
  class="Normal">

  </span><span class="Normal">    stop</span><span class="Normal">

  </span><span class="Normal">    start</span><span class="Normal">

  </span><span class="Keyword">}</span>


  <span class="Keyword">case</span><span class="Normal"> </span><span class="String">&quot;</span><span
  class="Others">$1</span><span class="String">&quot;</span><span class="Keyword">
  in</span><span class="Normal">

  </span><span class="Normal">    start</span><span class="Keyword">)</span><span
  class="Normal">

  </span><span class="Normal">        start</span><span class="Normal">

  </span><span class="Normal">        </span><span class="Keyword">;;</span><span
  class="Normal">

  </span><span class="Normal">    stop</span><span class="Keyword">)</span><span class="Normal">

  </span><span class="Normal">        stop</span><span class="Normal">

  </span><span class="Normal">        </span><span class="Keyword">;;</span><span
  class="Normal">

  </span><span class="Normal">    restart</span><span class="Keyword">)</span><span
  class="Normal">

  </span><span class="Normal">        restart</span><span class="Normal">

  </span><span class="Normal">        </span><span class="Keyword">;;</span><span
  class="Normal">

  </span><span class="Normal">    *</span><span class="Keyword">)</span><span class="Normal">

  </span><span class="Normal">        </span><span class="Reserved">echo</span><span
  class="Normal"> </span><span class="String">$&quot;Usage: </span><span class="Others">$0</span><span
  class="String"> {start|stop|restart}&quot;</span><span class="Normal">

  </span><span class="Normal">        </span><span class="Reserved">exit</span><span
  class="Normal"> 1</span><span class="Normal">

  </span><span class="Normal">esac</span><span class="Normal">

  </span><span class="Reserved">exit</span><span class="Normal"> 0</span>

  </pre>

  <p>SQL Anywhere comes with a GUI and a Curses SQL shell, named <code>dbisql</code>
  and

  <code>dbisqlc</code> respectively.</p>

  <p>Since it uses the TDS protocol, you can also use the ASE <code>isql</code> with
  <code>rlwrap</code>

  or the freely available <code>sqsh</code> utility.</p>

  <p>To use <code>sqsh</code>, first set the SYBASE environment variable to some directory,
  for

  example <code>$HOME/sybase</code>. In that directory make a file called <code>interfaces</code>
  that

  contains the following:</p>

  <pre><span class="Normal">ASA</span><span class="Normal">

  </span><span class="Normal">        master tcp ether localhost 2638</span><span
  class="Normal">

  </span><span class="Normal">        query tcp ether localhost 2638</span>

  </pre>

  <p>Then to connect use:</p>

  <pre><span class="Normal">sqsh -S ASA -D hlaghdb -U DBA -P SQL</span>

  </pre>

  <p>statements are executed by typing <code>go</code> on a new line. To quit type
  <code>quit</code> on a

  new line.</p>

  <p>To make a non-DBA user, use the following commands in a SQL shell:</p>

  <pre><span class="Normal">grant connect to hlagh identified by dongs</span><span
  class="Normal">

  </span><span class="Normal">grant resource to hlagh</span>

  </pre>

  <p>Now install the <code>DBD::SQLAnywhere</code> perl driver.</p>

  <p>Source the <code>sa_config.sh</code> and make a copy of the <code>/opt/sqlanywhere11/sdk/perl</code>

  directory. Change to the directory and:</p>

  <pre><span class="BString">perl</span><span class="Normal"> Makefile.PL</span><span
  class="Normal">

  </span><span class="BString">make</span><span class="Normal">

  </span><span class="BString">sudo</span><span class="Normal"> </span><span class="BString">make</span><span
  class="Normal"> </span><span class="BString">install</span>

  </pre>

  <p>Do not use the <code>DBD::SQLAnywhere</code> on CPAN, it is outdated and doesn''t
  work.</p>

  <p>Add <code>/opt/sqlanywhere11/lib32</code> to your <code>LD_LIBRARY_PATH</code>,
  and try connecting

  from DBI:</p>

  <pre><span class="BString">perl</span><span class="Normal"> -MDBI -le </span><span
  class="String">&apos;my $dbh = DBI-&gt;connect(</span><span class="String">

  </span><span class="String">  &quot;dbi:SQLAnywhere:ASA&quot;, &quot;DBA&quot;,
  &quot;SQL&quot;); \</span><span class="String">

  </span><span class="String">  print for $dbh-&gt;selectrow_array(&quot;select 42&quot;)&apos;</span>

  </pre>

  <p><code>DBIx::Class</code> support for both the DBD and via DBD::ODBC is available
  in the

  current version.</p>

  <p><code>DBIx::Class::Schema::Loader</code> support is available as of version <code>0.05002</code>.</p>

  <p>To use with unixODBC, add the following to <code>/etc/odbcinst.ini</code>:</p>

  <pre>[SybASA]

  Description = Sybase SQL Anywhere

  Driver = /opt/sqlanywhere11/lib32/libdbodbc11.so

  Setup = /opt/sqlanywhere11/lib32/libdbodbc11.so

  FileUsage = 1

  </pre>

  <p>There are also <code>_r</code> versions of the drivers in that directory, these
  are the

  threaded libraries.</p>

  <p>Then to connect from Perl:</p>

  <pre><span class="BString">perl</span><span class="Normal"> -MDBI -le </span><span
  class="String">&apos;my $dbh = DBI-&gt;connect( \</span><span class="String">

  </span><span class="String">  &quot;dbi:ODBC:driver=SybASA;ENG=ASA&quot;, \</span><span
  class="String">

  </span><span class="String">  &quot;DBA&quot;, &quot;SQL&quot;); \</span><span class="String">

  </span><span class="String">  print for $dbh-&gt;selectrow_array(&quot;select 42&quot;)&apos;</span>

  </pre>



  </div>'

