ArcSDE怎么在Oracle数据库应用多样的(multiple) DB block sizes
熟悉Oracle数据库都了解,一旦Oracle软件安装完毕,数据库创建完毕,默认的Block SIZE是默认的,在默认情况下,Block SIZE=8KB,在创建之前是可以修改的,但是库一旦创建完毕,这个不能修改的。那么出现了一种情况,如果用户创建完库之后,想使用BLOCK SIZE=
熟悉Oracle数据库都了解,一旦Oracle软件安装完毕,数据库创建完毕,默认的Block SIZE是默认的,在默认情况下,Block SIZE=8KB,在创建之前是可以修改的,但是库一旦创建完毕,这个值不能修改的。那么出现了一种情况,如果用户创建完库之后,想使用BLOCK SIZE=32KB怎么办?
或者举一个ArcSDE例子吧,我们在Oracle数据库既存储矢量数据也存储影像数据,我们都知道对BLOCK SIZE=8KB存储矢量数据是没有问题,但是如果你使用RasterDataset或者RasterCatalog来存储影像数据,如果你的BLOCK SIZE=32KB,这会提高相关的浏览效率的。但是问题就来了,库已经创建号了,BLOCK SIZE是不能修改了,那么怎么才能解决这个问题呢?
自 Oracle 9i 数据库现在可以有多个数据块大小。
? 每个数据库都指定的 db_block_size '标准' 的块大小。
· 系统和临时表空间使用标准的块大小。
? 应用程序表空间可以使用其他非标准的块大小。
? 表或索引的所有分区都必须都使用相同的块大小。
? SGA (系统全局区域) 具有单独的缓冲区高速缓存,每个块大小为:
DB_2K_CACHE_SIZE
DB_4K_CACHE_SIZE
DB_8K_CACHE_SIZE
DB_16K_CACHE_SIZE
DB_32K_CACHE_SIZE
所以说我们可以创建一个包含BLOCK SIZE=32KB的表空间来存储影像数据,那么我们创建好了 BLOCK SIZE=32KB的表空间,可以修改DBINIT的关键字.
相关参考:http://wenku.baidu.com/view/f12f6c8271fe910ef12df84d.html?st=1
我们来进行一下实验:
使用管理员帐号连接,然后查看一下SGA,因为我们后面设定的缓存大小局限于SGA的空闲存储大小,然后查看默认的block size
<span>C:\Users\Administrator>sqlplus system/oracle@orcl_165 SQL*Plus: Release 11.2.0.1.0 Production on 星期三 1月 11 10:09:39 2012 Copyright (c) 1982, 2010, Oracle. All rights reserved. 连接到: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options SQL> show sga Total System Global Area 417546240 bytes Fixed Size 2213936 bytes Variable Size 364906448 bytes Database Buffers 41943040 bytes Redo Buffers 8482816 bytes SQL> select name,block_size,current_size from v$buffer_pool; NAME BLOCK_SIZE CURRENT_SIZE -------------------- ---------- ------------ DEFAULT 8192 40</span>
<span>SQL> create tablespace test_tbs4k datafile '/opt/oracle/oradata/orcl/test_tbs4k.dbf' size 10M blocksize 4K; create tablespace test_tbs4k datafile '/opt/oracle/oradata/orcl/test_tbs4k.dbf' size 10M blocksize 4K * 第 1 行出现错误: ORA-29339: 表空间块大小 4096 与配置的块大小不匹配 SQL> alter system set db_4k_cache_size=60M; alter system set db_4k_cache_size=60M * 第 1 行出现错误: ORA-02097: 无法修改参数, 因为指定的值无效 ORA-00384: 没有足够的内存来增加高速缓存的大小 SQL> alter system set db_4k_cache_size=6M; 系统已更改。 SQL> create tablespace test_tbs4k datafile '/opt/oracle/oradata/orcl/test_tbs4k.dbf' size 10M blocksize 4K; 表空间已创建。 SQL> select name,block_size,current_size from v$buffer_pool; NAME BLOCK_SIZE CURRENT_SIZE -------------------- ---------- ------------ DEFAULT 8192 24 DEFAULT 4096 16</span>

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



MySQL is an open source relational database management system, mainly used to store and retrieve data quickly and reliably. Its working principle includes client requests, query resolution, execution of queries and return results. Examples of usage include creating tables, inserting and querying data, and advanced features such as JOIN operations. Common errors involve SQL syntax, data types, and permissions, and optimization suggestions include the use of indexes, optimized queries, and partitioning of tables.

MySQL is chosen for its performance, reliability, ease of use, and community support. 1.MySQL provides efficient data storage and retrieval functions, supporting multiple data types and advanced query operations. 2. Adopt client-server architecture and multiple storage engines to support transaction and query optimization. 3. Easy to use, supports a variety of operating systems and programming languages. 4. Have strong community support and provide rich resources and solutions.

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.

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.

SQL statements can be created and executed based on runtime input by using Oracle's dynamic SQL. The steps include: preparing an empty string variable to store dynamically generated SQL statements. Use the EXECUTE IMMEDIATE or PREPARE statement to compile and execute dynamic SQL statements. Use bind variable to pass user input or other dynamic values to dynamic SQL. Use EXECUTE IMMEDIATE or EXECUTE to execute dynamic SQL statements.

To stop an Oracle database, perform the following steps: 1. Connect to the database; 2. Shutdown immediately; 3. Shutdown abort completely.

The steps to open an Oracle database are as follows: Open the Oracle database client and connect to the database server: connect username/password@servername Use the SQLPLUS command to open the database: SQLPLUS
