搜索

归档日志(下)

Jun 07, 2016 pm 04:05 PM
archivelistlogsql归档日志查看

1 sql archive log list; #查看是不是归档方式 2 sql alter system set log_archive_start=true scope=spfile; #启用主动归档 sql alter system set log_archive_dest='location=/oracle/ora9/oradata/arch' scope=spfile; #设置归档路径 sql alter system s

1 sql> archive log list; #查看是不是归档方式
2 sql> alter system set log_archive_start=true scope=spfile; #启用主动归档
sql> alter system set log_archive_dest='location=/oracle/ora9/oradata/arch' scope=spfile;
#设置归档路径
sql> alter system set log_archive_dest_1='location=/oracle/ora9/oradata/arch1' scope=spfile;
sql> alter system set log_archive_dest_2='location=/oracle/ora9/oradata/arch2' scope=spfile;
#如果归档到两个位置,则可以通过上边方法实现
sql> alter system set log_archive_format='arch_%d_%t_%r_%s.log' #设置归档日记款式
3 sql> shutdown immediate;
4 sql> startup mount; #打开控制文件,不打开数据文件
5 sql> alter database archivelog; #将数据库切换为归档模式
6 sql> alter database open; #将数据文件打开
7 sql> archive log list; #查看此时是否处于归档模式
8 查询以确定数据库位于archivelog模式中且归档过程正在运行
sql> select log_mode from v$database;
sql> select archiver from v$instance;
9 日志切换
sql> alter system switch logfile;
10 这次日志切换将归档写到两个目标地,

1 使用ARCHIVE LOG LIST命令可以显示日志操作模式,归档位置,自动归档机器要归档的日志序列号等信息.
archive log list;

2 检查当前日志操作模式
SELECT log_mode from v$database;

3 打开或关闭归档日志
shutdown immediate;
startup monut;
alter database noarchivelog/archivelog ;
alter system set log_archive_dest='/ora_arch' scope=spfile sid='ora11g1';
alter database open;
SQL> alter system set db_recovery_file_dest='' scope=both;
SQL> alter system set log_archive_dest_1='LOCATION=/ora_arch' scope=both;

4 初始化参数LOG_ARCHIVE_FORMAT用于指定归档日志的文件名格式
show parameter log_archive_format; --%t_%s_%r.dbf

5 使用LOG_ARCHIVE_DEST配置归档位置
show parameter LOG_ARCHIVE_DEST;
ALTER SYSTEM SET log_archive_dest='/ora_arch';

6 查看归档日志路径状态信息
select dest_name,destination,status,error from v$archive_dest;

声明
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
MySQL:字符串数据类型可用哪些字符集?MySQL:字符串数据类型可用哪些字符集?May 10, 2025 am 12:07 AM

mysqloffersvariouscharactersetsforstringdatatypes:1)latin1 forwesterneuropeanlanguages,2)utf8 formultingualsupport,3)utf8mb4f OREXTEDENDENDENENICODECLUDINGEMOJIS,4)UCS2FORIXED-WIDTHENCODING,5)assiiforbasiclatin.ChoosideStherightStetSetensensersdaintegrity

mysql:斑点流比存储它们更好吗?mysql:斑点流比存储它们更好吗?May 10, 2025 am 12:06 AM

流式传输BLOB确实比直接存储更好,因为它能减少内存使用和提高性能。1)通过逐步读取和处理文件,避免了数据库膨胀和性能下降。2)流式传输需要更复杂的代码逻辑,且可能增加I/O操作次数。

MySQL字符串类型:存储,性能和最佳实践MySQL字符串类型:存储,性能和最佳实践May 10, 2025 am 12:02 AM

mySqlStringTypesimpactStorageAndPerformanCeaseAsfollows:1)长度,始终使用theSamestoragespace,whatcanbefasterbutlessspace-felfficity.2)varCharisvariable varcharisvariable length,morespace-morespace-morespace-effficitybuteftife buteftife butfority butfority textifforlyslower.3)

了解MySQL字符串类型:VARCHAR,文本,char等了解MySQL字符串类型:VARCHAR,文本,char等May 10, 2025 am 12:02 AM

mySqlStringTypesIncludeVarChar,文本,char,enum和set.1)varCharisVersAtileForvariable-lengthStringStringSuptOptoPeptoPepecifientlimit.2)textisidealforlargetStortStorStoverStorextorewiteWithoutAdefinedLengthl.3)charlisfixed-Length

MySQL中的字符串数据类型是什么?MySQL中的字符串数据类型是什么?May 10, 2025 am 12:01 AM

MySQLoffersvariousstringdatatypes:1)CHARforfixed-lengthstrings,2)VARCHARforvariable-lengthtext,3)BINARYandVARBINARYforbinarydata,4)BLOBandTEXTforlargedata,and5)ENUMandSETforcontrolledinput.Eachtypehasspecificusesandperformancecharacteristics,sochoose

如何向新的MySQL用户授予权限如何向新的MySQL用户授予权限May 09, 2025 am 12:16 AM

TograntpermissionstonewMySQLusers,followthesesteps:1)AccessMySQLasauserwithsufficientprivileges,2)CreateanewuserwiththeCREATEUSERcommand,3)UsetheGRANTcommandtospecifypermissionslikeSELECT,INSERT,UPDATE,orALLPRIVILEGESonspecificdatabasesortables,and4)

如何在MySQL中添加用户:逐步指南如何在MySQL中添加用户:逐步指南May 09, 2025 am 12:14 AM

toadduserInmysqleffectection andsecrely,theTheSepsps:1)USEtheCreateuserStattoDaneWuser,指定thehostandastrongpassword.2)GrantNectalRevileSaryPrivilegesSustate,usiveleanttatement,AdheringTotheTeprinciplelastPrevilegege.3)

mysql:添加具有复杂权限的新用户mysql:添加具有复杂权限的新用户May 09, 2025 am 12:09 AM

toaddanewuserwithcomplexpermissionsinmysql,loldtheSesteps:1)创建eTheEserWithCreateuser'newuser'newuser'@''localhost'Indedify'pa ssword';。2)GrantreadAccesstoalltablesin'mydatabase'withGrantSelectOnMyDatabase.to'newuser'@'localhost';。3)GrantWriteAccessto'

See all articles

热AI工具

Undresser.AI Undress

Undresser.AI Undress

人工智能驱动的应用程序,用于创建逼真的裸体照片

AI Clothes Remover

AI Clothes Remover

用于从照片中去除衣服的在线人工智能工具。

Undress AI Tool

Undress AI Tool

免费脱衣服图片

Clothoff.io

Clothoff.io

AI脱衣机

Video Face Swap

Video Face Swap

使用我们完全免费的人工智能换脸工具轻松在任何视频中换脸!

热门文章

热工具

适用于 Eclipse 的 SAP NetWeaver 服务器适配器

适用于 Eclipse 的 SAP NetWeaver 服务器适配器

将Eclipse与SAP NetWeaver应用服务器集成。

记事本++7.3.1

记事本++7.3.1

好用且免费的代码编辑器

EditPlus 中文破解版

EditPlus 中文破解版

体积小,语法高亮,不支持代码提示功能

MinGW - 适用于 Windows 的极简 GNU

MinGW - 适用于 Windows 的极简 GNU

这个项目正在迁移到osdn.net/projects/mingw的过程中,你可以继续在那里关注我们。MinGW:GNU编译器集合(GCC)的本地Windows移植版本,可自由分发的导入库和用于构建本地Windows应用程序的头文件;包括对MSVC运行时的扩展,以支持C99功能。MinGW的所有软件都可以在64位Windows平台上运行。

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

功能强大的PHP集成开发环境