var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: FORCE APPLICATION on one Database.
Is there a way to force application off one database while allowing other to continue in same instance.
My requirement is to restore one database POS only while GAMING will be still running.
So I think that I have to force the application on POS and when they are off, I will deactivate DB and DROP DB.
So I need a function or select query that can be passed to FORCE APPLICATIONS.
LIST APPLICATIONS FOR DATABASE POS
FORCE APPLICATIONS (?,?,?,?,?. . . . .)
deactivate db POS
DROP DB POS
RESTORE DB POS FROM . . . . .
I tried following query
But Force Applications does not accept the output of this query.
SELECT AGENT_ID FROM
TABLE(SYSPROC.SNAPSHOT_APPL_INFO(CURRENTSERVER, -1)) AS SNP_TBL
Is there any other function or statement.
DB2 V8.2 and V9.5 on Win 2K3 servers
Thanks in adv,
Last edited by DBFinder; 05-14-09 at 12:37.
Use the QUIESCE command.
QUIESCE DB IMMEDIATE FORCE CONNECTIONS
Great, I will use it tonight.
Following is the code I came up with,for dropping one DB while other DB is running.
I am listing it for any correction if needed.
Please advise if anything is not appropriate.
DB2 CONNECT TO POS
if [%ERRORLEVEL%]== goto :DBdoesNotExist
DB2 QUIESCE DB IMMEDIATE FORCE CONNECTIONS
DB2 UNQUIESCE DB
DB2 CONNECT RESET
DB2 DEACTIVATE DB POS
DB2 DROP DB POS
This works well except it takes little longer to drop the databse.
Is there any other way to force applications filtring by database, to drop db in similar situation.
Thanks Andy , your suggestion worked well.
Last edited by DBFinder; 05-19-09 at 09:34.