Insufficient Priv: Shutdown Immediate
I'm trying to shutdown the Oracle database connected using the SYS account as SYSDBA and I'm getting an insufficient privilege error using SHUTDOWN IMMEDIATE.
What system privilege needs to be granted in order to perform SHUTDOWN IMMEDIATE?
Thanks,
Mike
Hi,
There are five operations on Oracle that require the user to have SYSDBA privileges in order to perform them:
* startup a database,
* shutdown a database,
* backup a database,
* recover a database and
* create a database
v$pwfile_users lists all users who have been granted sysdba or sysoper privileges.
SYS@ORACLE10> select * from v$pwfile_users;
USERNAME SYSDB SYSOP
SYS TRUE TRUESee if this query above return the SYS user.
Cheers
Similar Messages
-
create or replace PROCEDURE p_tst
IS
v_count number;
BEGIN
EXECUTE IMMEDIATE 'CREATE TABLE tmp_tbl as select did from parent ';
dbms_output.put_line('deleting');
EXECUTE IMMEDIATE 'DELETE FROM ex WHERE ( did) IN
( select did from parent )';
v_count := SQL%ROWCOUNT;
COMMIT;
dbms_output.put_line(v_count);
dbms_output.put_line('dropping table ');
EXECUTE IMMEDIATE 'DROP TABLE ex CASCADE CONSTRAINTS';
END p_tst ;
the procedure and the tables are in my own schema
when i try to do this
begin
p_tst;
end;
i get insufficient privs on this line:
EXECUTE IMMEDIATE 'CREATE TABLE tmp_tbl as select did from parent ';What is the downside to having a table sitting around empty for a month?
In my mind, it's no different than having a procedure sitting around that is only executed once a month. Yes, it may make it ever so slightly more difficult to find the table/ procedure you're looking for since you have one more object to look at. But that is an exceptionally small overhead. You certainly wouldn't suggest that you should dynamically create, run, and drop the month end procedures, right? So why care about a table that is used once a month sitting unused most of the time?
Justin -
ORA-01031: Insufficient Privs with svrmgrl or DBA Studio. Didnt always happen!
Hi,
I'm running Oracle 816 EE on Win2k. All of a sudden, when I log in as svrmgrl and issue: connect internal, I get prompted for a password. I never had to enter a password before! Also, when logging into DBA Studio as system/manager with SYSBDA privs, I get ORA-01031 Insufficient Privs. I never got that error before. I used to be able to log in to DBA Studio and start/shutdown the DB just fine, but now I'm getting locked out for some reason. Aside from recreating a user schema from time to time, I didnt change any system-related info in the DB. Help!
Rupalcheck these things -
1) a full import of a database with remote_login_passwordfile=exclusive can cause this problem.
2) Check your sqlnet.ora file for SQLNET.AUTHENTICATION_SERVICES parameter. Try setting this to (NONE), if that doesn't work, try setting it to (NTS), and if that doesn't work, try commenting it out. A corrupted "sqlnet.ora" file, or one with security options set, will cause a 'connect internal' request to prompt for a password.
3) Also be sure you have AUTOMATIC_IPC=OFF in the file.
hope this helps -
APEX Insufficient Privs errors when trying to use dbms_sql.parse
Hello,
I have a simple database procedure that changes are user pswd:
create or replace
PROCEDURE chg_pswd_test(p_userid in varchar2,
p_pswd in varchar2)
-- Invoker rights allow a user with execute privileges to call a subprogram.
-- Definer Rights allow programs to execute under the privileges of their
-- definer / schema owner.
AUTHID CURRENT_USER as x varchar2(20);
v_cursor INTEGER;
v_execute INTEGER;
begin
v_cursor := sys.DBMS_SQL.OPEN_CURSOR;
sys.DBMS_SQL.PARSE(v_cursor, 'ALTER USER '||p_userid||' identified by '||p_pswd, sys.DBMS_SQL.NATIVE);
v_execute := sys.DBMS_SQL.EXECUTE(v_cursor);
sys.DBMS_SQL.CLOSE_CURSOR(v_cursor);
commit;
end chg_pswd_test;
I can run this procedure in sqlplus as user x and also as my apex_public_user. I have granted both execute on dbms_sql and alter user privs. It runs for both without problems.
I then create a validation process in APEX can call this database procedure. I then receive insufficient privs errors.
If I grant all privs to public, the apex app will then run, if I remove all privs I receive the errors again.
Does anyone know which database priv I am missing, I cannot grant all privs to public on my production database?
ThanksOdd, as I would think that should work, being the DBA role and all...
If it works as user X from SQL*Plus, could you try to change the parsing schema to User X and try again?
Thanks,
- Scott -
http://spendolini.blogspot.com
http://sumnertechnologies.com -
I'm trying to shutdown an Oracle9i database on Unix using SHUTDOWN IMMEDIATE but it just hangs.
I checked the sessions in V$SESSION and noticed there were a few INACTIVE sessions. So I built a script that goes thru all the INACTIVE sessions and kills them.
With all these sessions having status KILLED...when I try to run a SHUTDOWN IMMEDIATE, the database still hangs. I don't want to use SHUTDOWN ABORT.
Does anyone have any information on what makes SHUTDOWN IMMEDIATE hang? Could there be some unix processes....or oracle processes?
ThanksDear All,
I am also having some shutdown problem with the Oracle 10g on my Windows Server 2003 machine. My machine could not shutdown (means OS cannot completely shutdown the machine) even after i issued the "shutdown immediate" command.
As what Jaafar said, we should kill the process from OS level. Can any of you explain more on this as I have no idea on how to do this? Which process should I kill after I issued the "Shutdown immediate" command?
Thank you.
best regards,
Wnson -
Hi, Need help in this question -
i have a schema1 and table1 in it.
i have INSERT/DELETE/UPDATE/SELECT privs to table1 from schema2.
when i try to drop an index on table1 from schema2, it throws an error saying "index doesnot exist", i was expecting "insufficient privs error"
am using the following statement in scehma2-
drop index schema1.indx_table1;
please help, thanks.Schema2 has explicit privileges on the table in schema1, so it can reference schema1.table_name, however there are never any explicit privileges on indexes, so schema2 has no way of explicitly referencing the index, therfore you get the not found instead of insuffivient privileges. It works the same way with tables if you do not have privileges on the table.
SQL> show user
USER is "OPS$ORACLE"
SQL> desc t
Name Null? Type
ID NUMBER
DESCR VARCHAR2(10)
SQL> grant create session to a identified by a;
Grant succeeded.
SQL> connect a/a
Connected.
SQL> select * from ops$oracle.t;
select * from ops$oracle.t
ERROR at line 1:
ORA-00942: table or view does not exist
John -
Insufficient privs to install OWB as SYSTEM??
When I try to install this OWB in Windows XP with a version 10? DB I am trying to create the first user and install the repos. I get an error as SYSYEM, insufficient privs to run script ....grantpriv.sql
This means SYSTEM does not have sufficient privs...and it tells me does not have SYSDBA privsTo solve this I eventually connected to SqlPlus as SYS and granted SYSDBA to SYSTEM...and now the install has gone thru.....Yeah!!
-
Scheduled shutdown immediate and full database export
Hi all,
The database is Oracle 10g.
How to make a scheduled shutdown immediate and full database export ? I want to use a batch file for it so I can make a sheduled task from the windows control panel everyday at 2 am. So what to write in the batch file because I am a bit new to 10g ?
Thank you very much>
How to make a scheduled shutdown immediate and full database export ? I want to use a batch file for it so I can make a sheduled task from the windows control panel everyday at 2 am. So what to write in the batch file because I am a bit new to 10g ?No, you can't take logical backup after shutdown database.
If you want to schedule the logical backup of your database, just you can refer from here
Schema level
http://mohamedazar.wordpress.com/2010/04/18/datapump-scheduler-for-schema-level/
Full export
http://mohamedazar.wordpress.com/2010/02/16/dbms-scheduler-for-data-pump/ -
I need to develop a scripts that shuts down all databases on a server. One of my databases sometimes hangs after issuing "shutdown immediate" command, and I want to handle this situation in my script. What I am thinking is to add "shutdown abort" in the script if "shutdown immediate" does not work. However, I do not know how to determine the database is hanging during shutdown immediate. Can you advise me on how to handle the shutdown immediate hanging problem in my shell script? Or is there better way to handle this in the script?
Thank you very much for your help!As noted, if your shutdown immediate really hang because of rollback, then my method won't work either. The only different will be Oracle is going to do the rollback at next startup when doing instance recovery. In that case, the startup will appear to be hang.
Check this metalink doc,
What To Do and Not To Do When 'shutdown immediate' Hangs
Doc ID: Note:375935.1
There are cases where shutdown immediate hang because of bug.
Shutdown Immediate Hangs
Doc ID: Note:268884.1 -
If shutdown immediate hangs database waits one hour for shutdown abort
we have schedules cold backup for our 11g database on redhat 5.3.
there is a shell script written with shutdown immediate command.
If database hangs during shutdown immediate database waits one hour for auto shutdown abort.
but this happens once or twice in a month
can we do this auto shutdown abort earlier than one hour ??user13376823 wrote:
we have schedules cold backup for our 11g database on redhat 5.3.
Since you're shutting down the database for cold backup so ensure it should be shutdown properly by shutdown or shutdown immediate cmd not by abort cmd.
Consistent backup:-
A backup taken when the database is mounted (but not open) after a normal shutdown. The checkpoint SCNs in the datafile headers match the header information in the control file. None of the datafiles has changes beyond its checkpoint. Consistent backups can be restored without recovery.
http://docs.oracle.com/cd/B19306_01/backup.102/b14191/rcmconc1.htm#i1007616 -
SunOS 5.8
Database version: 9.2.0.4.0
Customer shutdown database every night for backup the datafiles to disk.
For your information, 2 weeks ago customer moved datafiles to a new disk.
The stoppscript has worked for a week.
And after a week the database will not shutdown.
We did a shutdown abort, and it works for a couple of days.
Now it happend again. The database will not go down.
Can't find any error messages!
Any suggestions?
# stoppscript
. $HOME/.profile
INSTANSER="BALA"
echo
echo "###########################################"
echo "# Startar nedtagning av O R A C L E #"
echo "###########################################"
echo
echo
echo "####### Stoppar LISTENER #######"
echo
$ORACLE_HOME/bin/lsnrctl << EOF
stop LISTENER
exit
EOF
for i in $INSTANSER
do
ORACLE_SID=$i
export ORACLE_SID
echo
echo "##### Stoppar instans - $ORACLE_SID #####"
echo
$ORACLE_HOME/bin/sqlplus /nolog << EOF
connect / as sysdba
shutdown immediate
startup exclusive restrict
shutdown
exit
EOF
done
echo
echo "########################################"
echo "# Slut nedtagning av O R A C L E #"
echo "########################################"
echo
# Alert_log
Tue Sep 5 01:16:48 2006
Shutting down instance: further logons disabled
Shutting down instance (immediate)
License high water mark = 41
Waiting for dispatcher 'D000' to shutdown
All dispatchers and shared servers shutdown
Tue Sep 5 01:16:55 2006
ALTER DATABASE CLOSE NORMAL
Tue Sep 5 01:16:55 2006
SMON: disabling tx recovery
SMON: disabling cache recovery
Tue Sep 5 01:16:56 2006
Shutting down archive processes
Archiving is disabled
Tue Sep 5 01:16:56 2006
ARCH shutting down
ARC0: Archival stopped
Tue Sep 5 01:16:56 2006
ARCH shutting down
ARC1: Archival stopped
Tue Sep 5 01:16:56 2006
Thread 1 closed at log sequence 11287
Successful close of redo thread 1.
Tue Sep 5 01:16:56 2006
Completed: ALTER DATABASE CLOSE NORMAL
Tue Sep 5 01:16:56 2006
ALTER DATABASE DISMOUNT
Completed: ALTER DATABASE DISMOUNT
ARCH: Archiving is disabled
Shutting down archive processes
Archiving is disabled
Archive process shutdown avoided: 0 active
Tue Sep 5 08:15:15 2006
Shutting down instance (abort)I am having similar problem. My server has been up for around 100 days now. And I extensively use XML DB in my code. So, now the DOM memory failed for me, so, I am doing shutdown immediate in the hope that it might fix it ( or atleast start where it is hanging).
Here is a snippet of my alert log file. Can you see where I am stuck at?
Thu Sep 21 14:01:15 2006
Process m001 died, see its trace file
Thu Sep 21 14:01:15 2006
ksvcreate: Process(m001) creation failed
Thu Sep 21 14:28:38 2006
Starting background process EMN0
EMN0 started with pid=19, OS id=2396
Thu Sep 21 14:28:38 2006
Shutting down instance: further logons disabled
Thu Sep 21 14:28:40 2006
Stopping background process CJQ0
Thu Sep 21 14:28:40 2006
Stopping background process QMNC
Thu Sep 21 14:28:42 2006
Stopping background process MMNL
Thu Sep 21 14:28:43 2006
Stopping background process MMON
Thu Sep 21 14:28:45 2006
Shutting down instance (immediate)
License high water mark = 23
Thu Sep 21 14:28:45 2006
Stopping Job queue slave processes
Thu Sep 21 14:28:45 2006
Job queue slave processes stopped
All dispatchers and shared servers shutdown
Thu Sep 21 14:28:55 2006
ALTER DATABASE CLOSE NORMAL
Thu Sep 21 14:28:55 2006
SMON: disabling tx recovery
SMON: disabling cache recovery
Thu Sep 21 14:28:56 2006
Shutting down archive processes
Archiving is disabled
Archive process shutdown avoided: 0 active
Thread 1 closed at log sequence 411
Successful close of redo thread 1
Thu Sep 21 14:29:01 2006
Completed: ALTER DATABASE CLOSE NORMAL
Thu Sep 21 14:29:01 2006
ALTER DATABASE DISMOUNT
Completed: ALTER DATABASE DISMOUNT
ARCH: Archival disabled due to shutdown: 1089
Shutting down archive processes
Archiving is disabled
Archive process shutdown avoided: 0 active
ARCH: Archival disabled due to shutdown: 1089
Shutting down archive processes
Archiving is disabled
Archive process shutdown avoided: 0 active
btw, This is my screen right now.
U:\Rahul\sql>sqlplus sys as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Thu Sep 21 14:28:16 2006
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Enter password:
Connected to:
Oracle Database 10g Release 10.2.0.1.0 - Production
SQL> sho sga
Total System Global Area 436207616 bytes
Fixed Size 1249440 bytes
Variable Size 142610272 bytes
Database Buffers 289406976 bytes
Redo Buffers 2940928 bytes
SQL> shutdown immediate;
Database closed.
Database dismounted.
Ok, when I am writing this post, I came back with this message.
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area 436207616 bytes
Fixed Size 1249440 bytes
Variable Size 142610272 bytes
Database Buffers 289406976 bytes
Redo Buffers 2940928 bytes
Database mounted.
Database opened.
SQL>
Still, any comments would be really appreciated.
Thank you,
Rahul.
P.S - This is a 32 bit windows 2003 server. 10gR2.
Message was edited by:
rputtagunta -
Shutdown immediate hangs and HVM of a database
Hi,
I have following questions,
1. What are the possible causes of SHUTDOWN IMMEDIATE command hangs
and doesnt responds.
2. What do u mean by High Water Mark(HVM) of a database. Because when we
give SHUTDOWN IMMEDIATE command there is message in alert log file
mentioning the HVM of a database.
3.Also is there any relationship between shutdown process taking long time to
shutdown a database and HVM of a database.
4. If the database instance is up for a long time then does it take long time to
shutdown a instance.
Thanks,
Girish AHello,
for 1.) view Metalink Note:375935.1. Maybe you even get an error: "SHUTDOWN: Waiting for active calls to complete". This has nothing to do with HWM but with already logged on sessions. Immediate means new connections are not able to log in, existing connetions are not disconnected at once.
for 2.) the HWM is the highest point to which datafiles have been filled up. This is the value to which you are able to shrink (if you desire to). View Metalink Note:1034330.6 for message "License high water mark" in alert.log at shutdown ("highest number of concurrent users sessions").
Greets,
Hannibal -
Is it safe to control c out of a shutdown immediate?
development database
10.1.0.3
solaris
I did a shutdown immediate and it is taking time to shut down. something is probably running. I should have checked first and could n ot. I tried sqlplus / as sysdba to create another session and 10.1.0.3 is too old to do that while shutting down.,
is it safe to control c out of this shutdown
shutdown abort
startup
shutdowm immediate
startup
or might I corrupt the database?
I need to bounce this irregardless of what is running.Hi Anantha,
slight correction: uncommitted transactions are not rolled back during the shutdown abort. But they are rolled back during the next startup of the instance during the crash recovery phase. So at the end, the database looks exactly the same as after a shutdown immediate-startup sequence. That is, if you have all the online logfiles in place needed for the crash recovery.
Kind regards
Uwe -
Exception caused by 'shutdown immediate'
Hi,
I am using a PL/SQL to delete or update tables.
When Oracle is issued with 'Shutdown immediate' or 'Shutdown abort' or if Oracle is abruptly shutdown, I have to rollback the transactions. Although, I have not written a rollback command, Oracle automatically rolls back. This is the desired behaviour. This happens as desired in my machine. In Production environment, I believe the shutdown has thrown an exception. The logic I had entered in the exception block where we update an error table is visible in the Production environment. I could not recreate this exception in my system. I am not sure what exception Oracle throws on abrupt shutdown. So, I plan to write an exception block as a precaution. Do you please know what exceptions are possible ones if there is a abrupt shutdown.
Regards,
Raj> Do you please know what exceptions are possible ones if there is a abrupt shutdown.
There is no exception thrown.
SHUTDOWN ABORT is like disconnecting the power cord & no subsequent action occurs. -
Hi,
On our database there is too many job which running every 10 sec, and other each minute (but this job run for 10 minutes !).
I would like to stop database, but how will work the command shutdown immediate ? It will wait the end of each job ? And for job which execute with 10 minutes of delay ?
Nicolas.IMMEDIATE
Does not wait for current calls to complete or users to disconnect from the database.
Further connects are prohibited. The database is closed and dismounted. The instance is shutdown and no instance recovery is required on the next database startup.
Joel Pérez
http://www.oracle.com/technology/experts
Maybe you are looking for
-
How to display data in table with dynamic rows, section wise in a page.
Hello all, I work on report creation in BI Publisher where I need to display data from xml in a table in pdf format.The output page is divided into two vertical sections , containing tables, with exactly same columns on left and right sections. The n
-
Can't find the wine menu anymore :(
Hi, I've been playing around with my Wine menu, and somehow managed it, to remove it. Unfortunately I can't get it back again now . Beforehand every windows setup that has installed start menu entries has created its entried in the "Applications -> W
-
Can't see you tube videos: why?
can you help me please? I downloaded last Avobe version (Adobe Flash Player 11 ActiveX - 11.4.402.287) but i still can't see some youtube videos. What else have i to do? Thanks
-
How to group alter photo's from iPhone in iPhoto
I took a lot of photo's on my iPhone and accidentally had one of the filters incorrectly and they all came out yellow. I can easily fix it by going into the camera, hitting edit, filters and then adjusting to none. Does anyone know how I can do e
-
Crystal Reports Server XI - what files need to be backed up?
I don't want to set up a fail over cluster which there seems to be plenty of information on. All I want to do is identify what files I need to backup incase I need to do a restore. We use Tivoli Storage Manageru2019s backup and recovery solution for