oracle期末考试试题及其部分疑问.docx

上传人:b****5 文档编号:2858072 上传时间:2022-11-16 格式:DOCX 页数:16 大小:21.31KB
下载 相关 举报
oracle期末考试试题及其部分疑问.docx_第1页
第1页 / 共16页
oracle期末考试试题及其部分疑问.docx_第2页
第2页 / 共16页
oracle期末考试试题及其部分疑问.docx_第3页
第3页 / 共16页
oracle期末考试试题及其部分疑问.docx_第4页
第4页 / 共16页
oracle期末考试试题及其部分疑问.docx_第5页
第5页 / 共16页
点击查看更多>>
下载资源
资源描述

oracle期末考试试题及其部分疑问.docx

《oracle期末考试试题及其部分疑问.docx》由会员分享,可在线阅读,更多相关《oracle期末考试试题及其部分疑问.docx(16页珍藏版)》请在冰豆网上搜索。

oracle期末考试试题及其部分疑问.docx

oracle期末考试试题及其部分疑问

oracle期末考试试题及其部分疑问

 

1.  如何启动实例、如何装载数据库,如何打开数据库。

Startupnomount alterdatabasemount  alterdatabaseopen

Startup mount

Startup

2.  如何禁止用户的操作系统认证  禁止之后,怎么登录?

修改SQLNET.ora nts

3. 如何控制用户不可以远程登陆。

Altersystemsetremote_login_passwordfile=exclusive none

Comment=’2009-12-14’

Scope=spfile;

4.  sys/sias@orclassysdba中orcl的解析

5.  修改服务器端orcl的监听端口。

6.  创建密码文件。

 $orapwdfile='e:

\orapwd.ora'    Passwd=nzgentries=30;

7.  怎么样从spfile生成pfile

Createpfile=’d:

\pfileorcl.ora’fromspfile;

Createspfile=’e:

\spfileorcl.ora’formpfile=’d:

\pfileorcl.ora’;

8.  通过参数文件查看控制文件的位置

Showparametercontrol_file; selectnamefromv$controlfile;(在例程连接数据库后Mount可执行)。

 可通过以下几个动态数据字典视图中获得有关控制文件的信息

V$controlfile  v$database  V$controlfile_record_section

 Selectnamefromv$database;  显示数据库名称。

9.    为控制文件产生一个跟踪文件

Alterdatabasebackupcontrolfiletotrace;该文件在D:

\oracle\product\10.2.0\admin\orcl\udump

可通过showparameteruser_dump_dest;查看目录。

10.  创建表空间new,默认的对象存储参数为initial为500k,next为100k,minextents为1,maxextents为50,pctincrease为0

     Createtablespacenew

      Datafile‘d:

\new.dbf’size10m

      Defaultstorage

      (initial500k

      Next100k

      Minextents1

      Maxextents50

      Pctincrease0);

  

11.  创建表空间newtbs,将数据库的默认表空间改为newtbs

    Createtablespacenewtbs

Datafile‘d:

\newths.dbf’size10m;

 

Alterdatabasedefaulttablespacenewtbs;

 

12.  创建临时表空间temptbs,将数据库的默认临时表空间改为temptbs

Createtemporarytablespacetemptbs

tempfile‘e:

\temp.dbf’size10m;

Alterdatabasedefaulttemporarytablespacetemptbs;

13.  创建表空间tt,并且使它在创建后联机,之后再修改为脱机

Createtablespacett

Datafile‘d:

\tt.dbf’size10monline;

 Altertablespacettoffline;

 

14.  创建本地管理的表空间aa,建表test并将表放入表空间aa中,然后删除该表空间以及对应的数据文件

     Createtablespaceaa

     Datafile‘d:

\aa.dbf’size10m

     Extentmanagementlocalautoallocate;

 

    Createtabletest

(aaint, bbint) tablespaceaa;

Droptablespaceaaincludingcontents(cascadeconstraints约束);

 

15.  创建表空间bb,对应的数据文件为2个

Createtablespacebb

Datafile‘d:

\bb1.dbf’size10m, 

     ‘e:

\bb2.dbf’size5m;'

 

16.  创建表空间cc,然后将其数据文件移动到另外一个文件夹中

1.Createtablespacecc

Datafile‘d:

\cc.dbf’size10m;

2.altertablespaceccoffline;

3.$copyd:

\cc.dbf e:

\cc.dbf

4.altertablespacecc

Renamedatafile‘d:

\cc.dbf’to‘e:

\cc.dbf’;

5.altertablespacecconline;

######数据文件脱机

1.Selectlog_mode

Fromv$database; \\数据文件只能在noarchivelog模式下脱机

2.Alterdatabase

Datafile‘e:

\cc.dbf’offlinedrop;

3.Recoverdatafile‘e:

\cc.dbf’; \\介质恢复之后才能联机

4.alterdatabasedatafile‘e:

\cc.dbf’online;

 

17.  创建大文件表空间,大小为10m

Createbigfiletablespacedd

Datafile‘d:

\dd.dbf’size10m;

 

18.  创建本地管理的表空间ee,统一分配大小为10m

Createtablespaceee

Datafile‘d:

\ee.dbf’size100m

Extentmanagementlocaluniformsize10m;(有、无都对)

 

19.  创建表空间hh,采用自动段空间管理

Createtablespacehh

Datafile‘d:

\hh.dbf’size10mreuse

Segmentspacemanagementauto;

 

20.  查看日志操作模式,改变数据库的归档模式为archivelog

Selectlog_mode

Fromv$database; 

 

shutdownimmediate

startupmount

alterdatabasearchivelog;

alterdatabaseopen;

 

21.  查看日志文件以及日志文件组的信息

Selectgroup#,member

Fromv$logfile;  查看文件位置

Selectgroup#,status

Fromv$log;   查看状态

 

22.  添加日志文件组,然后删除新添加的日志文件组

Alterdatabase

Addlogfile(‘d:

\log4.log’)size10m;

Alterdatabase

Droplogfile(‘d:

\log4.log’);

#######添加日志组成员:

Alterdatabase

Addlogfilemember‘e:

\newlog.log’togroup1;

######删除日志组成员

Altersystemswitchlogfile;

Alterdatabase

Droplogfilemember‘e:

\newlog.log’;

 

23.  手工切换日志

Altersystemswitchlogfile;

 

28.  创建用户u1,默认表空间为test,第一次登陆必须修改密码

Createuseru1identifiedbyu1

defaulttablespacetest

passwordexpire;

 

29. 创建用户u2,将其锁定,然后解锁

Createuseru2identifiedbyu2;

Alteruseru2accountlock;

Alteruseru2accountunlock;

 

30.  创建用户u3,为它分配系统权限,能够连接数据库,并能创建表

Createuseru3identifiedbyu3

Grantcreatesession,createtabletou3;

 

31.  创建用户u4,为它分配连接数据库的权限,并允许它能将此权限分配给其它用户

Createuseru4identifiedbyu4

Grantcreatesessiontou4

Withadminoption;

 

32.  创建用户u5,为它分配查询,更新表test的权限,并允许它将此权限分配给其它用户

Createuseru5identifiedbyu5;

Grantselect,updateontesttou5

Withgrantoption;

 

33.   撤销用户u5的查询和更新权限

Revokeselect,updateontestfromu5;

 

34.  创建用户u6,能查看修改TEST中的aa列。

Createuseru6identifiedbyu6;

Grantselect,update(aa)ontesttou6;

 

35.  创建用户u1,创建角色r1,r2,其中r2密码为r2,将角色r1r2授权给u1

Createroler1notidentified;

Createroler2identifiedbyr2

Grantr1,r2tou1;

 

36.  给r1授权为createsession,以及查询sys方案中的表test,给r2授权,修改sys方案中的test表

 

37.  修改用户u1,默认角色为r1

Alteruseru1defaultroler1;

选择(每题3分)

1)

当Oracle服务器启动时,下列哪种文件不是必须的()。

a)

数据文件

b)

控制文件

c)

日志文件

d)

归档日志文件

参考答案

D

2)

在Oracle中,当用户要执行SELECT语句时,下列哪个进程从磁盘获得用户需要的数据()。

a)

用户进程

b)

服务器进程

c)

日志写入进程(LGWR)

d)

检查点进程(CKPT)

参考答案

B

3)

在Oracle中,一个用户拥有的所有数据库对象统称为()。

a)

数据库

b)

模式

c)

表空间

d)

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

当前位置:首页 > 表格模板 > 调查报告

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1