SYS user connects at database level, is it correct?

My senior colleague has given me following information about the sys user. I want to know, is it correct?
Since SYS user connects at the database level, therefore, on killing the active session of the SYS user,only the current statement is cancelled. The database session does not disconnect. Instead it continues to run the remaining statements in the script file in case we are running a script file containing a lot of SQL statements.
Moazzam

Moazzam wrote:
My senior colleague has given me following information about the sys user. I want to know, is it correct?
Since SYS user connects at the database level, therefore, on killing the active session of the SYS user,only the current statement is cancelled. The database session does not disconnect. Instead it continues to run the remaining statements in the script file in case we are running a script file containing a lot of SQL statements.Running a SQL script very likely means SQL*Plus is used. One of two types of Oracle sessions will be created via sqlplus. A dedicated session. Or a shared server session.
A dedicated session can also be local (sqlplus connects "directly" to the dedicated server process), or remote (sqlplus connects via tcp/ip to the dedicated server process).
A server session is usually "killed" using the alter system kill session command. Despite the differences between shared and dedicated server connections, the end result is the same. The session terminates abnormally (session UGA will be released, session will be cleaned up, rolled back, etc) - and the session ceases to exist.
So irrespective of how that sqlplus session runs that script - the session, when killed, will cause a sqlplus failure. And no subsequent script commands would be executed by that Oracle session.
What can happen is that sqlplus continues running, continues reading the script, and continues submitting commands to be executed. However, with the server session killed, there is no server process to service the commands submitted by the sqlplus client. In this case, sqlplus will throw the error "+SP2-0640: Not connected+" after each of the commands it tries to execute after the server session was killed.
The only time when sqlplus will be able to continue is when the session is not killed, but interrupted. The Oracle Call Interface (OCI) supports a OCIBreak() call - allowing the client to interrupt-and-abort the request that its server session is currently executing.
For example, sqlplus sends a OCIBreak() while it waits for a server response (e.g. waiting for the answer to a SQL select query), when the user presses Ctrl-Break to abort that request.
In this case, the session still exists - and the client can issue a new request that the session will service. But an OCIBreak() cannot be triggered (to my knowledge) externally from another Oracle session. You need to send the client process a "break request" (like a Ctrl-Break keystroke) in order to trigger that client process to make an OCIBreak() call to Oracle and interrupt its server process.

Similar Messages

  • How to find the number of users  connected to database from OS level(Linux)

    Hi All,
    Could anyone know , how to find the number of users connected to database without connecting with sql*plus
    is there any command to find it?
    example we have 10 databases in one server, how to find the number of users connected to particular database without connecting to database(v$session)?
    oracle version:- 10g,11g
    Operating System:- OEL4/OEL5/AIX/Solaris
    any help will be appreciated.
    Thanks in advance.
    Thank you.
    Regards,
    Rajesh.

    Excellent.
    Tested, works as long as you set the ORACLE_SID first ( to change databases )
    ps -ef | grep $ORACLE_SID | grep "LOCAL=NO" | awk '{print $2}' | wc -l
    Thanks!
    select OSUSER
        from V$SESSION
    where AUDSID = SYS_CONTEXT('userenv','sessionid')
        and rownum=1;Best Regards
    mseberg

  • How to change password of sys user connected as sysdba?

    How to change password of sys user connected as sysdba?
    I have connected with user name sys as sysdba in oracle 9i with password oracle.
    I want to change the password . I typed password and pressed entered. It asks me to type old password, then new password and retype the new password. When I press enter it gives error message "ERROR:
    ORA-28008: invalid old password"
    Password unchanged.
    does anyone know about this...? how to change the password..?

    You may be using operating system authentication to log in as sys with sysdba privileges.
    By using password utility, you can change the password of sys user (which is in database) which is "change_on_install" when you create a database.
    You can change this password.

  • Is OEM 10g functional withou SYS user connection?

    Hi,
    By our policies we don't have remote sys connectrion. However, many OEM operations have some configuration that requires SYS login. How do I go about it?
    Thanks!
    Alex

    <<By our policies we don't have remote sys connection.>>
    Do you mean that you should not use the user 'sys' to connect to the database from a remote location?
    If that is the case, you may be able to make use of the SYSDBA and SYSOPER system privileges. What is your initialization parameter 'remote_login_passwordfile' set to?
    The following link may be of help.
    http://download-west.oracle.com/docs/cd/B13789_01/server.101/b10739/dba.htm#sthref74

  • To trace the users connecting to database

    Hi ,
    can any body help me on tracing the users who are connected to a database at a particular period of time.?
    thanks

    soundar wrote:
    these details on the audit where it gets recorded..?
    it's in audit trail file in the same directory as background process trace files or some where else..?It depends on the setting. If it is set to DB then it will be sent to the SYS.AUD$ table. This table doesn't need to be accessed directly. You can use the DBA_AUDIT_TRAIL view to get a more friendly look at the audit information.
    If it is set to OS it will go to the operating systems audit trail.
    It may be worth it to look at the documentation :)
    [Initialization Parameters: AUDIT_TRAIL|http://download.oracle.com/docs/cd/A84870_01/doc/server.816/a76961/ch111.htm]

  • Users connected to database-check

    Just a basic question, looking for sql command to check which users are connected & active/inactive at the database.

    This query will give you all the information like os process id, what is the session program machine from which session started. session start time etc. session status
    column sid format 9999
    column serial# format 999999
    column username format A9
    column schemaname format A8
    column osuser format a15
    column machine format a20
    column terminal format a10
    column LOGONDATE format a20
    col program for a12
    select a.sid, a.serial#, b.spid, substr(a.program,1,12) Program, a.username,to_char(a.logon_time,'DD-MM HH24:MI:SS') LogonDate, a.osuser, a.machine, a.status
    from v$session a, v$process b where a.paddr = b.addr AND A.USERNAME IS NOT NULL
    order by status,osuser

  • Users connected to database

    Hi,
    How can we find who are the users currently using/connected to the database?
    Regards
    Balu.

    BalaKrishna Reddy Avuthu wrote:
    Thanks guys it is working........
    Thank you very much.
    I would like to find out the SID name/Connection string too.
    Where do I get it?
    Balu.
    Edited by: BalaKrishna Reddy Avuthu on Apr 11, 2009 5:04 PMNow that you know about the v$session and gv$session views, you could do some further research on your own. Go to tahiti.oracle.com, drill down to your product and version, the take a look at the Reference Manual. It will detail the entire data dictionary. Just look down through the list of v$ (or gv$) views for stuff that looks likely to have what you are looking for, then read up on those views.

  • Not able to trace sys user connection from which node  in audit

    We have got one user who is accessing as sysdba and cannot be traced where the connection has come.
    List of unique users logged successfully into SQLPLUS as SYSDBA
    CLIENT USER: , STATUS: 0
    Regards
    Naga

    We get the information from Audit of our production.
    Someone accessing the production from client/desktop whose session is not traceable. Is there a way to trace the information who accessed it.
    we are on 9.2.0.8 database

  • [BO XI 3.0] - Connection to database "BusinessObjects credential mapping "

    Hello,
    I have an strange issue regarding database connection. Users connect to database with database U and P. So in CMC we select "Enable Data Source Credentials for Business Objects Universes" and enter U and P to connect to database. In universe we choose "Use BusinessObjects credential mapping" and when we test it the server is responding. We create Deski report and we get the data from database. We publish this report to repository and when we want to refresh we get an error "SetPrompts failed - invalid username/password.....", then we convert this document in webi report and works fine
    Any suggestions?
    Configuration:
    - MS windows server 2003 with SP2
    - BO XI 3.0 with FP1 and FP2
    - Oracle database 10gR2 (also test with 9i)
    Regards,
    Gregor

    This is a BUG. You must install Fix pack 3 and works fine!
    Regards,
    Gregor

  • Reset SAP* user in DB2 database

    hi gurus,
    Can anyone give me instructions or commands on how to reset sap* password in the database level? we are using db2 ver. 9 database. I am familiar how it is being done in oracle but one of our client is using DB2 and there, we encountered the problem.
    Pls. advise.
    Best regards,
    Jay

    Hi
    First make sure that the parameter
    <b>login/no_automatic_user_sapstar is set to 0 (false)</b>
    otherwise you will not be able to login using SAP* by the default password "<b>pass</b>". So make this sure before carrying out the following activity:
    Log on to the database with userid <b>ora<sid></b> and
    execute the following SQL:
    <b>delete from sap<SID>.usr02 where bname='sap*' and mandt='XXX';</b>
    <b>commit;</b>
    Once this is done check the entry again in the table usr02.
    Now try to log into the corresopnding client with user "<b>sap*</b>" and password "<b>pass</b>".
    This is how you can reset SAP* user at the database level.
    Regards,
    Sumit

  • Reg: Error while connecting to a remote database as SYS user.

    Hello all,
    When i try to connect to a database as SYS user i'm getting the error as
    ora-01017 invalid username/password logon denied
    But it is logging from the local system where the oracle is installed.
    I created the password file and checked the contents in v$pwfile_users.
    The result is " no rows selected".
    so when i try to grant sysdba to sys user
    grant sysdba to sys;
    i'm getting error as,
    ORA-01994: GRANT failed: password file missing or disabled
    Please help me in resolving this.
    Regards,
    Konda

    I created the passwordfile using the command below,
    orapwd.exe file=E:\app\Administrator\product\11.2.0\dbhome_1\database\PWDfile.ora force=y entries=30 password=<sys_password>
    is this okay...??

  • Connect DB - SYS user with wrong password

    Hi All,
    A strange thing I have noticed with SYS user since Oracle 9i(never worked on earlier versions) is that I can connect to the SYS user as SYSDBA with wrong password as well! Please guide how to prevent this...
    (I have searched for a solution online but was unable to find any :( )
    SQL> CONN SYS/AAA@TEST AS SYSDBA
    Connected.
    SQL> DISC
    Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    SQL> CONN SYS/BBB@TEST AS SYSDBA
    Connected.
    SQL>
    SQL> DISC
    Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production*009*

    There is nothing wrong and nothing should be, IMO, prevented.
    When you log in to the server as an user in the dba group (Unix) or the ora_dba group (Windows), you are a power user and O/S authentication applies to you, and you don't need a password.
    Logging in as owner of the software (oracle) all the time, what many DBAs do, is a bad idea anyway, as you can remove anyufile on O/S level.
    Strategies to prevent this:
    - make sure your account isn't in the groups I mentioned
    or
    - disable O/S authentication by editiing sqlnet.ora
    Both procedures are documented.
    Finally please note anyone who has root access can get around this easily.
    Sybrand Bakker
    Senior Oracle DBA

  • Access of oracle database through sys user

    Hi All,
    Can any one suggest me what are the possibility to access database through SYS user...I install oracle database 10.2.0.4 on Win-2003 SE.
    Now I want to make restrict that no one can be able to logged in database as a sys user so I do one thing that in sqlnet.ora file at server side make none in sql authentication line. What are the other possible way that user can access through sys user?
    Please suggest me...
    Thanks...

    user505 wrote:
    Hi All,
    Can any one suggest me what are the possibility to access database through SYS user...I install oracle database 10.2.0.4 on Win-2003 SE.
    Now I want to make restrict that no one can be able to logged in database as a sys user so I do one thing that in sqlnet.ora file at server side make none in sql authentication line. What are the other possible way that user can access through sys user?One other possibility can be to come from the remote system as the Sys user. So you can set remote_loginpasswordfile to shared. This will ensure that without knowing the password, person won't be able to connect.
    That said, there is no stopping for the person who would be knowing the credentials of your o/s or sys user.
    HTH
    Aman....

  • *** ERROR = Connect to database failed, rc = -4008 (POS(1) Unknown user na

    Hello
    I have just finished a dbcopy of Maxdb 7.6  to a new system with initilization.i can bring the db online. I have  ran the xuser command to fix the db users as below command as per note 39439
    i changed them in home dir of sidadm,sqdsid
                          xuser -U DEFAULT -u SAP<SID>,<password> -d <database_name> -n <database_server> -S SAPR3 -t 0 -I 0 set
    c) DBM user: for example, CONTROL.
                           xuser -U c -u CONTROL,<password> -d <database_name> -n <database_server> -S INTERNAL set
    d) SYSDBA user: for example, SUPERDBA.
                           xuser -U w -u SUPERDBA,<password> -d <database_name> -n <database_server> -S INTERNAL set 
    But iam having the below error now when trying to bring the SAP system up in dev_w0
    C  Try to connect (DEFAULT) onconnection 0 ...
    C
    C Mon Dec 19 21:46:11 2011
    C  *** ERROR => Connect to database failed, rc = -4008 (POS(1) Unknown user name/password combinati
    on)
    [dbsdbsql.cpp 137]
    B  ***LOG BY2=> sql error -4008  performing CON [dbsh#3 @ 1208] [dbsh    1208 ]
    B  ***LOG BY0=> POS(1) Unknown user name/password combination [dbsh#3 @ 1208] [dbsh    1208 ]
    B  ***LOG BY2=> sql error -4008  performing CON [dblink#8 @ 433] [dblink  0433 ]
    B  ***LOG BY0=> POS(1) Unknown user name/password combination [dblink#8 @ 433] [dblink  0433 ]
    M  ***LOG R19=> ThInit, db_connect ( DB-Connect 000256) [thxxhead.c   1537]
    M  in_ThErrHandle: 1
    M  *** ERROR => ThInit: db_connect (step 1, th_errno 13, action 3, level 1) [thxxhead.c   10837]
    M
    is there something  that i missed somewhere?
    Any ideas welcome

    erpsyscs1:cs1adm 46> xuser list
    XUSER Entry  1
    Key         :DEFAULT
    Username    :SAPCS1
    UsernameUCS2:S.A.P.C.S.1. . . . . . . . . . . . . . . . . . . . . . . . . . .
    Password    :?????????
    PasswordUCS2:?????????
    Dbname      :CS1
    Nodename    :erpsyscs1
    Sqlmode     :SAPR3
    Cachelimit  :-1
    Timeout    
    Isolation  
    Charset     :<unspecified>
    XUSER Entry  2
    Key         :c
    Username    :CONTROL
    UsernameUCS2:C.O.N.T.R.O.L. . . . . . . . . . . . . . . . . . . . . . . . . .
    Password    :?????????
    PasswordUCS2:?????????
    Dbname      :CS1
    Nodename    :erpsyscs1
    Sqlmode     :INTERNAL
    Cachelimit  :-1
    Timeout     :-1
    Isolation   :-1
    Charset     :<unspecified>
    XUSER Entry  3
    Key         :c_J2EE
    Username    :CONTROL
    UsernameUCS2:C.O.N.T.R.O.L. . . . . . . . . . . . . . . . . . . . . . . . . .
    Password    :?????????
    PasswordUCS2:?????????
    Dbname      :CS1
    Nodename    :erpsyscs1
    Sqlmode     :SAPR3
    Cachelimit  :-1
    Timeout    
    Isolation  
    Charset     :<unspecified>
    XUSER Entry  4
    Key         :w
    Username    :SUPERDBA
    UsernameUCS2:S.U.P.E.R.D.B.A. . . . . . . . . . . . . . . . . . . . . . . . .
    Password    :?????????
    PasswordUCS2:?????????
    Dbname      :CS1
    Nodename    :erpsyscs1
    Sqlmode     :INTERNAL
    Cachelimit  :-1
    Timeout     :-1
    Isolation   :-1
    Charset     :<unspecified>

  • Unable to connect using connect string in linus using sys user in Linux

    Hi,
    I am facing problem in using connect string while connecting as sys user in Linux OS
    For example:
    When I am connecting as
    sys/sysoracle as sysdba its getting connected.
    But when I am providing the connect string such as sys/sysoracle@TEST as sysdba its showing with error as:
    ORA-12505: TNS :listener does not currently know of SID in connect descriptor
    Any help will be benefitial for me
    Thanks and Regards

    >
    ORA-12505:
    TNS:listener does not currently know of SID given in connect descriptor
    Cause:     The listener received a request to establish a connection to a database or other service. The connect descriptor received by the listener specified a SID for an instance (usually a database instance) that either has not yet dynamically registered with the listener or has not been statically configured for the listener. This may be a temporary condition such as after the listener has started, but before the database instance has registered with the listener.
    Action:     
    - Wait a moment and try to connect a second time.
    - Check which instances are currently known by the listener by executing: lsnrctl services <listener name>
    - Check that the SID parameter in the connect descriptor specifies an instance known by the listener.
    - Check for an event in the listener.log file.>
    So are you sure that TEST is a right connection string that you are using and is rightly configured?
    HTH
    Aman....

Maybe you are looking for

  • Can Thunderbird be opened to a folder other than inbox.

    We're all pretty much flooded with junk mail. I'm to the point where it would be more effective to open Mozilla to a custom folder (i.e. not inbox) and populate that folder with selected contacts (i.e. not all contacts). Any thoughts? filtering out j

  • Itunes 8.2 disables Ethernet/Internet connection

    In an effort to upgrade to iTunes 8.2 this morning, I d/l and installed without difficulty. However, afterward, my computer did not recognize my Ethernet and I could not connect to the internet. I restored my computer to an earlier restore point, whi

  • External LDAP + Roles in portal

    Folks, I use weblogic 8.1 portal. Can we use an external LDAP for storing portal roles? If so, what is supported, recommended, etc. Does BEA have a recommendation/document on how to support an environment with multiple domains that share a common LDA

  • Where is the CS5.5 to CS6 Web Design Premium upgrade download link?!

    I purchased the CS5.5 Web Design Premium equivalent to avail of the free upgrade to CS6 when it came out. After too much fluffing around with Adobe's customer services (weeks upon weeks), I eventually received the upgrade disk through the post (I'm b

  • I need help w/ This: missing gina dll after installation...

    I need help w/ This: missing gina dll after installation of linksys adaptor on Win XP. Thank you