首页 >

Oracle 设置归档与非归档模式

数据库|mysql教程Oracle 设置归档与非归档模式
Oracle教程,Oracle 设置归档与非归档模式,数据库
数据库-mysql教程
糗事百科客户端服务器全套源码,vscode连接服务器文件,ubuntu web发布,jdk和Tomcat冲突,python 爬虫接口,php 2047,seo与竞价排名的案例,网站flash横幅lzw
-,查看oracle归档模式SQLgt; conn evan/evan (dba)Connected.SQLgt; archive log listORA-01031: insufficient privilegesS
腾龙源码,vscode杨超越,ubuntu硬件兼容列表,tomcat 访问wss,as 查看sqlite,dede插件怎么调用,php视频系统前端框架,爬虫提炼卖点,Linux下 php,百度SEO关键词尤克里,php网站源码带有数据库,网页滚动新闻代码,hishop v2.3模板,页面一级菜单css代码,电子档案管理系统 .net源码,程序发布源码lzw
赛车游戏源码,修改ubuntu屏幕尺寸,tomcat发布视频文件,python mac爬虫,php的框架排名,第一名seo营销关键词lzw
-,查看Oracle归档模式
SQL> conn evan/evan (dba)
Connected.
SQL> archive log list
ORA-01031: insufficient privileges

SQL> conn / as sysdba –archive log list需要以sysdba执行
Connected.
SQL> archive log list
Database log mode No Archive Mode
Automatic archival Disabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 2
Current log sequence 4
查询v$database
SQL> select name,log_mode from v$database;

NAME LOG_MODE
——— ————
ORALIFE NOARCHIVELOG

二,修改归档模式
归档日志位置,Oracle 10g可以生成多份一样的日志,保存多个位置,,以防不测
SQL> alter system set log_archive_dest_1=’location=/oracle/10g/oracle/log/archive_log’;

System altered.

SQL> alter system set log_archive_dest_2=’location=/oracle/10g/oracle/log/archive_log2′;

System altered.

SQL> shutdown immediate
ORA-01031: insufficient privileges
SQL> conn / as sysdba
Connected.
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount
ORACLE instance started.

Total System Global Area 528482304 bytes
Fixed Size 1220360 bytes
Variable Size 163578104 bytes
Database Buffers 356515840 bytes
Redo Buffers7168000 bytes
Database mounted.
SQL> alter database archivelog; --设置归档模式

Database altered.

SQL> alter database open;

Database altered.

配置归档文件格式(从oracle 10g 开始,必须带有%s,%t,%r)
SQL> alter system set log_archive_format=”archive_%t_%s_%r.arclog” scope=spfile;

System altered.

SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount
ORACLE instance started.

Total System Global Area 528482304 bytes
Fixed Size 1220360 bytes
Variable Size 163578104 bytes
Database Buffers 356515840 bytes
Redo Buffers7168000 bytes
Database mounted.
SQL> archive log list --查看是否归档
Database log mode Archive Mode
Automatic archival Enabled --已开启自动归档
Archive destination /oracle/10g/oracle/log/archive_log2
Oldest online log sequence 2
Next log sequence to archive 4
Current log sequence 4

SQL> select destination from v$archive_dest; --查看归档日志位置

DESTINATION
——————————————————————————–
/oracle/10g/oracle/log/archive_log
/oracle/10g/oracle/log/archive_log2

10 rows selected.

还可以配置归档进程个数
alter system set log_archive_max_processes=n


Oracle 设置归档与非归档模式
  • Oracle 临时表解决ORA-22992问题
  • Oracle 临时表解决ORA-22992问题 | Oracle 临时表解决ORA-22992问题 ...

    Oracle 设置归档与非归档模式
  • Linux系统只配置Oracle的自动启动
  • Linux系统只配置Oracle的自动启动 | Linux系统只配置Oracle的自动启动 ...

    Oracle 设置归档与非归档模式
  • Oracle数据库里查看表空间使用状况
  • Oracle数据库里查看表空间使用状况 | Oracle数据库里查看表空间使用状况 ...