11G以前查看告警日志文件
show parameter background_dump_dest
11G以后
show parameter diag
select name,value from diag_info;
2)
show parameter instance_name 查看实例名
db_name 查看数据库名
3)
用 orapwd 来创建口令文件
4)
remote_login_passwordfile 控制是否能远程登录
show parameter pass 可以查看
alter system set remote_login_passwordfile=exclusive scope=spfile;为静态参数,允许sysdba远程登录
5)
show user 查看当前登陆用户
6)
linux下查看oracle进程
ps -ef|grep ora_
7)
select name,default_tablespace from dba_users;查看用户和表空间
select name,value$ from props$ where name="DEFAULT_PERMANENT_TABLESPACE";查看默认表空间
8)
alter database backup controlfile to trace;将controlfile文件的创建语句跟踪到trace文件中
sql>recover database using backup controlfile untile cancel;创建控制文件后可以执行恢复(存在归档日志文件)
9)
exp username/password tablespaces=users transport_tablespace=y file=exp_users.dmp
imp username/password tablespaces=users transport_tablespace=y file=exp_users.dmp datafiles='user01.dbf'
导入导出
10)
col platform_name for a30
select d.platform_name,endian_format from v$transportable_platform tp, v$database d where tp.platform_name = d.platform_name 查看平台信息
select d.platform_name,endian_format from v$transportable_platform ;查看windows支持的平台信息
11)
rman>
comvert tablespace trans to platform 'minsoft windouw IA(32-bit)' format ''8tmp/%n_%f';
转换文件格式
创建相应用户后导入:
imp '/as sysdba' tablespace=trans transport_tablespace=y file=exp_trans.dmp datafiles = d:/...dbf
12)
select tablespace_name,status from dba_tablespaces;查看表空间状态
alter tablespace trans read write/only;改变表空间状态
13)
select *from dba_directories;
create directory ob as '路径'; 查看和创建目录
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/28889722/viewspace-1297602/
,如需转载,请注明出处,否则将追究法律责任。