-1

I want to connect to sybase than execute a file.sql I tapped this command:

sql -U Login -P MotDePasse -S ServeurASE -d NomDeLaBase -i Script.sql -o JournalDErreur.log

I also tried

isql -U Login -P MotDePasse -S @IPserveur:Port -d NomDeLaBase -i Script.sql -o JournalDErreur.log

and I have the error :

"La commande sql n'est pas reconnue'

Can u help please?

I have installed JTDS and sql (pip install) but it doesn't work

markp-fuso
  • 28,790
  • 4
  • 16
  • 36
user3446229
  • 95
  • 3
  • 3
  • 14

1 Answers1

0

Assuming you're trying to connect to a Sybase ASE database, and you're using the isql command line utility that comes with ASE (or the Sybase SDK), the correct isql format is:

isql -U <login> -P <password> -S <host_or_ipaddr>:<port> -D <dbname> -i <input_script> -o <output_file>

So updating your example we get:

isql -U Login -P MotDePasse -S IPserveur:Port -D NomDeLaBase -i Script.sql -o JournalDErreur.log

I can't speak for your sql example as I'm not familiar with that tool let alone its input parameters.

markp-fuso
  • 28,790
  • 4
  • 16
  • 36
  • Even using this command I have the error '"La commande isql n'est pas reconnue' I think I must install another thing or define environnement variable – user3446229 Apr 27 '18 at 15:03
  • Assuming you're using `isql` from a ASE or SDK installation, there should be some resource files under the $SYBASE directory, eg, for a linux/UNIX environment you would source the $SYBASE/SYBASE.sh script (*.csh if using csh); these resource files should have all the env variables you'll need to get `isql` working – markp-fuso Apr 27 '18 at 15:19
  • I think the problem is how to configure JTDS in my PC. Can u help me to resolve this problem please! – user3446229 May 02 '18 at 15:27
  • can you help please ? – user3446229 May 09 '18 at 14:26