Example : How to open Oracle 10g/11g first time.
  (First, Install Oracle 10g successfully in the system, then.)
- Press, Window key + r - Type 'sqlplus' - ok. (OR Double Click on 'Sqlplus icon' on the desktop)
- Type user name- system  (Press Enter)     (by default user name is 'system') 
- Now,Type password - *** (Press Enter)     (put the password as given at the time of oracle 
  installation and password symbol does not appear) - Put Host string empty.
- ok
- Now, SQL prompt appears and we are logged in as user 'system' & now oracle is ready to take/
  execute/run user given correct commands/expressions.
Example : How to create new user in Oracle 10g/11g.
SQL> create user system1 identified by raj1; (Press Enter)
User created.

NB : Here new user namely 'system1' is created and its password is 'raj1'
Example : How to change/modify the current logged in user password in Oracle 10g/11g.
SQL> passw  (Press Enter)
Changing password for SYSTEM
Old password: *** (Press Enter)
New password: **** (Press Enter)
Retype new password: **** (Press Enter)
Password changed
SQL> 
Example : How to give administrator power to a newly created user in Oracle 10g/11g.
SQL> grant all privileges to system1; (Press Enter)
Grant succeeded.

-----------  OR  ----------
SQL> grant dba to system1;
Grant succeeded.

-----------  OR  ----------
SQL> create user system1 identified by raj2;
User created.
SQL> grant connect,resource,dba to system1;
Grant succeeded.

-----------  OR  ----------
SQL> create user system1 identified by raj2;
User created.
SQL> grant resource,create session,create table,create view,create any synonym,create procedure,
     create sequence to system1;
Grant succeeded.
Example : How to show the name of current logged in user in Oracle 10g/11g.
SQL> show user (Press Enter)
USER is "SYSTEM"
Example : How to connect/transfer current logged in user to other existing user in Oracle 10g/11g having similar permission.
SQL> conn (Press Enter)
Enter user-name: system (Press Enter)
Enter password: *** (Press Enter)
Connected.

(transfer from current logged in user'system' to new existing user 'system1' having similar 
 permission)

SQL> conn system1    (Press Enter)
Enter password: **** (Press Enter)
Connected.
/* Now we are currently logged in as user 'system1' and password is 'raj1' having similar 
 permission*/
Example : How to re-connect/disconnect user in Oracle 10g.
SQL> conn (Press Enter)
Enter user-name: system (Press Enter)
Enter password: *** (Press Enter)
Connected.

---------  OR  ---------
SQL> conn system1/raj (Press Enter)
Connected.

---------  OR  ---------
SQL> connect system1/raj (Press Enter)
Connected.
---------  OR  ---------
SQL> conn
Enter user-name: system1
Enter password: ****
Connected.

SQL> disc or disconnect (Press Enter)
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Production
With the Partitioning, OLAP and Data Mining options


NB : Here 'system1' is username and 'raj' is password.
Example : How to clear the oracle screen from previous used commands/outputs.
SQL>clear screen; (Press Enter)
Example : How to see previous command list you typed & its output again on the oracle                               screen.
SQL> /  (Press Enter) To see only output of previous commands.
SQL> run (Press Enter)  To see both command & its output of previous commands.
Example : How to forcibly break Oracle Commands on C-prompt.
Press CTRL+C
Example : How to close/exit Oracle 10g.
SQL>exit (Press Enter)
---------  OR  ---------
SQL>quit (Press Enter)

 551 total views,  1 views today

Categories: SQL

0 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.