Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: how to use " alter database close" in Oracle 7.x ?
In article <9uu62u$33s$1_at_freenet9.carleton.ca>, eq418_at_freenet.carleton.ca
says...
>
>hi , all
>
>I use Oracle 7.x now( It switches quickly)
>can somebody tell me how to use " alter database close" to close
>database ( while not dismount):
>
>what I do :
>1.----
>SVRMGR> select sid , serial# , status, username,server from v$session ;
>SID SERIAL# STATUS USERNAME SERVER
>---------- ---------- -------- ------------------------------ ---------
> 1 1 ACTIVE DEDICATED
> 2 1 ACTIVE DEDICATED
> 3 1 ACTIVE DEDICATED
> 4 1 ACTIVE DEDICATED
> 5 1 ACTIVE DEDICATED
> 6 229 ACTIVE DEDICATED
> 7 229 ACTIVE DEDICATED
> 8 15 ACTIVE SYS DEDICATED
>
>2.----
>SVRMGR> alter system kill session '8,229';( as many as possble, I'm SYS)
>
>3.----
>SVRMGR> alter database close ;
>alter database close
>*
>ORA-01093: ALTER DATABASE CLOSE only permitted with no sessions connected
>
>4.----
>I change into user " internal "
>still can not close ?
>
>5.---
>why ????
>
>thanks
>
>
>
Well, its the JOB_QUEUE_PROCESSES that are getting you -- SIDs 6 and 7 are your two job_queue_processes (the ones with the big serial#'s).
In 7.x, you won't be able to "alter database close" with them going (in 8.0, you can alter system set job_queue_processes=0 to get rid of them, in 7.x, that parameter is not modifiable).
That no big deal cause you cannot alter database OPEN after a close, so you are going to have to restart anyway so just to this:
instead of:
alter database close;
<command you can only do when closed but mounted like changing archive log mode>
shutdown;
startup;
do this:
shutdown;
startup mount;
<command you can only do when closed but mounted like changing archive log mode>
alter database open;
-- Thomas Kyte (tkyte@us.oracle.com) http://asktom.oracle.com/ Expert one on one Oracle, programming techniques and solutions for Oracle. http://www.amazon.com/exec/obidos/ASIN/1861004826/ Opinions are mine and do not necessarily reflect those of Oracle CorpReceived on Sat Dec 08 2001 - 17:46:28 CST
![]() |
![]() |