Thursday 24 April 2014

Some basic Oracle-xe and Sqlplus notes

Query
----------
sqlplus <user>/<password>@<SID> <<EDF
select * from dba_users;
EOF


Setting the editor
-------------------------------
SQL> define_editor=’vi’


Oracle XE Status / stop / start
-----------------------
  /etc/init.d/oracle-xe status (as root)
   lsnrctl status (as oracle user)
   lsnrctl start (as oracle user)

Oracle XE Install on Ubuntu
---------------------------------

Download oracle-xe-universal_10.2.0.1-1.1_i386.deb
/opt/oracle/src/oracle-xe-universal_10.2.0.1-1.1_i386.deb
edit /etc/apt/sources.list as follows...

deb file:/opt/oracle/src raring main
Create a Packages.gz file as follows...
cd /opt/oracle/src
dpkg-scanpackages . | gzip > /opt/oracle/src/dists/raring/main/binary-i386/Packages.gz

Update apt cache...

apt-get update

Install ...

apt-get install oracle-xe-universal
ureadahead will be reprofiled on next reboot
Setting up oracle-xe-universal (10.2.0.1-1.1) ...
update-rc.d: warning: /etc/init.d/oracle-xe missing LSB information
update-rc.d: see <http://wiki.debian.org/LSBInitScripts>
Executing Post-install steps...
You must run '/etc/init.d/oracle-xe configure' as the root user to configure the database
HTTP Admin port = 40000
DB Port = 40521
password for SYS and SYSTEM = oracle123
started on boot = no
The DB is now started .. and it's running as user 'oracle'. not sure how it knew to run as this user, I don't recall
providing the installer that info.
Now it's installed we need to run it
------------------------------------
Already running as user 'oracle'. not sure how it knew to run as this user, I don't recall providing the installer that
info.

No comments:

Post a Comment