DBA的工作列表上写了些什么?

文章作者 100test 发表时间 2008:04:19 12:37:06
来源 100Test.Com百考试题网


数据库管理员(DBA)的主要工作

启动和关闭数据库

一) 启动数据库

$ svrmgrl

SVRMGR> connect internal (实例启动)

SVRMGR> startup

二) 关闭数据库

$ svrmgrl

SVRMGR> connect internal

SVRMGR> shutdown [immediate/abort]

immediate:正在访问数据库的会话被完全终止、资源有序释放后才关闭 数据库。

abort: 会话立即中止,数据库立即关闭。

备份与恢复

一) 逻辑备份与恢复

1. 卸库:export

不带参数:

$ cd $ORACLE_HOME/bin

$ exp

Username: cwadmin

Password:

Connected to: Oracle8 Enterprise Edition Release 8.0.4.0.0 - Production

PL/SQL Release 8.0.4.0.0 - Production

Enter array fetch buffer size: 4096 >

Export file: expdat.dmp > pzexdat.dmp

(1) E(ntire database), (2)U(sers), or (3)T(ables): (2)U > 1

Export grants (yes/no): yes > y

Export table data (yes/no): yes > y

Compress extents (yes/no): yes >y

export 工作开始自动进行最终出现:

Export terminated successfully without warnings.

带参数,可选参数如下(可用exp help=y 得到):

Keyword Description (Default) Keyword Description (Default)

---------------------------------------------------------------------------------------------------

USERID username/password FULL export entire file (N)

BUFFER size of data buffer OWNER list of owner usernames

FILE output file (EXPDAT.DMP) TABLES list of table names

COMPRESS import into one extent (Y) RECORDLENGTH length of IO record

GRANTS export grants (Y) INCTYPE incremental export type

INDEXES export indexes (Y) RECORD track incr. export (Y)

ROWS export data rows (Y) PARFILE parameter filename

CONSTRAINTS export constraints (Y) CONSISTENT cross-table consistency

LOG log file of screen output STATISTICS analyze objects (ESTIMATE)

DIRECT direct path (N)

FEEDBACK display progress every x rows (0)

POINT_IN_TIME_RECOVER Tablespace Point-in-time Recovery (N)

RECOVERY_TABLESPACES List of tablespace names to recover

VOLSIZE number of bytes to write to each tape volume

例:$exp userid=cwadmin/cwadmin tables=’(sys_cwxx,sys_menu)’ file=pzexport.dmp

2. 装库:

不带参数

$ cd $ORACLE_HOME/bin

$ imp

Username: cwadmin

Password:

Connected to: Oracle8 Enterprise Edition Release 8.0.4.0.0 - Production

PL/SQL Release 8.0.4.0.0 - Production

Import file: expdat.dmp > pzexdat.dmp

Enter insert buffer size (minimum is 4096) 30720> 10240

Export file created by EXPORT:V08.00.04 via conventional path

List contents of import file only (yes/no): no >

Ignore create error due to object existence (yes/no): no > y

Import grants (yes/no):yes > y

Import table data (yes/no):yes >y

Import entire export file (yes/no):no >y

import 工作开始自动进行最终出现:

Import terminated successfully with warnings.

带参数,可选参数如下(可用imp help=y 得到):

Keyword Description (Default) Keyword Description (Default)

---------------------------------------------------------------------------------------------------

USERID username/password FULL import entire file (N)

BUFFER size of data buffer FROMUSER list of owner usernames

FILE input file (EXPDAT.DMP) TOUSER list of usernames

SHOW just list file contents (N) TABLES list of table names

IGNORE ignore create errors (N) RECORDLENGTH length of IO record

GRANTS import grants (Y) INCTYPE incremental import type

INDEXES import indexes (Y) COMMIT commit array insert (N)

ROWS import data rows (Y) PARFILE parameter filename

LOG log file of screen output

DESTROY overwrite tablespace data file (N)

INDEXFILE write table/index info to specified file

CHARSET character set of export file (NLS_LANG)

POINT_IN_TIME_RECOVER Tablespace Point-in-time Recovery (N)

SKIP_UNUSABLE_INDEXES skip maintenance of unusable indexes (N)

ANALYZE execute ANALYZE statements in dump file (Y)

FEEDBACK display progress every x rows(0)

VOLSIZE number of bytes in file on each volume of a file on tape

例:$imp userid=cwadmin/cwadmin tables=’(sys_dwxx, sys_menu)’ file=pzexdat.dmp


相关文章


数据库规范化原理基础介绍
取得指定的记录与使用外关联查询
Oracle中的I tance和数据库的区别
在数据字典中修改Oracle的表列名
DBA的工作列表上写了些什么?
利用UTL_MAIL发送电子邮件
ring入门之理解 ring的打包方式
一个国产Java报表的引擎配置案例
Web程序从Struts向Stripes框架的移植
澳大利亚华人论坛
考好网
日本华人论坛
华人移民留学论坛
英国华人论坛