By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,137 Members | 2,282 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,137 IT Pros & Developers. It's quick & easy.

Put database in single user mode

P: n/a
Hi,

I wanted to know if there is a way in DB2 UDB/AIX v. 8.2.2 to
activate/start a database in a single user mode similar to how you can
start the entire instance in Admin Mode.

I want to take a database offline. I use the force command but there
are apps that constantly try to reconnect. I want to set the database
to only allow an admin to access it to run my tasks.

Thanks in advance!

Martin

Nov 12 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
You can use QUIESCE DATABASE command. Only users with quiesce_connect
privileges (and users with administrative authorities) will be able to
connect to the database.

Nov 12 '05 #2

P: n/a
Hi,

mghale wrote:
I want to take a database offline. I use the force command but there
are apps that constantly try to reconnect. I want to set the database
to only allow an admin to access it to run my tasks.


You want to search the DB2 Infocenter for

QUIESCE DATABASE

Example:

(As instance owner)

db2 connect to <mydb> using <password>
db2 quiesce database immediate force connections

This will force all active user-connections and gives an SQL-Error if a
ordenary user tries to connect to the database.

To make the database available again, connect to it and type

db2 unquiesce database

Hope that helps.

regards,

Norbert
Nov 12 '05 #3

P: n/a
Artur wrote:
You can use QUIESCE DATABASE command. Only users with quiesce_connect
privileges (and users with administrative authorities) will be able to
connect to the database.

Thank you for putting me right. You don't have to be the instance owner.
You just need to have the priviledges mentioned above, which means
that users whith same priviledges would still be able to connect to the
database.

Should not be a REAL problem in a real world scenario.

cu,

Norbert
Nov 12 '05 #4

P: n/a
Thanks everyone for the fast response!!!! Your help is greatly
appreciated.

Martin

Nov 12 '05 #5

P: n/a
After you start the instance, do:
db2 connect to dbname in exclusive mode

From then on only connection using this id can connect or do stuff.
Even users with QUIESCE CONNECT won't be able to connect.
I think (not sure) that this is a SYSADMIN authority requirement.
HTH, Pierre.

--
Pierre Saint-Jacques
SES Consultants Inc.
514-737-4515
"Norbert Munkel" <nm@acoreus.de> a écrit dans le message de news:
dg*************@news.t-online.com...
Artur wrote:
You can use QUIESCE DATABASE command. Only users with quiesce_connect
privileges (and users with administrative authorities) will be able to
connect to the database.

Thank you for putting me right. You don't have to be the instance owner.
You just need to have the priviledges mentioned above, which means that
users whith same priviledges would still be able to connect to the
database.

Should not be a REAL problem in a real world scenario.

cu,

Norbert


Nov 12 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.