oracle常用指令Word下载.docx

上传人:b****2 文档编号:5787824 上传时间:2023-05-05 格式:DOCX 页数:67 大小:35.82KB
下载 相关 举报
oracle常用指令Word下载.docx_第1页
第1页 / 共67页
oracle常用指令Word下载.docx_第2页
第2页 / 共67页
oracle常用指令Word下载.docx_第3页
第3页 / 共67页
oracle常用指令Word下载.docx_第4页
第4页 / 共67页
oracle常用指令Word下载.docx_第5页
第5页 / 共67页
oracle常用指令Word下载.docx_第6页
第6页 / 共67页
oracle常用指令Word下载.docx_第7页
第7页 / 共67页
oracle常用指令Word下载.docx_第8页
第8页 / 共67页
oracle常用指令Word下载.docx_第9页
第9页 / 共67页
oracle常用指令Word下载.docx_第10页
第10页 / 共67页
oracle常用指令Word下载.docx_第11页
第11页 / 共67页
oracle常用指令Word下载.docx_第12页
第12页 / 共67页
oracle常用指令Word下载.docx_第13页
第13页 / 共67页
oracle常用指令Word下载.docx_第14页
第14页 / 共67页
oracle常用指令Word下载.docx_第15页
第15页 / 共67页
oracle常用指令Word下载.docx_第16页
第16页 / 共67页
oracle常用指令Word下载.docx_第17页
第17页 / 共67页
oracle常用指令Word下载.docx_第18页
第18页 / 共67页
oracle常用指令Word下载.docx_第19页
第19页 / 共67页
oracle常用指令Word下载.docx_第20页
第20页 / 共67页
亲,该文档总共67页,到这儿已超出免费预览范围,如果喜欢就下载吧!
下载资源
资源描述

oracle常用指令Word下载.docx

《oracle常用指令Word下载.docx》由会员分享,可在线阅读,更多相关《oracle常用指令Word下载.docx(67页珍藏版)》请在冰点文库上搜索。

oracle常用指令Word下载.docx

db_cache_size'

13查看所有含有SIZE的信息

showparametersize

bitmap_merge_area_sizeinteger1048576

create_bitmap_area_sizeinteger8388608

db_16k_cache_sizebiginteger0

db_2k_cache_sizebiginteger0

db_32k_cache_sizebiginteger0

db_4k_cache_sizebiginteger0

db_8k_cache_sizebiginteger0

db_block_sizeinteger4096

db_cache_sizebiginteger33554432

db_keep_cache_sizebiginteger0

db_recycle_cache_sizebiginteger0

NAMETYPEVALUE

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

global_context_pool_sizestring

hash_area_sizeinteger1048576

java_max_sessionspace_sizeinteger0

java_pool_sizebiginteger33554432

large_pool_sizebiginteger8388608

max_dump_file_sizestringUNLIMITED

object_cache_max_size_percentinteger10

object_cache_optimal_sizeinteger102400

olap_page_pool_sizeinteger33554432

oracle_trace_collection_sizeinteger5242880

parallel_execution_message_sizeinteger2148

sga_max_sizebiginteger143727516

shared_pool_reserved_sizebiginteger2516582

shared_pool_sizebiginteger50331648

sort_area_retained_sizeinteger0

sort_area_sizeinteger524288

workarea_size_policystringAUTO

14显示SGA的信息

select*fromv$sgastat;

POOLNAMEBYTES

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

fixed_sga453532

buffer_cache33554432

log_buffer656384

sharedpoolsubheap46884

sharedpoolKGKheap3756

sharedpoolKQRMPO586792

sharedpoolKQRSPO180232

sharedpoolKQRSSO5128

sharedpoolsessions410720

sharedpoolsqlarea2144664

sharedpool1Mbuffer2098176

sharedpoolKGLSheap901756

sharedpoolparameters8352

sharedpoolfreememory38687204

sharedpoolPL/SQLDIANA420816

sharedpoolFileOpenBlock695504

sharedpoolPL/SQLMPCODE135692

sharedpoollibrarycache2985576

sharedpoolmiscellaneous4889396

sharedpoolMTTRadvisory21164

sharedpoolPLSnon-libhp2068

sharedpoolXDBSchemaCac4966300

sharedpooljoxsheapinit4220

sharedpoolkglsimulator563260

sharedpoolsimmemoryhea44184

sharedpooltabledefiniti1728

sharedpooltriggerdefini1896

sharedpooltriggerinform.1140

sharedpooltriggersource448

sharedpooltypeobjectde69120

sharedpoolCheckpointqueue282304

sharedpoolVIRTUALCIRCUITS265160

sharedpooldictionarycache1610880

sharedpoolKSXRreceivebuffers1033000

sharedpoolcharactersetobject323724

sharedpoolFileIdentificatonBlock323292

sharedpoolmessagepoolfreequeue834752

sharedpoolKSXRpendingmessagesque841036

sharedpooleventstatisticspersess1718360

sharedpoolfixedallocationcallback180

largepoolfreememory8388608

javapoolfreememory33554432

已选择42行。

15显示PGA的信息

select*fromv$pgastat;

NAMEVALUEUNIT

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

aggregatePGAtargetparameter16777216bytes

aggregatePGAautotarget7640064bytes

globalmemorybound838656bytes

totalPGAinuse8293376bytes

totalPGAallocated13106176bytes

maximumPGAallocated22090752bytes

totalfreeablePGAmemory0bytes

PGAmemoryfreedbacktoOS0bytes

totalPGAusedforautoworkareas0bytes

maximumPGAusedforautoworkareas4096bytes

totalPGAusedformanualworkareas0bytes

maximumPGAusedformanualworkareas4096bytes

overallocationcount0

bytesprocessed8783872bytes

extrabytesread/written0bytes

cachehitpercentage100percent

已选择16行。

17在$ORACLE_HOME/sqlplus/admin/glogin.sql中加入环境变量,以后每次启动生效

define_editor=vi

setline2000

18将当前命令随加到文件中

savec:

a.sqlappend

19将指定文件的命读出缓冲区

getc:

a.sql

20执行脚本语句

@c:

21将输入保存到指定文件中

spoolc:

O.LOG

select*fromv$sga;

spooloff

22设定行大小

setlinesize2000

23设定页大小

setpagesize10

24设定字符列格式

colenameformata30

25设定数字列格式

colsalformat999,999.999

2610G查看文件$ORACLE_HOME/install/protlist显示端口

http:

//127.0.0.1:

5560/isqlplus

9i查看文件$ORACLE_HOME/Apache/Apache/ports.ini显示端口

7778/isqlplus

7778/isqlplusdba

27启动Oracle9i监听程序

Oracle的监听程序主要是为客户端的连接提供接口

$lsnrctlstart

28关闭Oracle9i监听程序

$lsnrctlstop

29启动OracleWebServer

$cd$ORACLE_HOME/Apache/Apache/bin

$./startJServ.sh

/database/oracle/product/9i/Apache/Apache/bin/apachectlstart:

httpdstarted

30关闭OracleWebServer

$./stopJServ.sh

/database/oracle/product/9i/Apache/Apache/bin/apachectlstop:

httpdstopped

31启动OracleWebServer后默认的端口号是7777

unix

cd$ORACLE_HOME/Apache/Apache/bin/

htpasswd$ORACLE_HOME/sqlplus/admin/iplusdba.pwadmin

windows

cdD:

oracleora92ApacheApachebin

htpasswdD:

oracleora92/sqlplus/admin/iplusdba.pwadmin

Newpassword:

*****

Re-typenewpassword:

Addingpasswordforuseradmin

32pfile:

$ORACLE_BASE/admin/实例名/Pfile

spfile:

$ORACLE_HOME/dbs

监听器配置文件:

listener.ora:

$ORACLE_HOME/network/admin/

tnsnames.ora:

33指定用户的表空间

SELECTDEFAULT_TABLESPACEFROMDBA_USERSWHEREUSERNAME='

用户名'

34当前用户

selectuserfromdual;

35当前用户的缺省表空间

SELECTDEFAULT_TABLESPACEFROMDBA_USERSWHEREUSERNAME=(selectuserfromdual);

37显示正在使用的初始化参数文件

showparameterspfile

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

spfilestring%ORACLE_HOME%DATABASESPFILE%

ORACLE_SID%.ORA

38用SPfile转Pfile

createpfile='

c:

init.ora'

fromspfile;

createpfilefromspfile;

UNIX将生成在$ORACLE_HOME/dbs目录下

WINDOWS将生成在$ORACLE_HOME/DATABASE目录下

39显示cache的值

showparametercache

前面两个下划线的是动态调整的参数

前面一个下划线的是内部参数

40显示正在使用的参数和文本参数值

select*fromv$parameter;

select*fromv$spparameter;

41显示动态性能视图的结构

descv$parameter;

名称

NUM

NAME

TYPE

VALUE

ISDEFAULT

ISSES_MODIFIABLE

ISSYS_MODIFIABLE

ISMODIFIED

ISADJUSTED

DESCRIPTION

UPDATE_COMMENT

42有条件的显示动态参数

select*fromv$parameterwherenamelike'

%db_cache%'

43修改参数语句

altersystemsetsga_max_size=256mscope=spfile;

&

&

写入SPFILE,重启生效

altersystemsetsga_max_size=256mscope=memory;

写入内存区,立即生效

altersystemsetsga_max_size=256mscope=both;

即写入内存区,又写入SPFILE,默认为BOTH.

44动态调整large_pool_size的语句

altersystemsetlarge_pool_size=16M;

45当前正在使用的SGA的大小

selectsum(bytes)/1024/1024fromv$sgastat;

46设置db_cache_size的大小保存在SPFILE

altersystemsetdb_cache_size=128mscope=spfile;

47设置shared_pool_size的大小保存在SPFILE中

altersystemsetshared_pool_size=80mscope=spfile;

48显示PGA的状态

showparameterpga

pga_aggregate_targetbiginteger16777216

49带PFILE来启动资料库,?

代表ORACLE的主目录

startuppfile=?

databaseinitmydb.ora

50显示当前数据库的状态,mount的状态下就可以查看数据库的状态

selectopen_modefromv$database;

51显示当前实例nomount状态下就可以查看实例

select*fromv$instance;

52显示background_dump_dest的路径,

showparameterbackground_dump_dest

background_dump_deststringD:

oracleadminthwerpbdump

53显示当有用户的表

select*fromuser_tables;

54显示当有用户可以访问表

select*fromall_tables;

55显示用户为SCOTT的表

select*fromdba_tableswherewner='

SCOTT'

56显示所有用户信息

select*fromdba_users;

57建立用户并指定密码

createuseredpthwidentifiedbyedpthw;

58给用户授权

grantconnect,resourcetoedpthw;

59建立一个表

createtablea(aint);

60显示数据字典中表名为USER开头的表名

selecttable_namefromdictwheretable_namelike'

USER%'

61在UNIX下oerrora错误号查看错误的帮助信息.

62在unix查看日志中有哪些错误

grepORAalert_PROD.log|tail-10

63显示当前实例

SELECT*FROMV$INSTANCE;

64显示当前数据库信息

SELECT*FROMV$DATABASE;

65显示当前ORACLR资料的版本

SELECT*FROMV$VERSION;

66显示当前的选项

SELECT*FROMV$OPTION;

67显示当前实例的初始化参数

SELECT*FROMV$PARAMETER;

68显示数据文件

SELECT*FROMV$DATAFILE;

69显示日志文件

SELECT*FROMV$LOGFILE

70显示控制文件

SELECT*FROMV$CONTROLFILE;

71显示当有有哪些会话

SELECT*FROMV$SESSION;

72显示当前有哪些进程

SELECT*FROMV$PROCESS;

73显示当前后台进程

SELECT*FROMV$BGPROCESS;

74显示SGA的大小

SELECT*FROMV$SGA;

75显示SGA的统计数

SELECT*FROMV$SGASTAT;

76显示PGA的统计数

SELECT*FROMV$PGASTAT;

77显示有哪些控制文件

SHOWPARAMETERCONTROL_FILES;

78增加一个控制文件一定要在NOMOUNT状态下进行.语句如下.

altersystemsetcontrol_files='

D:

ORADATAMYDBCONTROL01.CTL'

'

ORADATAMYDBCONTROL02.CTL'

ORADATAMYDBCONTROL03.CTL'

E:

CONTROL04.CTL'

SCOPE=SPFILE;

oracleoradatathwerpCONTROL01.CTL'

oracleoradatathwerpCONTROL02.CTL'

oracleoradatathwerpCONTROL03.CTL'

oracleoradatathwerpCONTROL04.CTL'

scope=spfile;

79数据重新启动

STARTUPFORCE

80显示当前控制文件

SHOWPARAMETERCONTROL

81删除一个控制文件

SCOPE=SPFILE

82显示当前使用的日志

SELECT*FROMV$LOG;

83显示实例的归档模式

ARCHIVELOGLIST;

84显示重做日志文件

SELECT*FR

展开阅读全文
相关资源
猜你喜欢
相关搜索
资源标签

当前位置:首页 > 解决方案 > 学习计划

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2