Hi All,
when is run this manually it work's
i am UNable to get the proper .sql so that i can use this in my input file. I need to do this way only bcz of requirment.
Sample script
isql -Sxxx -Usa -Pyyyy -D master -o "abc_script.sql" << EOF
echo USE master >> "abc_script.sql"
echo go >> "abc_script.sql"
echo dump database $1 to "\"/opt/sybase/shell_script/tradescope_test.dump"\" >> "abc_script.sql"
echo select "\"kill "\"+convert\(\varchar\(\5\)\,spid\)\ from master..sysprocesses where dbid= db_id\(\"$2"\)\ >> "abc_script.sql"
echo go >> "abc_script.sql"
EOF
isql -i "abc_script.sql" -o "abc_script.log" -Usa -Pyyyy -Sxxxx -Dmaster
[sybase@server05 shell_script]$ ./dump.sh abc test
Two place i am getting error
- overall i am not getting the "abc_script.sql" file (0 bytes)
- i am getting error on echo select "\"kill "\"...... line
Thanks
all
---------- Post updated at 12:00 PM ---------- Previous update was at 10:36 AM ----------
Hi All,
- i am getting error on echo select "\"kill "\"...... line
The echo of this line is for $2 parameter variable is unable to assgin ,where i am going wrong
echo select "\"kill "\"+convert\(\varchar\(\5\)\,spid\)\ from master..sysprocesses where dbid= db_id\(\"\$2\"\) >> "abc_script.sql"
output of the echo is...
create database abc_test on data_db1 = 20
go
select "kill "+convert(varchar(5),spid) from master..sysprocesses where dbid= db_id("$2")
go