on 2022 Dec 02 8:22 AM
Hi,
I start the server with dbspawn:
dbspawn dbsrv17 -n Comix_Masked "cims-masked.db" -gf -x tcpip(Port=2640;IPv6=NO) -c 25p -ch40p -ti 360
After the server starts, I open a connection with dbisql and execute:
alter dbspace archive rename 'cims_archive-masked.db'; commit;
The statement works fine. The new name for the dbspace-file can be seen in sysfile system table. If I script dbspawn and dbisql -nogui in a windows batch file:
%SQLANY17%\\bin64\\dbspawn dbsrv17 -n Comix_Masked "cims-masked.db" -gf -x tcpip(Port=2640;IPv6=NO) -c 25p -ch40p -ti 360 >> renamedb.html %SQLANY17%\\bin64\\dbisql -port 2640 -c "UID=DBA;PWD=xxxxxxxxx;Server=Comix_Masked" -nogui -onerror exit -q renamedb.sql
I get the error:
Could not execute statement. Not allowed while 'DBA' is using the database SQLCODE=-211, ODBC 3 State="40001"
What I tried so far: 1) I tested it with dbsrv17 or dbeng17. 2) After dbspawn I run a statement to wait 60 seconds 3) I use -gf (to deactivate the triggers) or not use -gf. 4) I tried dbisqlc. 5) Remove the -onerror exist clause.
But nothing helps. I get allways the error message from above. Any ideas how to script it without the error?
Thanks
Robert
User | Count |
---|---|
68 | |
10 | |
10 | |
7 | |
6 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.