首页 技术 正文
技术 2022年11月18日
0 收藏 473 点赞 3,824 浏览 1301 个字

数据库启动的不同状态:

nomount状态:spfile和plile

mount状态:control file

open状态:data file和redo file

启动数据库的过程:nomount状态(spfile和plife文件)—>mount状态(control file)—>open状态(data file和redo file)

如果数据库安装了多个数据库,需要在sqlplus中登陆数据库,需要设置oracle数据库的黄静变量:

SQL>set ORACLE_SID=ORCL

集群数据库:一个数据库多个实例。

关闭数据库的4个不同指令:

SQL>shutdown immediare

SQL>shutdown abort

SQL>shutdown transactional

SQL>shutdown normal

启动数据库到nomount状态:

SQL>startup nomount

查找初始化文件(splife)的位置:

SQL>show parameter spfile

查找控制文件位置:v$controlfile表

SQL>select name from v$controlfile;

pfile文件为文本文档,可以通过spfile文件创建prile文件:

SQL>create pfile=’d:\pfile.ora’ from spfile;

如何根据pfile文件启动数据库到nomount状态:

SQL>shutdown immediate

SQL>startup nomount pfile=’d:\pfile.ora’

从数据库的nomount状态改为mount状态:

SQL>alter database mount;

查看控制文件的内容,trace跟踪:

SQL>alter database backup controlfile to trace as ‘d:\ctl.trc’

记事本打开crl.trc

查看数据文件位置:

SQL>select name from v$datafile;

SQL>select member from v$logfile;

数据库密码文件,作用是允许数据库的sysdba和sysoper用户通过口令来远程登录。

windows下密码文件在oracle的$_ORACL_HOME/database、目录下,一般文件名为:pwdorcl.ora

linux下密码文件在$ORACLE_HOME/dbs/目录下,一般文件名为:orapworcl。

查看数据库是否允许远程登录:

SQL>show parameter remote_login_passwordfile

如何设置数据库禁止用户远程登录:

SQL>alter system set remote_login_passwordfile=NONE scope=spfile;

查询表空间:

SQL>select * from dba_tablespace;

查询数据文件:

SQL>select * from dba_data_files;

查询重做日志文件:

SQL>select * from v$logfile;

数据字典表:

dba_spacetables

dba_data_files

v$logfile

v$controlfile

v$datafile

相关推荐
python开发_常用的python模块及安装方法
adodb:我们领导推荐的数据库连接组件bsddb3:BerkeleyDB的连接组件Cheetah-1.0:我比较喜欢这个版本的cheeta…
日期:2022-11-24 点赞:878 阅读:9,083
Educational Codeforces Round 11 C. Hard Process 二分
C. Hard Process题目连接:http://www.codeforces.com/contest/660/problem/CDes…
日期:2022-11-24 点赞:807 阅读:5,558
下载Ubuntn 17.04 内核源代码
zengkefu@server1:/usr/src$ uname -aLinux server1 4.10.0-19-generic #21…
日期:2022-11-24 点赞:569 阅读:6,407
可用Active Desktop Calendar V7.86 注册码序列号
可用Active Desktop Calendar V7.86 注册码序列号Name: www.greendown.cn Code: &nb…
日期:2022-11-24 点赞:733 阅读:6,180
Android调用系统相机、自定义相机、处理大图片
Android调用系统相机和自定义相机实例本博文主要是介绍了android上使用相机进行拍照并显示的两种方式,并且由于涉及到要把拍到的照片显…
日期:2022-11-24 点赞:512 阅读:7,817
Struts的使用
一、Struts2的获取  Struts的官方网站为:http://struts.apache.org/  下载完Struts2的jar包,…
日期:2022-11-24 点赞:671 阅读:4,900