Differences between revisions 5 and 18 (spanning 13 versions)
Revision 5 as of 2006-06-09 03:07:20
Size: 521
Editor: fuzzy
Comment:
Revision 18 as of 2006-07-05 05:44:13
Size: 1891
Editor: yoch
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
'''Backup database using rman (always make at least one backup even on empty database!)''' ## page was renamed from SetupOracleDatabase
=== Install Oracle database server ===
Line 3: Line 4:
'''''sqlplus''''' Make sure that you have at least 1G swap space on your machine.
Install oracle on separate machine if there are not to much memory available.
Minimum reasonable config for XE: 1G if this machine will be used only as oracle server
and 1.5 G if we will to run CONTROL on the same machine
Line 5: Line 9:
''connect as sysdba'' '' '' {{{
rpm -U /u2/programs/databases_and_odbc/oracle-xe-10.2.0.1-1.0.i386.rpm
}}}
Set password for user oracle.
Move datafile to somewhere where you have enough space (if there are more than 1 hard drive it is much better to use one for oracle database):
{{{
/etc/init.d stop
mv /usr/lib/oracle/xe/oradata /u2/somewhere
ln -s /u2/somewhere/oradata /usr/lib/oracle/xe/oradata
/etc/init.d start
}}}
Line 7: Line 21:
''startup nomount'' === Install Oracle database client ===
(if we want to run CONTROL and database on separate machines)
Line 9: Line 24:
'''rman''' '' '' {{{
rpm -U /u2/programs/databases_and_odbc/oracle-xe-client-10.2.0.1-1.0.i386.rpm
}}}
Line 11: Line 28:
''connect target / ''
Line 13: Line 29:
''mount '' include in .bash_profile for all users who will use sql or control program:
{{{
. /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/oracle_env.sh # (if database on the same machine) OR
. /usr/lib/oracle/xe/app/oracle/product/10.2.0/client/bin/oracle_env.sh # (if database located on different machine)
}}}
Line 15: Line 35:
''BACKUP DATABASE INCLUDE CURRENT CONTROLFILE; ''
Line 17: Line 36:
'''recover '''
Line 19: Line 37:
 . all the same,
then ''recover database;''
=== Backup database using rman (always make at least one backup even on empty database!) ===
{{{
sqlplus
>connect as sysdba
>SHUTDOWN IMMEDIATE;
>startup nomount;
>quit
Line 22: Line 45:
'''Create Oracle database for Control sql backend''' __ __ rman
>connect target /
>mount database
>BACKUP DATABASE INCLUDE CURRENT CONTROLFILE;
>quit
cp -f /ccdev/coname/*.idx /backupdir
}}}
=== Recover ===
all the same, then instead of '''BACKUP DATABASE'''
{{{
>recover database;
>quit
cp -f /backupdir/*.idx /ccdev/coname/
}}}
Line 24: Line 60:
__start sqlplus:__
Line 26: Line 61:
'' sqlplus /nolog'' '' '' ##'''Create Oracle database for Control sql backend (not available in free version)'''
Line 28: Line 63:
''connect sysadmin/sql as sysdba ''
Line 30: Line 64:
''startup nomount '' ----
CategorySql

Install Oracle database server

Make sure that you have at least 1G swap space on your machine. Install oracle on separate machine if there are not to much memory available. Minimum reasonable config for XE: 1G if this machine will be used only as oracle server and 1.5 G if we will to run CONTROL on the same machine

rpm -U /u2/programs/databases_and_odbc/oracle-xe-10.2.0.1-1.0.i386.rpm

Set password for user oracle. Move datafile to somewhere where you have enough space (if there are more than 1 hard drive it is much better to use one for oracle database):

/etc/init.d stop 
mv /usr/lib/oracle/xe/oradata /u2/somewhere
ln -s /u2/somewhere/oradata /usr/lib/oracle/xe/oradata
/etc/init.d start

Install Oracle database client

(if we want to run CONTROL and database on separate machines)

rpm -U /u2/programs/databases_and_odbc/oracle-xe-client-10.2.0.1-1.0.i386.rpm

include in .bash_profile for all users who will use sql or control program:

. /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/oracle_env.sh # (if database on the same machine) OR
. /usr/lib/oracle/xe/app/oracle/product/10.2.0/client/bin/oracle_env.sh # (if database located on different machine)

Backup database using rman (always make at least one backup even on empty database!)

sqlplus
>connect as sysdba
>SHUTDOWN IMMEDIATE;
>startup nomount;
>quit

rman
>connect target /
>mount database 
>BACKUP DATABASE INCLUDE CURRENT CONTROLFILE;
>quit
cp -f /ccdev/coname/*.idx /backupdir

Recover

all the same, then instead of BACKUP DATABASE

>recover database;
>quit
cp -f /backupdir/*.idx /ccdev/coname/


CategorySql

OracleDatabase (last edited 2013-09-18 06:09:33 by localhost)