顯示具有 oracle 標籤的文章。 顯示所有文章
顯示具有 oracle 標籤的文章。 顯示所有文章

2011年2月16日 星期三

Oracle Dump DB Command

sqlplus system/manager@oracle11g

# dump table
exp ${USERNAME}/${PASSWORD}@${TNSNAME} \
FULL=y FILE=${DEST_NAME}.dmp \
LOG=${DEST_NAME}.log CONSISTENT=y

# dump all table
exp system/manager FULL=y FILE=demo.dmp LOG=demo.log 

# import .dmp file
imp system/manager@oracle11g FILE=t.dmp LOG=tImp.log \
fromuser=system touser=system tables=tt

2011年2月10日 星期四

Basic commands of Oracle

# find the tnsnames.or file
echo $ORACLE_HOME
vim $ORACLE_HOME/network/admin/tnsnames.ora

####################################################################
# the tnsnames.ora file could like the following text
# 'informatica11g' is its tnsname of Oracle
####################################################################
# informatica11g=
#  (DESCRIPTION =
#    (ADDRESS = (PROTOCOL = TCP)(HOST = ${IP} )(PORT = ${PORT}))
#    (CONNECT_DATA =
#      (SERVER = DEDICATED)
#      (SERVICE_NAME = orcl)
#    )
#  )

# start Oracle
dbstart $ORACLE_HOME

# enter SQL mode
sqlplus system@informatica11g

####################################################################
# reverse engineering side config
####################################################################
vim /cygdrive/e/app/b/product/11.2.0/client_2/network/admin/tnsnames.ora