oracle期末考试试题.doc_第1页
oracle期末考试试题.doc_第2页
oracle期末考试试题.doc_第3页
oracle期末考试试题.doc_第4页
oracle期末考试试题.doc_第5页
已阅读5页,还剩10页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1.如何启动实例、如何装载数据库,如何打开数据库。Startup nomount alter database mount alter database openStartup mountStartup2.如何禁止用户的操作系统认证 禁止之后,怎么登录?修改SQLNET.ora nts3. 如何控制用户不可以远程登陆。Alter system set remote_login_passwordfile=exclusive noneComment=2009-12-14Scope=spfile;4.sys/siasorcl as sysdba 中orcl的解析5.修改服务器端orcl 的监听端口。6.创建密码文件。 $orapwd file=e:orapwd.oraPasswd=nzg entries=30;7.怎么样从spfile生成pfileCreate pfile=d:pfileorcl.ora from spfile;Create spfile=e:spfileorcl.ora form pfile=d:pfileorcl.ora;8.通过参数文件查看控制文件的位置Show parameter control_file; select name from v$controlfile;(在例程连接数据库后Mount可执行)。 可通过以下几个动态数据字典视图中获得有关控制文件的信息V$controlfile v$database V$controlfile_record_section Select name from v$database; 显示数据库名称。9.为控制文件产生一个跟踪文件Alter database backup controlfile to trace; 该文件在D:oracleproduct10.2.0adminorcludump可通过 show parameter user_dump_dest;查看目录。10. 创建表空间new,默认的对象存储参数为initial为500k,next为100k,minextents为1,maxextents为50,pctincrease为0 Create tablespace new Datafile d:new.dbf size 10m Default storage (initial 500k Next 100k Minextents 1 Maxextents 50 Pctincrease 0);11. 创建表空间newtbs,将数据库的默认表空间改为newtbs Create tablespace newtbsDatafile d:newths.dbf size 10m;Alter database default tablespace newtbs;12. 创建临时表空间temptbs,将数据库的默认临时表空间改为temptbsCreate temporary tablespace temptbstempfile e:temp.dbf size 10m;Alter database default temporary tablespace temptbs;13. 创建表空间tt,并且使它在创建后联机,之后再修改为脱机Create tablespace ttDatafile d:tt.dbf size 10m online;Alter tablespace tt offline;14. 创建本地管理的表空间aa,建表test并将表放入表空间aa中,然后删除该表空间以及对应的数据文件 Create tablespace aa Datafile d:aa.dbf size 10m Extent management local autoallocate; Create table test(aa int, bb int) tablespace aa;Drop tablespace aa including contents (cascade constraints约束);15. 创建表空间bb,对应的数据文件为2个Create tablespace bbDatafile d:bb1.dbf size 10m , e:bb2.dbf size 5m;16. 创建表空间cc,然后将其数据文件移动到另外一个文件夹中1.Create tablespace ccDatafile d:cc.dbf size 10m;2.alter tablespace cc offline;3.$copy d:cc.dbf e:cc.dbf4.alter tablespace ccRename datafile d:cc.dbf to e:cc.dbf;5.alter tablespace cc online;#数据文件脱机1.Select log_modeFrom v$database; 数据文件只能在noarchivelog模式下脱机2.Alter databaseDatafile e:cc.dbf offline drop;3Recover datafile e:cc.dbf; 介质恢复之后才能联机4. alter database datafile e:cc.dbf online;17. 创建大文件表空间,大小为10mCreate bigfile tablespace ddDatafile d:dd.dbf size 10m;18. 创建本地管理的表空间ee,统一分配大小为10mCreate tablespace eeDatafile d:ee.dbf size 100mExtent management local uniform size 10m;(有、无都对)19. 创建表空间hh,采用自动段空间管理Create tablespace hhDatafile d:hh.dbf size 10m reuseSegment space management auto ;20. 查看日志操作模式,改变数据库的归档模式为archivelogSelect log_modeFrom v$database;shutdown immediatestartup mountalter database archivelog;alter database open;21.查看日志文件以及日志文件组的信息Select group# ,memberFrom v$logfile; 查看文件位置Select group# ,statusFrom v$log; 查看状态22.添加日志文件组,然后删除新添加的日志文件组Alter databaseAdd logfile (d:log4.log) size 10m;Alter databaseDrop logfile (d:log4.log);#添加日志组成员:Alter databaseAdd logfile member e:newlog.log to group 1;#删除日志组成员Alter system switch logfile;Alter databaseDrop logfile member e:newlog.log;23. 手工切换日志Alter system switch logfile;24. 任意创建一个表,采用区间分区Create table RR(range_col data,Aa int)Partition by range(range_col)(partition part1 values less than (to_date(01/01/2009,dd/mm/yyyy),Partition part2 values less than (to_date(01/01/2009,dd/mm/yyyy),Partition part3 values less than(maxvalue);25. 任意创建一个表,采用散列分区Create tablespace p1Datafile d:p1.dbf size 10mCreate tablespace p2Datafile d:p2.dbf size 10m;Create table hash_t来源:(/s/blog_631f39d50100grca.html) - oracle期末考试试题及其部分疑问_小泥人_新浪博客 (hh int,Bb int )Partition by hash(hh)(Partition part1 tablespace p1,Partition part2 tablespace p2);26. 任意创建一个表,采用列表分区Create table list_t(list_col varchar2(20),Bb int)Partition by list(list_col)(partition part1 values(wo,de,en),Partition part2 values(zhao,gong,zuo),Partition part3 values(yao,cheng,hao);27. 任意创建一个表,采用组合分区Create table com(rr int, hh int, cc int)Partition by range (rr)Subpartition by hash(hh) subpartitions 2(partition part1 values less than (10) (subpartition part1_sub1 -tablespace p1 , 后面这个tablespace加不加都可以的 Subpartition part1_sub2 -tablespace p2),Partition part2 values less than (20) (subpartition part2_sub1 -tablespace p1, Subpartition part2_sub2-tablespace p2);28.创建用户u1,默认表空间为test,第一次登陆必须修改密码Create user u1 identified by u1default tablespace testpassword expire;29.创建用户u2,将其锁定,然后解锁Create user u2 identified by u2;Alter user u2 account lock;Alter user u2 account unlock;30. 创建用户u3,为它分配系统权限,能够连接数据库,并能创建表Create user u3 identified by u3Grant create session ,create table to u3;31. 创建用户u4,为它分配连接数据库的权限,并允许它能将此权限分配给其它用户Create user u4 identified by u4Grant create session to u4With admin option;32.创建用户u5,为它分配查询,更新表test的权限,并允许它将此权限分配给其它用户Create user u5 identified by u5;Grant select,update on test to u5With grant option;33. 撤销用户u5的查询和更新权限Revoke select ,update on test from u5;34. 创建用户u6,能查看修改TEST中的aa 列。Create user u6 identified by u6;Grant select ,update (aa) on test to u6;35. 创建用户u1,创建角色r1,r2,其中r2 密码为r2,将角色r1 r2 授权给u1Create role r1 not identified;Create role r2 identified by r2Grant r1,r2 to u1;36. 给r1授权为create session,以及查询sys方案中的表test,给r2授权,修改sys 方案中的test表37.修改用户u1,默认角色为r1Alter user u1 default role r1;38. u1想修改sys方案中的test,激活r2,修改后禁止r2角色set role r2 identified by r2;update sys.test set aa=aa+100;set role all except r2;39. 创建用户u2,允许密码修改3次,密码锁定10天Create user u2 identified by u2;Create profile p1LimitFailed_login_attempts 3Password_lock_time 10;Alter user u2 profile p1;40. 创建用户u3,允许密码使用5天,5天后必须修改密码,并且密码与前密码不同Create user u3 identified by u3Create profile p2LimitPassword_life_time 5Password_grace_time 5Password_reuse_max unlimited;Alter user u3 profile p2;41. 创建用户u4,口令使用校验函数verify_function d:oracleproduct10.2.0db_1rdbmsadminutlpwdmg.sql;Create profile p4LimitPassword_verify_function verify_function;Create user u4 identified by user123#;42. 激活资源限制Alter sy

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论