笔记之Oracle 数据字典视图:v$fixed
这就实现了数据库的引导,类于操作系统的初始化。 (FAT)文件系统启动时的初始化也是如此,即从磁盘上加载FAT分配表到内存上。 总之,系统启动运行前要初始化,初始化即加载一些必要的数据结构(或其数据)到内存。 X$表由此建立。这一部分表可以从v$fixed_
这就实现了数据库的引导,类似于操作系统的初始化。
(FAT)文件系统启动时的初始化也是如此,即从磁盘上加载FAT分配表到内存上。
总之,系统启动运行前要初始化,初始化即加载一些必要的数据结构(或其数据)到内存。
X$表由此建立。这一部分表可以从v$fixed_table中查到:
SQL> select count(*) from v$fixed_table where name like 'X$%';
COUNT(*)
----------
394
共有394个X$对象被记录。
1.4.2 GV$和V$视图
X$表建立以后,基于X$表的GV$和V$视图得以创建。
这部分视图我们也可以通过查询V$FIXED_TABLE得到。
SQL> select count(*) from v$fixed_table where name like 'GV$%';
COUNT(*)
----------
259
这一部分共259个对象。
SQL> select count(*) from v$fixed_table where name like 'V$%';
COUNT(*)
----------
259
同样是259个对象。
v$fixed_table共记录了:
394 + 259 + 259 共 912 个对象。
即v$fixed_table里包含了三类对象:X$对象、基于X$表的GV$和V$视图。
以$结尾的表,如obj$咋么查询到?
dba_tab_comments
dba_col_comments
oracle数据字典详解:内部RDBMS(X$)表、数据字典表、动态性能(v$)视图、数据字典视图
v$fixed_view_definition,即用于查看fixed view(固定视图,即基于X$表的GV$和V$视图)的定义。
在这里我们看到GV$PARAMETER来源于x$ksppi,x$ksppcv两个X$表。 x$ksppi,x$ksppcv 基本上包含所有数据库可调整参数,v$parameter展现的是不包含"_"开头的参数。以"_"开头的参数我们通常称为隐含参数,一般不建议修改,但 很多因为功能强大经常使用而广为人知。
-1219 ORA01219: database not open: queries allowed onfixed tables/views only
ORA-01219:数据库未打开: 仅允许在固定表/视图中查询
注释: fixed tables/views,即固定表(X$)和固定视图(即基于X$表的GV$和V$视图)
数据库未打开时,为什么可以查询固定表/视图?
在内存中创建了bootstrap$以后,Oracle就可以从file 1,block 377上读取其他信息(即固定表(X$)和固定视图(即基于X$表的GV$和V$视图)),创建重要的数据库对象(静态数据字典就是其中之一)。http://blog.csdn.net/kdnuggets/article/details/2076996
-2030 ORA02030: can only select from fixed tables/views
注释:
在fixed tables/views,即固定表(X$)和固定视图(即基于X$表的GV$和V$视图)上,只能执行select操作(且执行select操作的用户是有SYSDBA系统权限的),除此之外的其他操作都不可执行,如授权操作就不行:
Oracle不允许SYSDBA之外的用户直接访问,显示授权不被允许。
如果显示授权你会收到如下错误:
SQL> grant select on x$ksppi to eygle;
grant select on x$ksppi to eygle
*
ERROR at line 1:
ORA-02030: can only select from fixed tables/views
http://blog.csdn.net/kdnuggets/article/details/2076996

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

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

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

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

Hot Topics



Oracle View Encryption allows you to encrypt data in the view, thereby enhancing the security of sensitive information. The steps include: 1) creating the master encryption key (MEk); 2) creating an encrypted view, specifying the view and MEk to be encrypted; 3) authorizing users to access the encrypted view. How encrypted views work: When a user querys for an encrypted view, Oracle uses MEk to decrypt data, ensuring that only authorized users can access readable data.

Uninstall method for Oracle installation failure: Close Oracle service, delete Oracle program files and registry keys, uninstall Oracle environment variables, and restart the computer. If the uninstall fails, you can uninstall manually using the Oracle Universal Uninstall Tool.

Deleting all data in Oracle requires the following steps: 1. Establish a connection; 2. Disable foreign key constraints; 3. Delete table data; 4. Submit transactions; 5. Enable foreign key constraints (optional). Be sure to back up the database before execution to prevent data loss.

Oracle Invalid numeric errors may be caused by data type mismatch, numeric overflow, data conversion errors, or data corruption. Troubleshooting steps include checking data types, detecting digital overflows, checking data conversions, checking data corruption, and exploring other possible solutions such as configuring the NLS_NUMERIC_CHARACTERS parameter and enabling data verification logging.

Solutions to Oracle cannot be opened include: 1. Start the database service; 2. Start the listener; 3. Check port conflicts; 4. Set environment variables correctly; 5. Make sure the firewall or antivirus software does not block the connection; 6. Check whether the server is closed; 7. Use RMAN to recover corrupt files; 8. Check whether the TNS service name is correct; 9. Check network connection; 10. Reinstall Oracle software.

Oracle database paging uses ROWNUM pseudo-columns or FETCH statements to implement: ROWNUM pseudo-columns are used to filter results by row numbers and are suitable for complex queries. The FETCH statement is used to get the specified number of first rows and is suitable for simple queries.

The method to solve the Oracle cursor closure problem includes: explicitly closing the cursor using the CLOSE statement. Declare the cursor in the FOR UPDATE clause so that it automatically closes after the scope is ended. Declare the cursor in the USING clause so that it automatically closes when the associated PL/SQL variable is closed. Use exception handling to ensure that the cursor is closed in any exception situation. Use the connection pool to automatically close the cursor. Disable automatic submission and delay cursor closing.

In Oracle, the FOR LOOP loop can create cursors dynamically. The steps are: 1. Define the cursor type; 2. Create the loop; 3. Create the cursor dynamically; 4. Execute the cursor; 5. Close the cursor. Example: A cursor can be created cycle-by-circuit to display the names and salaries of the top 10 employees.
