ALTER DATABASE UPGRADE Fails with the Error "Not
allowed while 'DBA' is using the
database" – Database upgrade
procedures in the Installation and
Configuration Guide instruct you to use
several startup flags to start or restart a server.
If Sybase Control Center is running,
or another process that automatically connects to
SAP Sybase IQ, you must
increase the number of connections using the
-gm flag or the upgrade fails.
In an environment where many processes automatically
connect to SAP Sybase IQ,
consider temporarily starting
SAP Sybase IQ on a
different port using the -x flag.
This option prevents all existing processes from
connecting to IQ since the port will be unknown to
them. You can also use this method for any
maintenance task that requires
SAP Sybase IQ connectivity
to be limited.
For example, the SAP Sybase IQ
upgrade procedure follows this sequence for a
simplex server:
-
Shut down the server, then restart with these
startup flags:
-gm 1 -iqro 1
-
Run ALTER DATABASE
UPGRADE.
SAP Sybase IQ returns a
Not allowed while 'DBA' is using the
database error.
Similarly, the IQ multiplex upgrade procedure follows
this sequence:
-
Shut down the multiplex, then restart the
coordinator with these startup flags:
-iqmpx_sn 1 -gm 1 -iqro
1
-
Run ALTER DATABASE
UPGRADE.
IQ returns a Not allowed while
'DBA' is using the database
error.
- Workaround 1 – The -gm switch controls the
number of connections when you start the server.
- Start the server with -gm
2 (which allows two connections), or
drop the existing connection which is used by SCC
when the server starts.
- Verify the number of connections using the
sp_iqconnection command.
- If necessary, drop any connections used by SCC
(or other processes) using the DROP
CONNECTION
<id_number> command.
- Workaround 2 – Temporarily start IQ on a different port using
the –x switch: The
–x switch controls the port that
IQ uses when you start the server.
- On a simplex server, use the
–x switch to specify a new port
number: start_iq @yourserver.cfg
yourdb.db -x 'tcpip{port=<new_port>}'
- On a multiplex server, use both the
–x switch and the iqmpx override
switch to specify a new port number:
start_iq @yourserver.cfg yourdb.db
-iqmpx_ov 1 -x 'tcpip{port=<new_port>}'