Oracle之DBA入门二

Enable/Disable User Tracing
// 记录用户操作信息.
alter session set sql_trace=true;

alter database open read only;
desc dba_users;
select username, account_status from dba_users;
alter user hr account unlock;
alter user hr identified by hr;


---------------------
Chapter 4. Creating a DataBase

1.Choose a unique instance and database name.
2.Choose a database character set.
3.set operation system variables.
4.create the pfile
5.start the instance in nomount stage.
6.create and excute the create database command
7.run scripts to generate the data dictionary and so on.
8.create additional tablespaces as needed.

Step:Specify an Instance Identifier(SID).

initialization parameter file:
db_name=bbk

execute the create database command:

strings spfilewilson > initbbk.ora
:%s/wilson/bbk/g
:%s/*\.//g #去掉*.

mkdir bbk
cd bbk
mkdir archive
cd /u01/admin
cp -R wilson/ bbk
rm -f *

create tablespace mytabs datafile '..' size 100M extent management local;
spool log1.log
@?/rdbms/admin/catalog.sql;
@?/rdbms/admin/catproc.sql;
@?/sqlplus/admin/pupbld.sql;

desc dba_objects;
-----------------------------------
Chapter 5
Using Data Dictionary and Dynamic Performance Views

Three sets of static views
dba_xxx: what is in all the schemas.
all_xxx: What the user can access.
user_xxx: what is in the user's schema.

Dynamiv Performance Tables
Virtual tables
Information is accessed from memory and control file
owned by SYS
synonyms begin with v$
listed in v$fixed_table
v$controlfile
v$parameter
v$session
v$sga

Admin Script Naming
location : $oracle_home/rdbms/admin
cat*.sql : dd information
dbms*.sql: pl/sql package

Summary
identify built-in database objects
---------------------------------------
Chapter 6 Maintaining control file

A small binary file
Defines current state of physical database
Maintains integrity of database

alter system set control_files='file1.ctl','file2.ctl' scope=spfile;
shutdown immediate;
cp
show parameter control;

v$controlfile;
v$parameter
v$controlfile_record_section

17:37 2009-9-9
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值