search
HomeDatabaseMysql Tutorial14.3.2 提取数据字典

14.3.2 提取数据字典 将数据字典提取到平面文件中的一个潜在问题是,当正在提取数据字典的时候,其他人可能正在发送DDL语句。因此,提取出的数据字典可能和数据库不同步。相比于使用重做日志文件,使用平面文件来存储数据字典时需要更少的系统资源。 当提取

14.3.2  提取数据字典

将数据字典提取到平面文件中的一个潜在问题是,当正在提取数据字典的时候,其他人可能正在发送DDL语句。因此,提取出的数据字典可能和数据库不同步。相比于使用重做日志文件,使用平面文件来存储数据字典时需要更少的系统资源。

当提取数据字典到重做日志文件时,在提取数据字典的过程中不能处理DDL语句。因此,字典将会和数据库同步。提取过程更加耗费资源,但是更为迅速。

为了将数据字典提取到平面文件或重做日志文件中,可以使用DBMS_LOGMNR_D.BUILD程序。数据字典文件放置在一个目录中。因此,必须拥有放置该文件的目录的写权限。为了定义目录的位置,使用初始化参数UTL_FILE_DIR。例如,为了指定位置D:\Oracle\Ora10\database作为LogMiner的输出位置,将以下的记录项放在参数文件中:

UTL_FILE_DIR= D:\Oracle\Ora10\database

注意:

不能使用alter system命令动态地改变UTL_FILE_DIR参数。必须修改初始化文件,然后停止并重启数据库。

为了执行DBMS_LOGMNR_D.BUILD程序,必须为目录指定文件名,为文件指定目录路径名,并指定希望将目录写入到平面文件中还是重做日志文件中。为了将数据字典提取到位于G:\Oracle\Ora10\database目录中的文件名为mydb_dictionary的平面文件中,可以发出如下命令:

execute DBMS_LOGMNR_D.BUILD
('mydb_dictionary.ora',
'G:\Oracle\Ora10\database',
options=>DBMS_LOGMNR_D.STORE_IN_FLAT_FILE);

可以使用DBMS_LOGMNR_D.STORE_IN_FLAT_FILE作为其他的可选项。

一旦将字典存储在平面文件中,可以将它复制到另一个平台来运行LogMiner。可能需要运行其他数据库上的dbmslmd.sql来建立正确的环境。可以在Unix系统上的$ORACLE_HOME\rdbms\admin目录中找到dbmslmd.sql文件。


【责任编辑:董书 TEL:(010)68476606】


回书目   上一节   下一节

原文:14.3.2 提取数据字典 返回读书频道首页

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
What Are the Limitations of Using Views in MySQL?What Are the Limitations of Using Views in MySQL?May 14, 2025 am 12:10 AM

MySQLviewshavelimitations:1)Theydon'tsupportallSQLoperations,restrictingdatamanipulationthroughviewswithjoinsorsubqueries.2)Theycanimpactperformance,especiallywithcomplexqueriesorlargedatasets.3)Viewsdon'tstoredata,potentiallyleadingtooutdatedinforma

Securing Your MySQL Database: Adding Users and Granting PrivilegesSecuring Your MySQL Database: Adding Users and Granting PrivilegesMay 14, 2025 am 12:09 AM

ProperusermanagementinMySQLiscrucialforenhancingsecurityandensuringefficientdatabaseoperation.1)UseCREATEUSERtoaddusers,specifyingconnectionsourcewith@'localhost'or@'%'.2)GrantspecificprivilegeswithGRANT,usingleastprivilegeprincipletominimizerisks.3)

What Factors Influence the Number of Triggers I Can Use in MySQL?What Factors Influence the Number of Triggers I Can Use in MySQL?May 14, 2025 am 12:08 AM

MySQLdoesn'timposeahardlimitontriggers,butpracticalfactorsdeterminetheireffectiveuse:1)Serverconfigurationimpactstriggermanagement;2)Complextriggersincreasesystemload;3)Largertablesslowtriggerperformance;4)Highconcurrencycancausetriggercontention;5)M

MySQL: Is it safe to store BLOB?MySQL: Is it safe to store BLOB?May 14, 2025 am 12:07 AM

Yes,it'ssafetostoreBLOBdatainMySQL,butconsiderthesefactors:1)StorageSpace:BLOBscanconsumesignificantspace,potentiallyincreasingcostsandslowingperformance.2)Performance:LargerrowsizesduetoBLOBsmayslowdownqueries.3)BackupandRecovery:Theseprocessescanbe

MySQL: Adding a user through a PHP web interfaceMySQL: Adding a user through a PHP web interfaceMay 14, 2025 am 12:04 AM

Adding MySQL users through the PHP web interface can use MySQLi extensions. The steps are as follows: 1. Connect to the MySQL database and use the MySQLi extension. 2. Create a user, use the CREATEUSER statement, and use the PASSWORD() function to encrypt the password. 3. Prevent SQL injection and use the mysqli_real_escape_string() function to process user input. 4. Assign permissions to new users and use the GRANT statement.

MySQL: BLOB and other no-sql storage, what are the differences?MySQL: BLOB and other no-sql storage, what are the differences?May 13, 2025 am 12:14 AM

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

MySQL Add User: Syntax, Options, and Security Best PracticesMySQL Add User: Syntax, Options, and Security Best PracticesMay 13, 2025 am 12:12 AM

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

MySQL: How to avoid String Data Types common mistakes?MySQL: How to avoid String Data Types common mistakes?May 13, 2025 am 12:09 AM

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

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

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

Hot Article

Hot Tools

mPDF

mPDF

mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools