Login with SQLPlus as a DBA without entering password

If you have the system user who installed the database you can enter SQL Plus as DBA user, without entering a password as follows:

1. Enters the system with this user. 
2. From the command line, go into SQLPlus typing:

> sqlplus "/as sysdba"

If you need to enter using this way because you forgot the password of a user, you can easily change it: 

SQL> alter user user_name identified by new_password;

It can be more than one Database installed on the server, so you have to validate that the environment variables of the Oracle's user are pointing to your database.

For verifying that you has login into the correct database you can execute this statement: 

SQL> select name from v$database; 
 

A handbag, also mulberry

A handbag, also mulberry alexa purse or pouch in American English, is a handled medium-to-large bag that is mulberry bayswater often fashionably designed, typically used by women, to hold personal items mulberry purse such as wallet/coins, keys, cosmetics, a hairbrush, pepper spray, cigarettes, contraceptives, mulberry bags mobile phone etc.

Google
 
     

Similar entries

  • For obvious security reasons we can not see clear the password of the users of the database, but as an administrator user SYSTEM does have privileges to view the encrypted password:


    SQL> select password from dba_users where username='SCOTT';
    PASSWORD
    -----------------------------
    F894844C34402B67

    The usefulness of this is that as we return the SELECT can be used in a sentence of password change; 


    SQL> alter user scott identified by values 'F894844C34402B67';

  • The easiest way to access from an Oracle database objects from another Oracle database is using a DBLINK (being the easiest does not mean that it is always the most desirable, the abuse of DBLINKS can create many problems, both of performance and safety)

    To do this it's necessary a user with CREATE DATABASE LINK privilege, and create a DBLINK in the source database (A) by a simple statement such as:


    Create database link LNK_from_A_to_B connect to USER identified by PASSWORD USING 'B'; 

    'LNK_from_A_to_B' is the name of the link, 'USER' and 'PASSWORD' are the IDs of the user who will use the link to connect, which will inherit the permissions of all access through the link, and B is the name of the database's instance.

    Using the DBLINK we can connect to the objects with the remote database's permissions that user has been provided in the creation statement.

    To reference an object from the remote database should indicate the name of the object, concatenated with the character '@' and the name that we had given to the DBLINK.

    Example: 

    select * from TABLA@LNK_from_A_to_B 

  • It may happen that after you install or configure a new Oracle database we realize that the character set chosen during installation is not correct. What we may happen in cases like this is to delete the database and reconfigure it or worse ...But you do not. We can change the character set stopping the database, looking up strictly by changing the settings and restart the database. Howto:
     

    - First we connect to the database 

    $ sqlplus sys/pwd@prod as sysdba
     

    - We stop the database 

    SQL>SHUTDOWN IMMEDIATE;

     

    - We raise strictly * 

    SQL>STARTUP MOUNT;
    SQL>ALTER SYSTEM ENABLE RESTRICTED SESSION;
    SQL>ALTER SYSTEM SET JOB_QUEUE_PROCESSES=0;
    SQL>ALTER DATABASE OPEN;

    - Change the character map 

    SQL>ALTER DATABASE CHARACTER SET <new characters map>;

    - Restart the database and yata 

  • The easiest way to access from an Oracle database to objects of another Oracle database is using a DBLink (this does not mean that it is always the most desirable, abuse of DBLinks can generate both performance as security problems).

    First, you need a user who holds the create database link privilege. Then, you can create DBLink in source database (A) through this simple sentence:

    • create database link lnk_from_A_a_B connect to user identified by password using 'B';

    - 'lnk_from_A_a_B ' is the link name,

    - 'user' and 'password' are the user identifiers who will use the link to connect.

    - 'B' is the SID of the target database.

    Through this DBLink you can connect with objects in the remote database with privileges owned by the user of the creation sentence.

    To reference an object of the remote database should indicate object name concatenated with '@' and the DBLink name.

    Example: select * from mytable@lnk_from_A_a_B

  • In order to access to the same database where are you working outside the database server you must activate the service called listener, it has to be listening.

    It can happens that the database is properly raised and can not connect from other servers, which are also set correctly (correct TNSNAMES, etc.).. 

    In these cases could be that the listener has a problem, or simply has not been initiated.

    To Check the status, start or stop it is very simple. Just open a command line session (console terminal, etc..) with the user that has installed the database, and run the lsnrctl command with the following parameters:

    • Check your state:
        > lsnrctl status

    • Stop the listener:
        > lsnrctl stop

    • Start the listener:
        > lsnrctl start

    Keep in mind that when you stop the listener, the connections that are already in the database won't be closed, so a short stop is not very traumatic, only connections trying to enter while the listener is stopped are rejected, should not affect anyone who already has an opened session.