前言:
现在大家对“oracle怎么查询序列”大体比较讲究,小伙伴们都想要分析一些“oracle怎么查询序列”的相关知识。那么小编同时在网摘上搜集了一些对于“oracle怎么查询序列””的相关内容,希望各位老铁们能喜欢,大家一起来学习一下吧!创建序列:
SQL> create sequence dept_seq
minvalue 60
maxvalue 10000
start with 60
increment by 10;
2.RMAN删除备份:
删除备份(保留最近1天备份的情况下,删除其他备份):
RMAN> delete noprompt obsolete recovery window of 1 days;
RMAN> delete noprompt backup; 删除所有的备份文件
3.rman 备份表空间:
run{
allocate channel t1 type disk;
backup
tablespace AGILE
format '/u01/app/flash_recovery_area/HAITIAN/backupset/2019_12_17/bk0_%s_%p_%t';
release channel t1;
}
4.rman 双备份(副本数为2):
rman备份一个数据文件:
run{
allocate channel t1 type disk;
set backup copies=2;
backup
datafile '/u01/app/oradata/HAITIAN/itil1.dbf'
format '/u01/app/flash_recovery_area/HAITIAN/backupset/2019_12_17/bk_%s_%p_%t','/u01/app/flash_recovery_area/HAITIAN/backupset/2019_12_17/bkdatafile_%U';
release channel t1;
}
5.rman 双备份(副本数为2):
run{
allocate channel t1 type disk;
set backup copies=2;
backup
datafile '/u01/app/oradata/HAITIAN/itil1.dbf'
format '/u01/app/flash_recovery_area/HAITIAN/backupset/2019_12_17/bkdatafile_%U','/u01/app/flash_recovery_area/HAITIAN/backupset/2019_12_17/bkdatafile_%U';
release channel t1;
}
6.rman 备份归档日志文件:
run{
allocate channel t1 type disk;
backup
archivelog all
format '/u01/app/flash_recovery_area/HAITIAN/backupset/2019_12_17/bkdatafile_%U';
release channel t1;
}
7.修改初始化参数max_enabled_roles导致DB无法启动故障解决:
[故障原因]:
SQL>alter system set max_enabled_roles=124 scope=spfile;
修改了初始化参数max_enabled_roles。
[故障现象]:
SQL> startup mount;
ORA-32004: obsolete or deprecated parameter(s) specified for RDBMS instance
ORA-32004: 为 RDBMS 实例指定了废弃或过时的参数
[故障分析]:
解决方法:
1.show parameter user_dump_dest;
2.cd /u01/app/diag/rdbms/haitian/HAITIAN/trace/
3.查看alter的日志alert_HAITIAN.log:
发现具体参数错误:
Deprecated system parameters with specified values:
max_enabled_roles
[故障解决]:
1.SQL> shutdown immediate;
2.SQL> startup;
会出现:ORA-32004: obsolete or deprecated parameter(s) specified for RDBMS instance
3.alter system reset max_enabled_roles scope=spfile sid='*';
4.SQL> shutdown immediate;
5.SQL> startup;
标签: #oracle怎么查询序列