Monday 4 July 2011

How to find out oracle databases present in system|how to log in as DBA in any database by command prompt


Hello friends,This is out first tutorial on basic oracle. Here we will study how to find out which oracle databses are present in out system,and how to login in any one of them as SYSDBA without even opening the Oracle EM or isqlplus software.
Before going to the steps ,I would like to tell the beginners that SYSDBA or SYSTEM are the users which operate the database,They have all the administrative privileges of the database.
Now coming to the steps:-
Steps:
Find out the oracle databases present:
1)Got to Start\Control Panel\All Control Panel Items\Administrative Tools\Services
2) Under services search for OracleService prefix followed by the database name files.
3)Each such file corrosponds to one Oracle Database.
Note:- When you will install Oracle 10g, The DBCA(Database Configuration Assistant) will automatically create a default database named ORCL.
4)The snapshot below shows that there is only one file named-“OracleServiceOrcl”,this conclude that there is only one default database named Orcl.

                                                                             [click to enlarge the snapshot]

This was how to find out the oracle databases in system with easy steps.


Now coming to How to login in any Database as DBA(sys or system)
Steps:-
1)The SYSDBA always login through Command Prompt.
2)So open Cmd by pressing Win_button+R soft key in the keyboard  and typing cmd in run window.
3) Now in Cmd type the following code :-
C:\>set oracle_sid=orcl
C:\>sqlplus /nolog
Sql>conn /as sysdba
4) after this the user will be connected to oracle database as SYSDBA.and it will show connectes status as shown in snapshot below:-

                                                                              [click to enlarge the snapshot]

5) Now, if you want to cross check which user is logged in.
Just type as below:-
Sql> show user
6)It will return the current username as  user is “SYS”
As shown in the snapshot.

                                                                             [click to enlarge the snapshot]

So, now you have been logged in as sysdba to the ORCL database.Now do whatever as DBA.

This is the complete easy steps introduction to oracle in our first tutorial.Hope you will find it interesting and useful.Show your thoughts and doubts in the commenting section.
Thank you.






No comments:

Post a Comment