Results 1 to 4 of 4

Thread: isql bat

  1. #1
    Join Date
    Aug 2011
    Posts
    3

    Unanswered: isql bat

    hi everyone

    I'm new utlizando the sybase command, for this I am creating the next bat with this code


    ECHO La ruta de la BD es: "%rutaBD%\%nombreBD%"
    ECHO La ruta de la BD de respaldo es: "%RP%"
    ECHO El nombre del servicio es: "%servicio%"
    ECHO El usuario de la BD es: %user%
    ECHO La contraseña de la BD es: %pwd%
    ECHO El Sybase 9 se encuentra en: %RutaSybase9%
    "%RutaSybase9%\dbbackup.exe" -c uid=%user%;pwd=%pwd%;dbf="%rutaBD%\ek_adm01" -y RP

    "%RutaSybase9%\dbstop.exe" -d -c "uid=%user%;pwd=%pwd%;eng=%servicio%;dbn=ek_ad m99"

    copy %RP%\ek_adm99.db %RP%\ek_adm99_1.db

    cd 99\

    rename ek_adm01.db ek_adm99.db

    rename ek_adm01.log ek_adm99.log

    "%RutaSybase9%\dblog.exe" -t ek_adm99.log ek_adm99.db
    "%RutaSybase9%\dbisql.exe" -c "uid=%user%;pwd=%pwd%" "%RP%\StarBase.sql"

    I have this code in a sql script

    UPDATE CIA SET NUM_CIA='88' WHERE NUM_CIA='99';
    UPDATE CNIA SET CL_CNIA = '88' WHERE CLAVE_COMPANIA = '99';
    .....
    ...

    can someone tell me how to run theses lines from the file bat??

  2. #2
    Join Date
    Apr 2008
    Location
    Iasi, Romania
    Posts
    561
    Provided Answers: 2
    isql -Sserver_name -Uuser_name -Ppassword -iscript_file
    Florin Aparaschivei
    DB2 9.7, 10.5 on Windows
    Iasi, Romania

  3. #3
    Join Date
    Aug 2011
    Posts
    3
    hello

    yeah , i tried that

    but the message i received is unknown sentence isql

    i writing inside the file

    "C:\program files\Sybase9\SQL Anywhere 9\win32\dbisql.exe" isql -U user -S server -P pass -i D:\BDatos\Script\StarBase.sql

    that is correct??

    thanks again

  4. #4
    Join Date
    Apr 2008
    Location
    Iasi, Romania
    Posts
    561
    Provided Answers: 2
    Sorry - isql is for Sybase ASE. For SQL Anywhere I've found this example:
    Interactive SQL utility (dbisql)
    Florin Aparaschivei
    DB2 9.7, 10.5 on Windows
    Iasi, Romania

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •