Executing alter system enable restricted session on RAC nodes

alter system enable restricted session command enables restricted mode only on the node on which it runs. I need that all nodes entering this node after executing this statement.
Please help.

Something like this using ssh and ksh:
export db_name=<your database name as appears in crs_stat>
srvctl status database -d ${db_name} | while read a inst b c d e node
do
ssh -f $node "print $inst | . oraenv; print 'alter system enable restricted session;' | sqlplus / as sysdba"
done
or you using dbms_job (old but easer to tie to instance than dbms_scheduler):
declare
job binary_integer;
begin
for i in (select inst_id from gv$instance)
loop
dbms_job.submit (
job=>job,
what=> 'begin execute immediate ''alter system enable restricted session''; end;',
instance=>i.inst_id
commit;
end loop;
end;
/

Similar Messages

  • Abend while executing alter system kill session command

    I have a ML350 G3 Hp server(Xeon 2.4 Ghz) running oracle 8.1.5 on Novell 5.1. Frequently i have locking problems in my software. So when i tried to kill the active session using alter system kill session 'sid, serial#' my server produce following error:
    Fatal Exception (Number 14, cause abend: Page fault running process: orcl_000000fe code executing in module core81.nlm v8.1d at offset +6c490h). Any suggestions.

    This forum is for posting feedback about the OTN site.
    The best place for your question is probably a Database forum.
    There is a list of Database forums here:
    http://forums.oracle.com/forums/index.jsp?cat=18

  • Can I execute "Alter System Disconnect Session" in a OLE VB Script?

    Will this work? If not - How to do it?
    The speadsheet contains a list of sid's and serial#. I want to highlight a cell containing a username, then run the kill session macro on it.
    Sub Kill_Session()
    Dim KillStatement As Object
    DBPassword = "uuuu/pppppppp"
    DatabaseName = "dddd"
    Set objSession = CreateObject("OracleInProcServer.XOraSession")
    Set objdatabase = objSession.opendatabase(DatabaseName, DBPassword, 0&)
    objdatabase.Parameters.Add "SERIAL", 0, 2
    objdatabase.Parameters("SERIAL").ServerType = 1
    objdatabase.Parameters.Add "SID", 0, 2
    objdatabase.Parameters("SID").ServerType = 1
    Inputdata = ActiveCell.Value
    RowNo = ActiveCell.Row
    objdatabase.Parameters("SERIAL").Value = Worksheets("Sheet1").Cells(RowNo, 13)
    objdatabase.Parameters("SID").Value = Worksheets("Sheet1").Cells(RowNo, 12)
    Set OraSqlStmt = objdatabase.CreateSQL("ALTER SYSTEM DISCONNECT SESSION ':SID, :SERIAL' IMMEDIATE;", 0&)
    MsgBox objdatabase.Parameters("SID").Value
    MsgBox objdatabase.Parameters("SERIAL").Value
    objdatabase.Parameters.Remove ("SERIAL")
    objdatabase.Parameters.Remove ("SID")
    End Sub

    on 10gR1/10gR2, you can not use
    ALTER SYSTEM KILL SESSION ‘115,9779,@1';that start from 11gR1
    Only
    * For integer1, specify the value of the SID column.
    * For integer2, specify the value of the SERIAL# column.
    ALTER SYSTEM KILL SESSION ‘115,9779';http://download.oracle.com/docs/cd/B14117_01/server.101/b10759/statements_2013.htm#SQLRF00902
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_2013.htm#SQLRF00902
    You may use crontab to help ....
    Example about blocking (SID):
    select 'ALTER SYSTEM KILL SESSION ''' ||sid||','||serial#|| ''' IMMEDIATE;' from gv$session s where sid in (
    select distinct(l1.sid) from
    gv$lock l1, gv$lock l2
    where l1.block = 1 and l2.request > 0
    and l1.id1=l2.id1
    and l1.id2=l2.id2
    ) AND INST_ID = (select INSTANCE_NUMBER from v$instance )and ....
    Good Luck

  • "Alter system set command" in a RAC database!!

    Hi, all.
    The database is (10.2.0.2.0) 2- node RAC database on 32-bit windows 2003
    EE SP1.
    I issued the following command on Node 1 database.
    --> Alter system set db_block_buffers= xxx sid='rac1';
    I was able to see "PE enqueue" in top 5 wait event section from an AWR report.
    In addition, I was able to find "PZ99","PZ98" process dump file in BDUMP.
    Soon later, I could find CKPT and DBWR hung.
    Is there anyone who experienced this issue?
    Thanks and Regards.
    Message was edited by:
    user507290

    10.2.0.2 has some bug which is fixed 10.2.0.3
    You check sequence cache. If it has less value, increase it to 10000.
    select CACHE_SIZE from dba_sequences where SEQUENCE_OWNER='SYS' and SEQUENCE_NAME='AUDSES$';
    SQL> alter sequence sys.audses$ cache 10000;
    Ashok

  • How to execute 'alter system....' in PL/SQL

    How can i execute a SQL of system control such as "alter system ...." in my form
    application?
    Thanks in advance!

    Hi,
    Try using the builtin forms_ddl.
    For example:
    forms_ddl('alter system ....');
    You can use this in any procedure or trigger you want.
    Hope this helps!

  • Regarding Alter System Kill Session

    Hi Guys,
    I have to do db refresh from the build .For this I have to kill the sessions and drop the users and recreate the users with the latest build.As the application is running and there are some idle sessions, I have to kill the sessions and drop the users for that I am using a code as below
    DECLARE
    v_alt_stmt VARCHAR2(1000) := 'ALTER SYSTEM KILL SESSION ''';
    v_kill_stmt VARCHAR2(1000);
    CURSOR cur_session IS
    SELECT s.type type,
    s.sid sid,
    s.serial# srl_no,
    s.username user_name,
    s.PROGRAM prog_name
    FROM v$session s JOIN gv$process p ON p.addr = s.paddr and s.type='USER';
    BEGIN
    EXECUTE IMMEDIATE 'ALTER SYSTEM ENABLE RESTRICTED SESSION';
    DBMS_OUTPUT.PUT_LINE('The Session has been put in the restricted mode');
    FOR v_cur_ssn IN cur_session
    LOOP
    BEGIN
    v_kill_stmt := v_alt_stmt || v_cur_ssn.sid || ',' || v_cur_ssn.srl_no || '''';
    DBMS_OUTPUT.PUT_LINE(v_kill_stmt);
    EXECUTE IMMEDIATE v_kill_stmt;
    EXCEPTION
    WHEN others THEN
    -- DBMS_OUTPUT.PUT_LINE('The current sessions sid is ' || v_cur_ssn.sid || ' and the srl no is ' || v_cur_ssn.srl_no || ' can not be killed');
    END;
    END LOOP;
    EXECUTE IMMEDIATE 'ALTER SYSTEM DISABLE RESTRICTED SESSION';
    DBMS_OUTPUT.PUT_LINE('The restricted mode of the system has been removed');
    END;
    But sometimes after killing the sessions there are some os processes are going on,to avoid that I have to use 'ALTER SYSTEM DISCONNECT SESSION ''' and 'MMEDIATE' it is workig fine .
    Can Any one tell me the logical difference between kill sessions and disconnect
    Any information will be highly appreciated.
    Thanks in advance
    Prafulla

    >
    Can Any one tell me the logical difference between kill sessions and disconnect
    >
    Disconnect can be used to disconnect immediately without waiting for any ongoing transactions to complete and recovers all session resousrces.
    Kill rolls back ongoing transactions and partially recovers session resources.
    Kill is simiilar to SHUTDOWN IMMEDIATE while disconnect is more like SHUTDOWN ABORT.
    See DISCONNECT SESSION Clause in the SQL Language doc
    http://docs.oracle.com/cd/B28359_01/server.111/b28286/statements_2013.htm
    >
    Use the DISCONNECT SESSION clause to disconnect the current session by destroying the dedicated server process (or virtual circuit if the connection was made by way of a Shared Sever).
    •The IMMEDIATE setting disconnects the session and recovers the entire session state immediately, without waiting for ongoing transactions to complete.
    >
    And KILL SESSION in the same doc next section
    >
    The KILL SESSION clause lets you mark a session as terminated, roll back ongoing transactions, release all session locks, and partially recover session resources.
    IMMEDIATE Specify IMMEDIATE to instruct Oracle Database to roll back ongoing transactions, release all session locks, recover the entire session state, and return control to you immediately.

  • Restricted session privilege in 9i and 10g

    We recently upgraded from 9.2.0.7 to 10.2.0.3. Oracle 9i allowed a user with RESTRICTED SESSION priv to connect (sqlplus user /@db) when the database was in restricted mode as it should. However, our Oracle 10g database will not allow a user with RESTRICTED SESSION privilege to log in after 'alter system enable restricted session' is executed. The DBA role does not work nor does granting the system privs CREATE SESSION and RESTRICTED SESSION directly to the user. The error I get when trying to log on is ORA-12526. Any advice on how to remedy this would be much appreciated.
    what is the alternative to achieve the same in 10g other than locally?
    Thanks,
    Vishal

    From 10g doc (Oracle® Database Administrator's Guide):
    Typically, all users with the CREATE SESSION system privilege can connect to an open database. Opening a database in restricted mode allows database access only to users with both the CREATE SESSION and RESTRICTED SESSION system privilege. Only database administrators should have the RESTRICTED SESSION system privilege. Further, when the instance is in restricted mode, a database administrator cannot access the instance remotely through an Oracle Net listener, but can only access the instance locally from the machine that the instance is running on.

  • Alter system trigger - substitution

    Hello.
    By the documentation, there is restriction for trigger on alter command: "The trigger will not be fired by an ALTER DATABASE statement".
    I'm trying to use BEFORE SHUTDOWN and AFTER STARTUP triggers to database and I'd need also cover situations:
    - alter system quiesce restricted
    - alter system suspend
    - alter system enable restricted session
    - alter system unquiesce
    - alter system disable restricted session
    - alter system resume
    I'm using ALTER SYSTEM command (not ALTER DATABASE), but trigger isn't fired too. Is there any way how to catch and do some PL/SQL pre/post processing events described above?
    Thanks.

    Oracle Version ?
    if ur on 10.x.x.x.x
    Check
    sql> select space_limit/1024/1024 "Limit MB",round(space_used/1024/1024) "Used MB"
    2* from v$recovery_file_dest
    SQL> /
    Limit MB Used MB
    2048 1681
    If limit and used field equal then increase db_recovery_file_dest_size parameter size
    SQL> show parameter db_recovery_file_dest_size
    NAME TYPE VALUE
    db_recovery_file_dest_size big integer 2G
    SQL> alter system set db_recovery_file_dest_size = 3g;
    System altered.
    Also check below link.
    >>>Re: Switch logfile hangs
    [b]>>>SQL> alter system switch logfile;

  • Restricted Sessions

    I set the database to be in restricted session by issuing alter system enable restricted session and then tried to login with a userid that has restricted session privileges and I get ora-12526. We just upgrade from 9.2.0.6 to 10.2.0.3 and I know in 9.2.0.6 I was able to do this without any issues. Does anyone know if I need to do anything different in 10.2.0.3 to make this work?

    It is an expected behavior:
    lsnrctl status
    Service "orcl.us.oracle.com" has 1 instance(s).
      Instance "orcl", status RESTRICTED, has 1 handler(s) for this service...
    Service "orclXDB.us.oracle.com" has 1 instance(s).
      Instance "orcl", status RESTRICTED, has 1 handler(s) for this service...
    The command completed successfully
    f:\Oracle\Consulting>sqlplus system/manager@localhost:1521/orcl.us.oracle.com
    SQL*Plus: Release 11.1.0.4.0 - Beta on Fri Jan 25 11:06:53 2008
    Copyright (c) 1982, 2007, Oracle.  All rights reserved.
    ERROR:
    ORA-12526: TNS:listener: all appropriate instances are in restricted modeYou should perform the connect operation directly at the host.
    ORA-12526: TNS:listener: all appropriate instances are in restricted mode
    Cause: Database instances supporting the service requested by the client were in restricted mode. The Listener does not allow connections to instances in restricted mode. This condition may be temporary, such as during periods when database administration is performed.
    Action: Attempt the connection again. If error persists, then contact the database administrator to change the mode of the instance, if appropriate.
    ~ Madrid

  • DMU 2.0 Disable Restricted session

    I've just run a conversion from win-1252 to al32utf8 and we noticed that restricted session was not disabled after the conversion had finished. Is this is known bug? I shut the GUI down before I noticed, but there is nothing in the dmu0.log to show that this was attempted.
    On dmu1.1 and 1.2 This was never an issue - the conversion would finish disable restricted session: e.g.
    18.14:22:28:764;V003;T;05000 SQL text is UPDATE SYSTEM.DUM$COLUMNS DC SET DC.DCCS_ID = 0 WHERE DC.DCCS_ID > 0;
    18.14:22:28:764;V002;T;05000 SQL text is ALTER SYSTEM DISABLE RESTRICTED SESSION;
    18.14:22:28:811;V003;T;05000 SQL text is UPDATE system.dum$sqltext SET time_end=SYS_EXTRACT_UTC(systimestamp), sqlcode=0 WHERE step# = 560 AND obj#= 0 AND order# = 563;
    18.14:22:29:061;V002;T;05000 SQL text is UPDATE system.dum$sqltext SET time_end=SYS_EXTRACT_UTC(systimestamp), sqlcode=0 WHERE step# = 560 AND obj#= 0 AND order# = 564;
    18.14:22:29:452;V001;T;05000 SQL text is UPDATE system.dum$sqltext SET time_end=SYS_EXTRACT_UTC(systimestamp), sqlcode=0 WHERE step# = 560 AND obj#= 284929 AND order# = 562;
    18.14:22:29:483;V000;F;45010 Thread 2, connection 2 finished converting post-conversion POST_CONVERSION, and elapsed time is 00:00:00.406.
    18.14:22:29:483;V000;C;05007 About to close connection to jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=x)(PORT=1521))(CONNECT_DATA=(UR=A)(SERVICE_NAME=xxx))).
    18.14:22:29:483;V000;T;05000 SQL text is SELECT USERENV('SID') FROM DUAL;
    18.14:22:29:499;V000;T;05000 SQL text is SELECT s.SERIAL# from v$session s where s.sid = (SELECT USERENV('SID') FROM DUAL);
    18.14:22:29:499;V000;C;05006 Connection ID is 2, session ID is 2840, serial number is 439.
    18.14:22:29:514;V000;C;00001 Disconnected successfully from jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=x)(PORT=1521))(CONNECT_DATA=(UR=A)(SERVICE_NAME=xxx))).
    18.14:22:29:514;V000;F;45010 Thread 3, connection 3 finished converting post-conversion POST_CONVERSION, and elapsed time is 00:00:00.156.
    18.14:22:29:514;V000;C;05007 About to close connection to jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=x)(PORT=1521))(CONNECT_DATA=(UR=A)(SERVICE_NAME=xxx))).
    18.14:22:29:514;V000;T;05000 SQL text is SELECT USERENV('SID') FROM DUAL;
    18.14:22:29:514;V000;T;05000 SQL text is SELECT s.SERIAL# from v$session s where s.sid = (SELECT USERENV('SID') FROM DUAL);
    18.14:22:29:530;V000;C;05006 Connection ID is 3, session ID is 3, serial number is 13.
    18.14:22:29:546;V000;C;00001 Disconnected successfully from jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=xxx)(PORT=1521))(CONNECT_DATA=(UR=A)(xxx))).
    18.14:22:29:546;V000;F;45010 Thread 1, connection 1 finished converting post-conversion POST_CONVERSION, and elapsed time is 00:00:00.781.
    18.14:22:29:546;V000;C;05007 About to close connection to jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=x)(PORT=1521))(CONNECT_DATA=(UR=A)(SERVICE_NAME=xxx))).
    18.14:22:29:546;V000;T;05000 SQL text is SELECT USERENV('SID') FROM DUAL;
    18.14:22:29:546;V000;T;05000 SQL text is SELECT s.SERIAL# from v$session s where s.sid = (SELECT USERENV('SID') FROM DUAL);
    18.14:22:29:561;V000;C;05006 Connection ID is 1, session ID is 2363, serial number is 157.
    18.14:22:29:561;V000;C;00001 Disconnected successfully from jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=x)(PORT=1521))(CONNECT_DATA=(UR=A)(SERVICE_NAME=xxx))).
    18.14:22:29:561;V000;I;40005 Execute Post-Conversion Tasks elapsed 00:00:47.843.
    But in my 2.0 migration I had this:
    23.16:39:08:919;V001;T;05000 SQL text is UPDATE SYSTEM.DUM$COLUMNS DC SET DC.DCCS_ID = 0 WHERE DC.DCCS_ID > 0;
    23.16:39:08:934;V001;T;05000 SQL text is UPDATE system.dum$sqltext SET time_end=SYS_EXTRACT_UTC(systimestamp), sqlcode=0 WHERE step# = 560 AND obj#= 0 AND order# = 1;
    23.16:39:08:950;V000;F;45010 Thread 1, connection 1 finished converting post-conversion OBJECT_REBUILD, and elapsed time is 00:00:00.250.
    23.16:39:08:950;V000;C;05007 About to close connection to jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=x)(PORT=1521))(CONNECT_DATA=(UR=A)(SERVICE_NAME=xxx))).
    23.16:39:08:950;V000;T;05000 SQL text is SELECT USERENV('SID') FROM DUAL;
    23.16:39:08:966;V000;T;05000 SQL text is SELECT s.SERIAL# from v$session s where s.sid = (SELECT USERENV('SID') FROM DUAL);
    23.16:39:08:966;V000;C;05006 Connection ID is 1, session ID is 682, serial number is 31.
    23.16:39:08:981;V000;C;00001 Disconnected successfully from jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=x)(PORT=1521))(CONNECT_DATA=(UR=A)(SERVICE_NAME=xxx))).
    23.16:39:08:981;V000;I;40005 Execute Post-Conversion Tasks elapsed 00:13:01.292.
    This migrations are on two different databases at different time, but both are on the same Oracle version
    > select * from v$version;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    PL/SQL Release 11.2.0.3.0 - Production
    CORE    11.2.0.3.0      Production
    TNS for 64-bit Windows: Version 11.2.0.3.0 - Production
    NLSRTL Version 11.2.0.3.0 - Production
    My Log File Message Level is FINEST
    Please let me know it there is any more useful diagnostic information in the log files that I can post.
    Thanks,
    Ben

    To add to Weiran's answer: We have removed disabling the restricted session so that nobody except SYSDBA can connect to the database before it is restarted. The instance restart automatically disables the restricted session (unless you explicitly open the database in restricted session mode).
    We request the instance to be restarted as precaution because it is very difficult to guarantee in such a complex system as Oracle Database that the old (stale) database character set information is not cached somewhere in SGA by some existing or future component.
    Note, the instance restart in Oracle Database 12c is required for non-CDB databases only. PDB databases need to be closed and reopened. The CDB instance itself does not have to be restarted.
    The documentation may not talk about it yet. We will fix it.
    Thanks,
    Sergiusz
    Message was edited by: Sergiusz Wolicki (Oracle)

  • ALTER SYSTEM KILL SESSION privilege

    Hi All,
    Is there any possibility to use this command from a without having DBA priviileges, what is the privilege to be grantd to the ordinary users to execute ALTER SYSTEM KILL SESSION... statement..
    Thanks in advance

    The procedure proposed by Rusell would be more or less so:
    SQL> create or replace procedure kill_session
      2  ( v_sid number, v_serial number )
      3  as
      4  v_varchar2 varchar2(100);
      5  begin
      6  execute immediate 'ALTER SYSTEM KILL SESSION '''
      7  || v_sid || ',' || v_serial || '''';
      8  end;
      9  /
    Procedure created.
    SQL> select username, sid, serial# from v$session;
    USERNAME                              SID    SERIAL#
                                          147       5078
    SYS                                   148       6161
                                          151       6769
                                          156          1
                                          158          1
                                          159          1
    REPOS_OWNER                           161      14502
                                          163          1
                                          164          1
                                          165          1
                                          166          1
    USERNAME                              SID    SERIAL#
                                          167          1
                                          168          1
                                          169          1
                                          170          1
    15 rows selected.
    SQL>
    SQL> exec kill_session(161,14502);
    PL/SQL procedure successfully completed.
    SQL>Joel Pérez
    http://otn.oracle.com/experts

  • Alter system or alter session set events

    Can we use interchangeably alter session or alter system set events?
    Thank you.

    DBA-ES wrote:
    For example this statement
    alter session set events '8103 trace name errorstack level 3';
    Can it be done at the system level? How to check it?Sure it can be,
    SQL*Plus: Release 11.2.0.1.0 Production on Fri Oct 21 15:32:54 2011
    Copyright (c) 1982, 2010, Oracle.  All rights reserved.
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    SQL> alter session set events '8103 trace name errorstack level 3';
    Session altered.
    SQL> alter system set events '8103 trace name errorstack level 3';
    System altered.
    SQL>And to check, for the alter system , the statement would be logged in the alert log,
    Fri Oct 21 15:31:46 2011
    OS Pid: 4656 executed alter system set events '8103 trace name errorstack level 3'
    D:\app\aristadba\diag\rdbms\orcl112\orcl112\trace>sqlplus / as sysdbaHTH
    Aman....

  • Kill session in rac on other node

    I need sql that kills all sessions at all nodes
    version ORACLE 10gR2
    what to do?

    You could use the same approach as for enabling restricted session.
    declare
    job binary_integer;
    inst_id number := '&inst_id';
    sid number := '&sid';
    serial number := '&serial';
    begin
    dbms_job.submit (
    job=>job,
    what=> 'begin execute immediate ''alter system kill session ''''' || sid || ',' || serial || '''''; end;',
    instance=>inst_id
    commit;
    end;
    or you can drive it from gv$session by some criteria, e.g.
    for s in (select inst_id, sid, serial# from gv$session whre username = '&bad_user')
    loop
    dbms_job.submit (
    job=>job,
    what=> 'begin execute immediate ''alter system kill session ''''' || i.sid || ',' || i.serial# || '''''; end;',
    instance=>i.inst_id
    end loop;
    ...

  • Restricted session & Kill Session

    Hello everybody,
    1) In which case do I need enabled restricted sessions?
    2)Where “ALTER SYSTEM KILL SESSION” command will be useful?
    Thanks in advance

    Salman Qureshi wrote:
    Hi,
    1) In which case do I need enabled restricted sessions?Whenever you want to perform some maintenance operations in your database and you don't want anyone to access the database except user SYS, you can enable restricted session.
    2)Where “ALTER SYSTEM KILL SESSION” command will be useful?When you want to kill a session which is no longer responding or hung or doing some long running operation which is disturbing your performance or you want to stop that processing etc.
    SalmanHi Salman,
    I think you'll find that "restricted session mode" does not limit login ability to only the SYS user as you mention.
    As an example, consider the following.
    Session 1:
    SQL*Plus: Release 11.2.0.3.0 Production on Tue Jan 1 22:07:03 2013
    Copyright (c) 1982, 2011, Oracle.  All rights reserved.
    SQL> connect / as sysdba
    Connected.
    SQL> shutdown immediate;
    Database closed.
    Database dismounted.
    ORACLE instance shut down.
    SQL> startup restrict;
    ORACLE instance started.
    Total System Global Area 2137886720 bytes
    Fixed Size                  2256912 bytes
    Variable Size            1258295280 bytes
    Database Buffers          872415232 bytes
    Redo Buffers                4919296 bytes
    Database mounted.
    Database opened.
    SQL>Session 2:
    SQL*Plus: Release 11.2.0.3.0 Production on Tue Jan 1 22:07:51 2013
    Copyright (c) 1982, 2011, Oracle.  All rights reserved.
    SQL> connect markwill
    Enter password:
    Connected.
    SQL> select logins from v$instance;
    LOGINS
    RESTRICTED
    1 row selected.
    SQL>As you can see in Session 2 I am clearly not connecting as SYS user, yet I am capable of connecting to an instance started in restricted mode.
    Rather than limiting to only user SYS it limits login ability to users with the RESTRICTED SESSION System Privilege (granted directly or via role).
    Regards,
    Mark

  • Controversy regarding "restricted session" mode

    Hi,
    I am preparing for OCP (DBA F1) exams and have read couple of books for that. But found the following quite controversial.
    One book states that, The OSOPER and SYSOPER privilege enables you to change database access to "restricted session" mode.
    While another book states that only SYSDBA privilege enables you to change database access to "restricted session" mode.
    Same is the case with "alter database backup controlfile" and "alter database [begin | end] backup".
    I am quite confused because of this controversy and was wondering what should I do if I encounter a question regarding this in my exams.
    Please guide.
    latin.

    With sysoper privileges (enabled by way of OSOPER os group, or some other way) on a 9.2 system I could do 'startup restrict' but were not allowed to use alter system enable/disable restricted session commands. In fact no alter system ... command, since this would require the system privilege 'alter system'.
    Sysoper authorization allows alter database backup controlfile to...
    What can we learn from this? When learning the database, you should practice on it! Not only when you're feeling confused. Try a lot. If you think it is easy enough not to try it, you are probably missing something. Practice also let's you pick up goodies along the way.
    Good luck with the exam! :)

Maybe you are looking for

  • How to find Application Support from external hard drive backup.

    I have an external hard drive which I used with time machine to backup my old computer. I've got a new Mac now, and I want to restore the Skype chat logs to my current computer. To do this I need to find the correct Application Support folder which c

  • Flex 4 - HGroup with a border

    How can I do it? Thanks

  • Changing sync settings erases iPod contents

    When I upgraded to iTunes 7 the following problem came with it: Choose my sync settings Click Apply Wait for hours as my entire music library (50GB) syncs to my iPod. Change a syn setting (for example, choose to just sync one playlist instead of all

  • Solaris  Time setting

    Hello, I am using Solaris 10 x86.In pakistan govt fwd time to 1 hour for day light saving.I have to set the system time how can I do so?My SMC is not running and giving problem so I can't change system time/date from there.My system is independent an

  • Search in the Help menu

    Since upgrading to Leopard I've been a) mystified by the point of the Search function in the Help menu b) increasingly frustrated by how it gets in the way of what I want to do Perhaps I'm missing the point and someone can set me straight! The Help m