Difference between revisions of "Oracle"
Jump to navigation
Jump to search
(→SQL) |
(→XE) |
||
| Line 26: | Line 26: | ||
DB files can be found in '''/usr/lib/oracle/xe/oradata/XE/'''. | DB files can be found in '''/usr/lib/oracle/xe/oradata/XE/'''. | ||
===Backup=== | |||
Activate Archive Log: | |||
% sqlplus sys/PASSWORD sysdba | |||
<source lang="oracle11"> | |||
SQL> shutdown immediate | |||
SQL> startup mount | |||
SQL> alter database archivelog; | |||
SQL> alter database open; | |||
SQL> -- CHECK IF DB IN ARCHIVLOG MODE | |||
SQL> SELECT LOG_MODE FROM SYS.V$DATABASE; | |||
</source> | |||
To backup the database run: | |||
% $ORACLE_HOME/config/scripts/backup.sh | |||
If you have problems with the Flash Recovery files check if you are using the right user (user must be in 'dba' group or user 'oracle'). | |||
% ls -l /usr/lib/oracle/xe/app/oracle/ | grep flash_recovery_area | |||
<source lang="oracle11"> | |||
SQL> SHOW PARAMETER DB_RECOVERY_FILE_DEST; | |||
</source> | |||
==HowTos== | ==HowTos== | ||
Revision as of 14:41, 17 January 2011
Oracle Database
XE
Ubuntu 64bit Installation
axel -a http://oss.oracle.com/debian/dists/unstable/main/binary-i386/libaio_0.3.104-1_i386.deb
axel -a http://oss.oracle.com/debian/dists/unstable/non-free/binary-i386/oracle-xe-universal_10.2.0.1-1.1_i386.deb
sudo dpkg -i --force-architecture libaio_0.3.104-1_i386.deb
sudo dpkg -i --force-architecture oracle-xe-universal_10.2.0.1-1.1_i386.deb
sudo /etc/init.d/oracle-xe configure
Add the following to your shell's rc (e.g. ~/.bashrc):
ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server
PATH=\$PATH:\$ORACLE_HOME/bin
export ORACLE_HOME
export ORACLE_SID=XE
export PATH
The host and port configuration can be found in the following files (if you want to bind the service to a different address/hostname):
- /etc/default/oracle-xe
- $ORACLE_HOME/network/admin/listener.ora
- $ORACLE_HOME/network/admin/tnsnames.ora
DB files can be found in /usr/lib/oracle/xe/oradata/XE/.
Backup
Activate Archive Log:
% sqlplus sys/PASSWORD sysdba
SQL> shutdown immediate
SQL> startup mount
SQL> alter database archivelog;
SQL> alter database open;
SQL> -- CHECK IF DB IN ARCHIVLOG MODE
SQL> SELECT LOG_MODE FROM SYS.V$DATABASE;
To backup the database run:
% $ORACLE_HOME/config/scripts/backup.sh
If you have problems with the Flash Recovery files check if you are using the right user (user must be in 'dba' group or user 'oracle').
% ls -l /usr/lib/oracle/xe/app/oracle/ | grep flash_recovery_area
SQL> SHOW PARAMETER DB_RECOVERY_FILE_DEST;
HowTos
System
- Oracle/Create tablespace (and user/schema)
- Oracle/Drop all user tables
SQL
- Oracle/Drop if exists
- Oracle/Find duplicates
- Oracle/Merge
- Oracle/NLS
- Oracle/Select into table
- Oracle/Sequence
- Oracle/Update join
Java
External Links
- ORACLE-BASE
- SS64 Oracle
- TECH on the Net Oracle/PLSQL Topics
- java2s Oracle PL/SQL Tutorial
- ask Tom Oracle