472,805 Members | 1,099 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,805 software developers and data experts.

Put database in single user mode

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
5 5586
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
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
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
Thanks everyone for the fast response!!!! Your help is greatly
appreciated.

Martin

Nov 12 '05 #5
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Vincent Jones | last post by:
If I start the server in single user mode does it reset the sort order?
5
by: Mark S | last post by:
I have a db maintenance plan which is set to backup (then truncate hopefully) the transaction log. In order to backup a transaction log the db must be in single user mode so the maint. plan fails. ...
1
by: debashish | last post by:
Hello Faculties When doing recovery after loss of data files, one would like to start SQL Server in single user mode. Is this possible? Thanks in advance Debashish
0
by: johan degraeve | last post by:
Hello, Put sqlsvr 2000 into single user mode (startup parameter -m added, server restarted, says it's in single mode) used query analyser to run the following: dbcc checkdb...
5
by: velu5 | last post by:
Hello , Is it possible/recommended to do SQL server instance backups in Single user mode ? Thanks in advance, atv
6
by: Mike | last post by:
I'm having trouble running TSQL commands when SQL2005 is in single- user mode. I've restarted SQL with -m, -c, -T3608 set in the startup options. I can get into Config manager OK, but as soon...
0
by: ipranay | last post by:
Can i put a database in single user mode while a background process is running on the database
2
by: aj | last post by:
SQL Server 2005 SP2 2005.090.3054.00 I'm trying to move master/model/msdb to a new spot. I restart SQL Server in single user mode with the "-c;-m;-T3608" startup params. When I try to connect...
4
sashi
by: sashi | last post by:
Hi everyone, I've been facing a problem with one of my RHEL 4 box. Due to a recently power failure i am not able to get the system to work as usual. I've configured RAID1 as well as LVM2, the...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
0
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Sept 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
0
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: lllomh | last post by:
How does React native implement an English player?
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.