SQL set pages 100 lines 120 SQL SELECT DISTINCT DECODE(NAME, NULL, 'NULL', NAME) FROM V$ARCHIVED_LOG; DECODE(NAME,NULL,'NULL',NAME) -------------------------------------------------------------- NULL SQL SHOW PARAMETER LOG_ARCHIVE_DEST_1 N
SQL> set pages 100 lines 120 SQL> SELECT DISTINCT DECODE(NAME, NULL, 'NULL', NAME) FROM V$ARCHIVED_LOG; DECODE(NAME,NULL,'NULL',NAME) -------------------------------------------------------------- NULL SQL> SHOW PARAMETER LOG_ARCHIVE_DEST_1 NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ log_archive_dest_1 string LOCATION=/data1/archivelog log_archive_dest_10 string |
将数据库的归档目录改回到ASM上,马上就可以看到新的归档日志的名称:
SQL> ALTER SYSTEM SET LOG_ARCHIVE_DEST_1 = 'LOCATION=+DISK/testrac/' SCOPE = MEMORY SID = 'testrac1'; |
系统已更改。
SQL> ALTER SYSTEM SET LOG_ARCHIVE_DEST_1 = 'LOCATION=+DISK/testrac/' SCOPE = MEMORY SID = 'testrac2'; |
系统已更改。
SQL> ALTER SYSTEM ARCHIVE LOG CURRENT; |
系统已更改。
SQL> SELECT NAME, COUNT(*) FROM V$ARCHIVED_LOG GROUP BY NAME; NAME COUNT(*) ------------------------------------------------------------ ---------- 250 +DISK/testrac/2_208_618591128.dbf 1 +DISK/testrac/1_292_618591128.dbf 1 |
关闭数据库,使刚才的归档参数的修改失效,归档路径恢复到本地,再次查询:
SQL> SELECT NAME, COUNT(*) FROM V$ARCHIVED_LOG GROUP BY NAME; NAME COUNT(*) ------------------------------------------------------------ ---------- 250 /data1/archivelog/2_209_618591128.dbf 1 /data1/archivelog/1_293_618591128.dbf 1 +DISK/testrac/2_208_618591128.dbf 1 +DISK/testrac/1_292_618591128.dbf 1 |
目前仍然可以看到所有的归档日志名称,下面尝试用rman删除所有的归档日志。
SQL> SELECT NAME, COUNT(*) FROM V$ARCHIVED_LOG GROUP BY NAME; NAME COUNT(*) ------------------------------------------------------------ ---------- 256 |
通过rman删除后,归档日志名称再次变成空值。
这个问题在metalink上也没有找到类似的描述,个人怀疑和ASM有关。

MySQL'sBLOBissuitableforstoringbinarydatawithinarelationaldatabase,whileNoSQLoptionslikeMongoDB,Redis,andCassandraofferflexible,scalablesolutionsforunstructureddata.BLOBissimplerbutcanslowdownperformancewithlargedata;NoSQLprovidesbetterscalabilityand

ToaddauserinMySQL,use:CREATEUSER'username'@'host'IDENTIFIEDBY'password';Here'showtodoitsecurely:1)Choosethehostcarefullytocontrolaccess.2)SetresourcelimitswithoptionslikeMAX_QUERIES_PER_HOUR.3)Usestrong,uniquepasswords.4)EnforceSSL/TLSconnectionswith

ToavoidcommonmistakeswithstringdatatypesinMySQL,understandstringtypenuances,choosetherighttype,andmanageencodingandcollationsettingseffectively.1)UseCHARforfixed-lengthstrings,VARCHARforvariable-length,andTEXT/BLOBforlargerdata.2)Setcorrectcharacters

MySQloffersechar, Varchar, text, Anddenumforstringdata.usecharforfixed-Lengthstrings, VarcharerForvariable-Length, text forlarger text, AndenumforenforcingdataAntegritywithaetofvalues.

Optimizing MySQLBLOB requests can be done through the following strategies: 1. Reduce the frequency of BLOB query, use independent requests or delay loading; 2. Select the appropriate BLOB type (such as TINYBLOB); 3. Separate the BLOB data into separate tables; 4. Compress the BLOB data at the application layer; 5. Index the BLOB metadata. These methods can effectively improve performance by combining monitoring, caching and data sharding in actual applications.

Mastering the method of adding MySQL users is crucial for database administrators and developers because it ensures the security and access control of the database. 1) Create a new user using the CREATEUSER command, 2) Assign permissions through the GRANT command, 3) Use FLUSHPRIVILEGES to ensure permissions take effect, 4) Regularly audit and clean user accounts to maintain performance and security.

ChooseCHARforfixed-lengthdata,VARCHARforvariable-lengthdata,andTEXTforlargetextfields.1)CHARisefficientforconsistent-lengthdatalikecodes.2)VARCHARsuitsvariable-lengthdatalikenames,balancingflexibilityandperformance.3)TEXTisidealforlargetextslikeartic

Best practices for handling string data types and indexes in MySQL include: 1) Selecting the appropriate string type, such as CHAR for fixed length, VARCHAR for variable length, and TEXT for large text; 2) Be cautious in indexing, avoid over-indexing, and create indexes for common queries; 3) Use prefix indexes and full-text indexes to optimize long string searches; 4) Regularly monitor and optimize indexes to keep indexes small and efficient. Through these methods, we can balance read and write performance and improve database efficiency.


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

SublimeText3 English version
Recommended: Win version, supports code prompts!

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

Dreamweaver CS6
Visual web development tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Mac version
God-level code editing software (SublimeText3)
