Corruption  SYS user

Hello experts I am reading SAP Database Admin with Oracle by Michael Hoding, Andre Faustmann, Gunnar Kelein, Ronny Zimmermann. In chapter 9 System Operation and Monitoring section 9.2.1.1 Complete Analysis it states:
Check at least the objects of the SYS user with this procedure, because when a corruption of an object of SYS remains undetected, an considerably time-consuming full database export and import is required in the worst case. You can use
brconnect -u / -c -f stats -t oradict_tab -v for a dedicated analysis of the objects of the SYS user.
I run:
brconnect -u / -c -f stats -t ALL     on all my oracle servers. How many of you run stats against the SYS user....??? I thought it was a bad practice to do this.
Thanks

Hello Sébastien,
i think your are mixing two things: verify database objects and gathering statistics.
The option "oradict_tab" is used to verify the oracle ddic objects. If you wan to gather statistics on DDIC objects, you have to call it with the option "oradict_stats".
Check sapnote #23345 for the option "oradict_tab" and the alternatives.
http://help.sap.com/saphelp_nwpi71/helpdata/en/46/9f5515bb8e0488e10000000a1553f6/content.htm
How many of you run stats against the SYS user
To be honest, i have never done a verify against the DDIC objects. I only collect statistics with "oradict_stats"  on my oracle 10g databases.
Regards
Stefan

Similar Messages

  • 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.

  • Security about SYSTEM and SYS users

    Guys,
    Just curiosity,
    1) What happens if I logged with a user that have DBA role or DROP USER privilege and to drop the SYSTEM or SYS user ? This is possible ? If yes, how can protect them ?
    2) I know that the SYS is owner of the dictionary and catalog, but what is the objective of the SYSTEM user to exists ?
    Tank you.

    Hi,
    As you say, SYS is the owner of the database and the owner of the data dictionary.
    But SYS has the SYSDBA privilege which SYSTEM doesn't. This makes it possible for SYS to become a very very powerful user. In addition, never ever create objects in the SYS schema. SYSTEM is a privileged administration user, and typically owns Oracle provided tables other than the dictionary.
    Making a test.
    oracle@linux:~> sqlplus
    SQL*Plus: Release 9.2.0.4.0 - Production on Thu Dec 7 08:55:51 2006
    Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
    Enter user-name: / as sysdba
    Connected to an idle instance.
    SQL> startup
    ORACLE instance started.
    Total System Global Area 126948772 bytes
    Fixed Size 452004 bytes
    Variable Size 104857600 bytes
    Database Buffers 20971520 bytes
    Redo Buffers 667648 bytes
    Database mounted.
    Database opened.
    As Frederic showed
    SQL> drop user sys cascade;
    drop user sys cascade
    ERROR at line 1:
    ORA-01031: insufficient privileges
    SQL> drop user system cascade;
    User dropped.
    SQL> shutdown immediate
    Database closed.
    Database dismounted.
    ORACLE instance shut down.
    SQL> startup
    ORACLE instance started.
    Total System Global Area 126948772 bytes
    Fixed Size 452004 bytes
    Variable Size 104857600 bytes
    Database Buffers 20971520 bytes
    Redo Buffers 667648 bytes
    Database mounted.
    Database opened.
    SQL>
    If you like to protect it, you can do this below:
    eg:
    create table secured_objects(object_name varchar2(30));
    Table created.
    SQL> insert into secured_objects values ('SYSTEM');
    1 row created.
    SQL> select * from secured_objects;
    OBJECT_NAME
    SYSTEM
    1 rows selected.
    create or replace trigger check_beforedrop
    before drop on database
    declare
    oname char(30);
    begin
    select object_name into oname from secured_objects
    where upper(object_name)=ora_dict_obj_name;
    if sql%found then
    RAISE_APPLICATION_ERROR(-20001,'You have not permission to drop this object.');
    end if;
    exception
    when no_data_found
    then dbms_output.put_line('This object was dropped.');
    end;
    SQL> drop user system cascade;
    drop user system
    ERROR at line 1:
    ORA-00604: error occurred at recursive SQL level 1
    ORA-20001: You have not permission to drop this object.
    ORA-06512: at line 7
    Reference: http://www.adp-gmbh.ch/ora/misc/sys_system_internal.html
    Cheers

  • 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...??

  • Error in renaming the table from SYS user

    Hi
    I am in Schema by name jc
    and I have a table by name tab1
    now i logged as sys user
    then I give a command
    rename jc.tab1 to tab2 ;
    getting the following error
    rename jc.tab1 to tab2
    ERROR at line 1:
    ORA-01765: specifying table's owner name is not allowed
    Query is
    Is it notpossible to rename a table of other schema by logging as sys user ?
    is there any other alternate method of doing so??
    Thanks and Regards
    JC

    Sorry Guido,
    I have not stolen anything from anywhere :)
    All are mine ...I have created some normal users and some users with DBA privileges....
    I use this schemas for testing purpose....
    Also if I give command like from SYS user
    Alter table jc.tab1 rename to tab2 ;
    It will create tab2 in jc schema only and not in SYS schema.
    So there is no question of poluting the SYS schema.
    Also whatever I ask in this forum is a part of my application related,
    I never give the entire program, which may be useless for others and time taking in understanding.
    I just simulate whatever I require in as simplae format as I can
    The person who is very perfect in this forumn can find such queries rubbish. But in learning process no question is rubbish, but there can be a rubbish answer to every intelligent question too... :)
    Regards
    JC

  • 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....

  • Query execution is faster - as SYS user vs. application user in 11.1.07

    In +11.1.0.7+ database, we have noticed execution of an application process as SYS user is faster than the application user. To quantify this execution time was 2 hours as application user and same process when executed as SYS user completed in 1 hour.
    We ran tracing for this process and tkprof output showed follwoing:
    OVERALL TOTALS FOR ALL RECURSIVE STATEMENTS:
    _call          count      cpu       elapsed disk query current rows_
    Execute 3705586 2440.49 *4294.54* 293602 21835223 23300886 3801288 <<< ==== SYS
    Execute 3703285 6356.69 *8576.50* 303175 21785419 23378086 3801291 <<< ==== Application user
    We have SR open with Oracle, but thought if some one knows about this issue would be great.
    Edited by: dhyani on Aug 17, 2010 3:16 PM

    What about the "Predicate Information" section of the execution plans - were those exactly the same? Did you use AUTOTRACE, EXPLAIN PLAN FOR, or the method that I showed to retrieve the execution plans? Where the SQL_ID and CHILD_NUMBERS displayed exactly the same? Is the STATISTIC_LEVEL set to TYPICAL for both sessions? You can check the setting in SQL*Plus like this:
    SQL> SHOW PARAMETER STATISTICS_LEVEL
    NAME                                 TYPE        VALUE
    statistics_level                     string      typicalAs a demonstration, I will change the value at the session level and then change the setting back:
    SQL> ALTER SESSION SET STATISTICS_LEVEL='ALL';
    SQL> SHOW PARAMETER STATISTICS_LEVEL
    NAME                                 TYPE        VALUE
    statistics_level                     string      ALL
    SQL> ALTER SESSION SET STATISTICS_LEVEL='TYPICAL';If the above does not show a difference, you will need to capture a 10046 trace at either level 8 or level 12 for both sessions and compare the wait events and the STAT lines in the 10046 trace to see where the additional time is being spent. Reference these two blog articles for the 10046 trace:
    http://hoopercharles.wordpress.com/2009/12/01/10046-extended-sql-trace-interpretation/
    http://hoopercharles.wordpress.com/2010/01/26/10046-extended-sql-trace-interpretation-2/
    Keep in mind that the goal is to not change anything until we understand the problem better. Maybe, just maybe, someone created a table (or view) or two in the SYS schema (or used a table/view name that matched a SYS owned object), in a normal user's schema, or there are synonyms pointing to different tables. So, it probably would be a good idea to verify that the results are exactly the same when the SYS user executes the SQL statement and a normal user executes the SQL statement.
    Charles Hooper
    Co-author of "Expert Oracle Practices: Oracle Database Administration from the Oak Table"
    http://hoopercharles.wordpress.com/
    IT Manager/Oracle DBA
    K&M Machine-Fabricating, Inc.

  • Sql developer 1.2.1  failed sys user login

    Setting up a connection with the sys user in sql developer connections return invalid username/pw.
    I have the role set to sysdba.
    I can connect as non sys users with sql developer.
    I can connect via sqlplus with the sys user and pw.
    What would cause me not to be able to connect with the sys user with sql developer?
    Thanks

    This is the Oracle Designer forum. Not the SQL Developer forum.
    Please repost in the proper forum.

  • Login to SQL Developer as the SYS user for Getting Started tutorial

    I went to try and do the following tutorial to learn about SQL Developer 3.0, but I cannot get started because I'm unable to perform Prerequisite #3.
    How do I "Login to SQL Developer as the SYS user"?
    Dave
    Getting Started with Oracle SQL Developer 3.0
    Prerequisites
    Before starting this tutorial, you should:
    1 .
    Install Oracle SQL Developer 3.0 from OTN. Follow the readme instructions here.
    2 .
    Install Oracle Database 11g with the Sample schema.
    3.
    Unlock the HR user. Login to SQL Developer as the SYS user and execute the following command:
    alter user hr identified by hr account unlock;
    Note: This tutorial is developed using Oracle SQL Developer 3.0.
    4 .
    Download and unzip the files.zip to a local folder on your file system. In this tutorial, we use the C:\sqldev3.0 folder.

    I installed XE. It asked me to set up a username and password during the install.
    How do I login as the SYS user, though?
    There is a Connection Name, Username, and Password field when I try to set up a connection in SQL Developer, and I used the username and password I made during the install. I clicked the Test button to test the connection.
    I see "Status: Failure -Test failed: ORA-28009: connection as SYS should be as SYSDBA or SYSOPER".
    How do I tell SQL Developer "as SYSDBA or SYSOPER"?
    Sorry, this is probably easy, and I'm just clueless about it.

  • ORA-01017: invalid username/password; logon denied FOR SYS USER

    Hello,
    I was usually login through the same password for sys user to log on to the database as sysdba, but last time i used " / as sysdba" to connect using local system administrative account which is connected very well and still connecting in the same way. The initializing parameter file set with the following parameter:
    remote_login_passwordfile=EXCLUSIVE
    Now if i use to connect the database server remotely using sys user, it gives me "ORA-01017: invalid username/password; logon denied" error and if i use the same login credentials on DB server machine using other local user accounts it is giving me "Insufficient Privilige" error. I can only connect now using local administrator account from DB server machine using " / as sysdba" statement.
    Kindly guide me the issue.

    When you use " / as sysdba" locally on server, you are using OS authentication which will bypass the password file and user/pass authentication.
    Looks like you have discrepancy between the password you use and real password. You can login " / as sysdba" and change your SYS password to a new one.
    When was last time you successfully login using password? What has changed since then?

  • Fail to logon with SYS user: ORA-01031: insufficient privileges

    Hello,
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
    PL/SQL Release 11.2.0.1.0 - Production
    CORE 11.2.0.1.0 Production
    TNS for Linux: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - Production
    OS: CentOS 5.5
    I fail to log on with SYS user through PL/SQL Developer. I receive the error: ORA-01031: insufficient privileges. PL/SQL Developer is installed on Windows 7 Professional. Oracle Client Version is 11.2.0.1.0. However I logon successfully with SYSMAN and SYSTEM.
    For those who might ask whether I try to connect "as sysdba" when I use SYS user, the answer is YES, I do.
    Besides I think the name of the tool (PL/SQL Developer) doesn't matter because I think I'll face the same error with any other tool (but I mentioned it just in case).
    On server side I have no issues with SYS user. I can connect through SQLPlus with connect / as sysdba or connect "/as sysdba" faultlessly.
    The initialization parameter sec_case_sensitive_logon is set to FALSE
    SQL> show parameter sensi
    NAME TYPE VALUE
    sec_case_sensitive_logon boolean FALSE
    I'm using local naming to connect and on client side I've a tnanames.ora file. The sqlnet.ora file looks like this:
    SQLNET.AUTHENTICATION_SERVICES= (NTS)
    NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)I read in this forum (another thread) about using a password file. I created a password file using orapwd this way:
    orapwd file=orapwDB11G2 entries=100 ignorecase=y password=a_passwordwhere I replaced "a_password" with the SYS password.
    Actually I'm not sure the client is influenced by the password file anyway because I tell it to use local naming.
    Any clues?
    Thank you very much!

    Verdi wrote:
    Hello, Chinar, AlexeyDev,
    ORACLE_SID variable is:
    [oracle@localhost bin]$ echo $ORACLE_SID
    planetThe directory $ORACLE_HOME/dbs:
    [oracle@localhost ~]$ ls -l $ORACLE_HOME/dbs
    total 28020
    -rw-rw---- 1 oracle oinstall    1544 Apr 10 12:43 hc_DBUA0.dat
    -rw-rw---- 1 oracle oinstall    1544 Apr 27 18:02 hc_planet.dat
    -rw-r--r-- 1 oracle oinstall    2851 May 15  2009 init.ora
    -rw-r--r-- 1 oracle oinstall    2966 Apr 26 16:33 initplanet.ora
    -rw-r----- 1 oracle oinstall      24 Apr  1 18:22 lkPLANET
    -rw-r----- 1 oracle oinstall 9519104 Apr 27 18:43 ora_control1
    -rw-r----- 1 oracle oinstall 9519104 Apr 27 18:43 ora_control2
    drwx------ 2 oracle oinstall    4096 Apr 10 12:43 peshm_DBUA0_0
    drwx------ 2 oracle oinstall    4096 Apr  1 18:19 peshm_planet_0
    -rw-r----- 1 oracle oinstall 9519104 Apr  8 11:25 snapcf_planet.f
    -rw-r----- 1 oracle oinstall    2560 Apr 27 18:41 spfileplanet.oraThe value of the parameter remote_login_passwordfile is:
    *.remote_login_passwordfile='EXCLUSIVE'
    I start up the instance using the spfile.As a side observation, it appears you have two control files also in this directory. That is risky, and goes against the intent of having multiplexed the control file. Ideally they would be on separate disk devices - including separate controllers, but at the very least they should be in directories that are separate all the way back to the root directory. If you can't protect against hardware failure, at least protect against human failure.

  • 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

  • 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....

  • Connect as sys user as sysdba using vbscript

    Hi I have to connect to the oracle database using sys user as sysdba using a vbscript.
    I have the following part in the script:
    Const TARGET_CONN = "DRIVER={Microsoft ODBC for Oracle};SERVER=XYZ;UID=sys;PWD=abc;"
    Set conn = CreateObject("ADODB.Connection")
    conn.Open TARGET_CONN
    When i run the script i get the error: connection as SYS should be as SYSDBA or SYSOPER
    Does anybody know how to do resolve this?
    Thanks in advance.

    Hi,
    If you were using Oracle's ODBC driver, you'd add "as sysdba" as part of the password, ie:
    "DRIVER={oracle in oradb11g_home1};dbq=XYZ;UID=sys;PWD=abc as sysdba;"
    However, you're using Microsoft's driver and I wouldnt be surprised if Microsoft's driver doesnt support it. If it does though, I'm not sure what you need to do.
    Greg

  • Connect to oracle sys user

    Hi folks
    when i try to connect to oracle sys user from the unixbox its opening an idle instance .
    [u01/appl/ora817]$ set ORACLE_SID=fclaie1
    [u01/appl/ora817]$ sqlplus
    SQL*Plus: Release 8.1.7.0.0 - Production on Thu Feb 28 09:37:55 2008
    (c) Copyright 2000 Oracle Corporation. All rights reserved.
    Enter user-name: / as sysdba
    Connected to an idle instance.
    SQL>
    can someone suggest me why an idle instance is starting rather then the normal instance .
    Your expert suggestion is highly appriciated
    Thanks

    Connected to an idle instance.Idle Instance means the instance has not started.
    You can issue
    c) Copyright 2000 Oracle Corporation. All rights reserved.
    Enter user-name: / as sysdba
    Connected to an idle instance.
    SQL> startup <-- (Here)
    After which your instance will be started. By the way what you mean by normal instance?
    Adith

Maybe you are looking for