Академический Документы
Профессиональный Документы
Культура Документы
15.02.2015
19.02.2015
1.1
......................................................................................................................................................... 2
.............................................................................................................................................................. 3
.......................................................................................................................................... 3
.......................................................................................................................................................... 3
.......................................................................................................................................... 4
............................................................................................................................................. 4
.................................................................................................................................... 5
........................................................................................................................................................... 5
....................................................................................................................................................................... 6
.............................................................................................................................................................. 7
................................................................................................................................................................. 8
................................................................................................................................... 10
LEGACY- ............................................................................................................................................. 10
DATAPUMP ....................................................................................................................................... 11
......................................................................................................................... 13
............................................................................................................................................. 15
........................................................................................................................................................ 15
....................................................................................................................................................... 15
1.0
1.1
15.02.2015
19.02.2015
Oracle USERS. ,
, .
. ,
, .
CREATE TABLESPACE DATA
DATAFILE '/u01/oracle/oradata/ora11/data01.dbf' SIZE 1024M AUTOEXTEND ON
NEXT 256M MAXSIZE UNLIMITED
EXTENT MANAGEMENT LOCAL AUTOALLOCATE
LOGGING
ONLINE
SEGMENT SPACE MANAGEMENT AUTO;
DATA,
- /u01/oracle/oradata/ora11/data01.dbf.
PaymentEngine
.
:
create user IBPE
default tablespace DATA
temporary tablespace TEMP
identified by "password";
:
DATA -
TEMP
Oracle 11, DEFAULT
(- 180 ).
. ,
:
create profile UNEXPIREABLE LIMIT PASSWORD_LIFE_TIME UNLIMITED;
IBPE:
alter user IBPE profile UNEXPIREABLE;
dev/test
:
grant debug any procedure to IBPE;
grant debug connect session to IBPE;
1. SSH oracle. oracle
, , , root,
oracle:
login as: root
Using keyboard-interactive authentication.
Password:
Last login: Thu Apr 2 12:54:32 2015 from 192.168.77.38
apricot:~ # su - oracle
oracle@apricot:~>
2. Oracle,
ORACLE_SID:
oracle@apricot:~> export ORACLE_SID=ora11; echo $ORACLE_SID
ora11
oracle@apricot:~>
, ORACLE_SID
.
3. SYS:
oracle@apricot:~> sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Sun Apr 5 18:23:54 2015
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to an idle instance.
SQL>
SQL> startup;
ORACLE instance started.
Total System Global Area 2137886720 bytes
Fixed Size
2254952 bytes
Variable Size
570427288 bytes
Database Buffers
1560281088 bytes
Redo Buffers
4923392 bytes
Database mounted.
Database opened.
SQL>
1. SSH oracle. oracle
, , , root,
oracle:
login as: root
Using keyboard-interactive authentication.
Password:
Last login: Thu Apr 2 12:54:32 2015 from 192.168.77.38
apricot:~ # su - oracle
oracle@apricot:~>
2. Oracle,
ORACLE_SID:
oracle@apricot:~> export ORACLE_SID=ora11; echo $ORACLE_SID
ora11
oracle@apricot:~>
, ORACLE_SID
.
3.
Uptime
0 days 0 hr. 0 min. 0 sec
Trace Level
off
Security
ON: Local OS Authentication
SNMP
OFF
Listener Log File
/opt/oracle/diag/tnslsnr/apricot/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=apricot)(PORT=1521)))
The listener supports no services
The command completed successfully
1. SSH oracle. oracle
, , , root,
oracle:
login as: root
Using keyboard-interactive authentication.
Password:
Last login: Thu Apr 2 12:54:32 2015 from 192.168.77.38
apricot:~ # su - oracle
oracle@apricot:~>
2. Oracle,
ORACLE_SID:
oracle@apricot:~> export ORACLE_SID=ora11; echo $ORACLE_SID
ora11
oracle@apricot:~>
, ORACLE_SID
.
3. SYS:
oracle@apricot:~> sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Sun Apr 5 18:23:54 2015
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to an idle instance.
SQL>
1. SSH oracle. oracle
, , , root,
oracle:
login as: root
Using keyboard-interactive authentication.
Password:
Last login: Thu Apr 2 12:54:32 2015 from 192.168.77.38
apricot:~ # su - oracle
oracle@apricot:~>
2. Oracle,
ORACLE_SID:
oracle@apricot:~> export ORACLE_SID=ora11; echo $ORACLE_SID
ora11
oracle@apricot:~>
, ORACLE_SID
.
3.
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
The command completed successfully
oracle@apricot:~>
10
.
:
1. legacy- (imp/exp)
2. DataPump- (impdp/expdp).
3. SQL-
legacy-
!
Oracle Database Client. :
http://www.oracle.com/technetwork/database/enterprise-edition/downloads/112010-win32soft098987.html.
! ! , .
.
:
1.
2. ibpe_imp.conf:
file=ibpe.dump
ignore=y
indexes=y
rows=y
constraints=y
full=n
log=ibpe_imp.log
buffer=1048560
fromuser=ibpe
touser=ibpe
commit=y
userid=ibpe/password@db
userid
.
3. ibpe_imp.cmd
. log- ibpe_imp.log
11
DataPump
DataPump / Oracle.
.
!
Oracle
Client.
:
http://www.oracle.com/technetwork/database/enterprise-edition/downloads/112010-win32soft098987.html
! ! , .
.
:
1.
2. ibpe_impdp.conf:
USERID="sys/password@DB as sysdba"
SCHEMAS=IBPE
DIRECTORY=DATA_PUMP_DIR
LOGFILE=ibpe.log
DUMPFILE=ibpe.dump
12
USERID ,
( SYS) .
3. (*.dump) DATA_PUMP_DIR . ( $ORACLE_BASE/admin/$SID/dpdump ). DATA_PUMP_DIR
SQL-
select t.directory_path
'DATA_PUMP_DIR'
from
all_directories
where
t.directory_name
4. ibpe_impdp.cmd
. log- DATA_PUMP_DIR/ibpe.log
.
13
SQL-.
:
1. ibpe_schema.pdc DDL-,
2. ibpe_insert.pdc DML-,
! ! , .
.
:
1. (
)
2. ibpe_schema.pdc
sqlplus ibpe/password@DB @ibpe_schema.pdc
3. ibpe_insert.pdc
14
15
. -
, .
, IBPE,
.
, ,
.
drop_schema.pdc
sqlplus ibpe/password@DB @drop_schema.pdc <schema_name>
, SQL-:
select count(*) from all_objects where owner = 'IBPE' and object_type !=
'LOB';
16