RMAN的delete命令delete backupset 102;//删除102号备份集delete noprompt expired backup of tablespace xxwz_data;//无提示删
配置retention(保留)策略
不符合策略的备份集被标记为过期,,可查看可删除。
3种配置
rman>configure retention policy to后面可以加如下的3种方式:
1.recovery window of 7 days;时间窗口
保留恢复从今天开始往前7天的数据所需要保留的备份集
2.redundancy 2;冗余度
保留同一数据文件的2份备份集
3.none:手工
cross checking交叉检查:检查rman备份信息和实际是否同步
rman>list backup;
然后操作系统层面手工删除数据文件的备份集;
再次rman>list backup;依然可以查到已删除的备份集的信息;
rman>delete backupset 47;//删除该备份集时出错,说找不到该备份集。
rman>crosscheck backup;//检查
rman>list backup;//该备份集状态为过期。
obsolete VS expired
obsolete是不符合保留策略的状态,意为not needed。
expired是进行交叉检查时不找到的状态,意为not found。
RMAN的delete命令
delete backupset 102;//删除102号备份集
delete noprompt expired backup of tablespace xxwz_data;//无提示删除表空间的expired备份信息。
delete obsolete;//删除不需要的备份集
//备份时删除原来的备份
backup archivelog all delete input;
backup archivelog sequence between 99 and 199 thread 1 delete input;
修改RMAN的备份状态
rman>change backupset 49 unavailable;
rman>change backupset 49 available;
从保留策略中豁免(即不受保留策略的限制)
rman>change backupset 49 keep forever nologs;//永不限制
rman>change datafilecopy 'd:\copy\xxx.dbf' keep until 'sysdate+60';//不限制60天
catalog(登记)手动备份信息到RMAN存储里(可作为0级备份的基础)
登记数据文件
rman>catalog datafilecopy 'd:\backup\xxwz_data.dbf';
登记归档日志文件
rman>catalog archivelog 'd:\arch\arch_12.arc','d:\arch\arch_13.arc';
rman>catalog start with 'd:\arch' noprompt;//登记这个目录的所有归档日志文件信息
取消登记信息
rman>change backuppiece 51 uncatalog;
rman>change datafilecopy 'd:\backup\xxwz_data.dbf' uncatalog;
rman>change archivelog ... uncatalog

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

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

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

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

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

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

MySQL中的字符串数据类型包括CHAR、VARCHAR、BINARY、VARBINARY、BLOB、TEXT,排序规则(Collations)决定了字符串的比较和排序方式。1.CHAR适合固定长度字符串,VARCHAR适合可变长度字符串。2.BINARY和VARBINARY用于二进制数据,BLOB和TEXT用于大对象数据。3.排序规则如utf8mb4_unicode_ci忽略大小写,适合用户名;utf8mb4_bin区分大小写,适合需要精确比较的字段。

最佳的MySQLVARCHAR列长度选择应基于数据分析、考虑未来增长、评估性能影响及字符集需求。1)分析数据以确定典型长度;2)预留未来扩展空间;3)注意大长度对性能的影响;4)考虑字符集对存储的影响。通过这些步骤,可以优化数据库的效率和扩展性。


热AI工具

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

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

Undress AI Tool
免费脱衣服图片

Clothoff.io
AI脱衣机

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

热门文章

热工具

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

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

SecLists
SecLists是最终安全测试人员的伙伴。它是一个包含各种类型列表的集合,这些列表在安全评估过程中经常使用,都在一个地方。SecLists通过方便地提供安全测试人员可能需要的所有列表,帮助提高安全测试的效率和生产力。列表类型包括用户名、密码、URL、模糊测试有效载荷、敏感数据模式、Web shell等等。测试人员只需将此存储库拉到新的测试机上,他就可以访问到所需的每种类型的列表。

SublimeText3 英文版
推荐:为Win版本,支持代码提示!

VSCode Windows 64位 下载
微软推出的免费、功能强大的一款IDE编辑器