You are on page 1of 3

To Start a Database:

-First open a terminal by clicking the right button of the mouse and click on 'Open Terminal' link and in the
terminal type in the command to first export the database to set the oracle enviromental variable on ur
machinethe comand is as follo!s:
>export ORACLE_SID= orcl
-Then to start s"lplus:
>sqlplus
-#fter ur connected to s"lplus u !ill be promted to enter username and pass!ordso:
>username: sys as sysdba
>passord: !ust enter
"$f you dont !ant to get the prompt for username and pass!ord then instead of %ust entering
s"lplus enter:
&sqlplus # as sysdba
-'ou can do this !hen your database allo!s OS authetication
-#fter ur logged in as a sys user u !ill get the s"l promt so u need to start the database because intially your
database !ill be do!n !hen ur starting up ur machine by typing the command:
>startup
-!ait for fe! moment as it !ill take around ( min to startup the database)
-!hen database is open open another terminal and again type in the command:
>export ORACLE_SID= orcl $%ress enter tab &o export t'e database*
>lsnrctl start l(stener $%ress enter tab &o start t'e l(stener process)
>emctl start dbconsole $%ress enter tab &o start database console)
-#fter typing these commands !ait till the the message sho!s that a instance is started and dbconsole is started
then in that message u !ill find a link:
>'ttp:##local'ost*stat(on+,*example*com:--./#em#console#about appl(cat(on*
-+o! u need to copy this link from the message and paste in the address bar of the bro!ser and enter) ,ait for
fe! moment u !ill get a login screen !here u have to type the username and pass!ord: -$f u dont get login page
then that means enterprise manager is not getting connected to database.
>username:sys
>%assord:Oracle
>lo0(n as sysdba by scroll(n0 don t'e t'(rd opt(on belo t'e username and passord)
-Then click on the login button and u !ill be connected to database console as a sysdba !here u can perform
various action or task)
-+o! suppose the login screen respond that the pass!ord is !rong then u can reset the pass!ord by going back
to the s"l promt then login !ith the same procedure by mentioning the
>username: sys as sysdba""""and enter
>%assord: !ust enter
-Then !hen u !ill be logged in as a sys user type in the command on the s"l promt to alter the pass!ord or to
change the pass!ord:
>alter user sys (dent(1(ed by oracle""""and enter*
-Then again go back to login screen and enter the username and ne! pass!ord and choose as sysdba and click on
the login button and u !ill be connected to dbconsole)
Then if u !ant to logout of the dbconsole then click on the logout link !hich u !ill find on the upper right hand
corner of the page)
-Then if u !ant to logout of terminal u need to type in '/0$T'' and enter both in case of s"l prompt and also from
the normal terminal)
-To start a listener process from command prompt the command !ill be:
>lsnrctl start l(stener
-To stop a listener process from command promp the command !ill be:
&lsnrctl stop l(stener
"To start is"lplus of your database then you need to type the follo!ing command after you have started the
listenerenterprise manager:
>(sqlplusctl start 2&o start (sqlplus3
S455AR6 O7 CO55A8DS:
(. From (
st
Terminal
>export ORACLE_SID= orcl
>sqlplus>username: sys as sysdba
>passord: !ust enter
>startup9
1.Open 1
nd
terminal and from 1
nd
terminal:
>lsnrctl start l(stener $%ress enter tab &o start t'e l(stener process)
>emctl start dbconsole $%ress enter tab &o start database console)
>'ttp:##local'ost*stat(on+,*example*com:--./#em#console#about appl(cat(on)
>username:sys
>%assord:Oracle
>lo0(n as sysdba by scroll(n0 don t'e t'(rd opt(on belo t'e username and passord
2.$f the pass!ord is different or !rong come to the (
st
terminal !here u have already logged in as sys as sysdba
you can channge the pass!ord to :oracle;
>alter user sys (dent(1(ed by oracle""""and enter)
3.$f you !ant to start and stop or reload -!hich means (
st
stop and then start again. the listener then from the OS
prompt:
>lsnrctl start l(stener
>lsnrctl stop l(stener
>lsnrctl reload l(stener9
4.To start is"lplus of your database then you need to type the follo!ing command after you have started the
listenerenterprise manager:
>(sqlplusctl start 2&o start (sqlplus3
To start stop and reload a listener or to start and stop dbca or start and stop dbconsole u need to login as a oracle
user:
DI77ERE8& S&AR&4% < S=4&DO>8 O%&IO8:
>export ORACLE_SID=orcl 2&o export t'e database or to set oracle en?(roment
on ur mac'(ne3
>sqlplus 2&o start sqlplus3
Enter sys as sysdba@enter@enter
>startup 2&o start database or to open t'e database3
>startup nomount 2D(11erent database startup opt(on3
>startup mount or >alter database mount
>alter database open*
"D(11erent database s'utdon opt(on:
>s'utdon normal or > s'ut normal
>s'utdon transact(onal >s'ut transact(onal
>s'utdon (mmed(ate > s'ut (mmed(ate
>s'utdon abort >s'ut abort*
"To (
st
shutdo!n and startup the database both together in one command:
&startup 1orce9
-The above command !ill shutdo!n the database as 5shutdo!n abort6 and then startup and during the database
startup S7O+ !ill perform instance recovery because the database !as not shutdo!n clean)
"&o create a database At'e command needed to open database con1(0urat(on ass(stant 1rom oracle
term(nal:
>dbca 2&o start Database con1(0arat(on ass(stant3*
"&o re0(ster your database (t' l(stener:
>netm0r 2&o start 8et 5ana0er3
"&o (nstall oracle 1rom oracle term(nal:
>#'ome#database#run(nstaller 2&o run t'e oracle (nstaller to (nstall oracle on t'e
ser?er or on t'e mac'(ne3

You might also like