Database Smart Flash Cache in Oracle Database 12c Release 1
Learn how to configure and use the Database Smart Flash Cache in Oracle Database 12c Release 1.
oracle 12cconfigurationintermediate
by OracleDba
14 views
Learn how to configure and use the Database Smart Flash Cache in Oracle Database 12c Release 1.
123
# dd if=/dev/zero of=/mnt/vdisk1 bs=1024 count=1024000
# dd if=/dev/zero of=/mnt/vdisk2 bs=1024 count=1024000
# chown oracle:oinstall /mnt/vdisk1 /mnt/vdisk21234567891011121314151617181920212223242526
ALTER SYSTEM SET DB_FLASH_CACHE_FILE = '/mnt/vdisk1', '/mnt/vdisk2' SCOPE=SPFILE;
ALTER SYSTEM SET DB_FLASH_CACHE_SIZE = 1G, 1G SCOPE=SPFILE;
SHUTDOWN IMMEDIATE;
STARTUP;
SQL> SHOW PARAMETER db_flash_cache
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_flash_cache_file string /mnt/vdisk1, /mnt/vdisk2
db_flash_cache_size big integer 1G, 1G
SQL>
SET LINESIZE 100
COLUMN name FORMAT A20
SELECT * FROM v$flashfilestat;
FLASHFILE# NAME BYTES ENABLED SINGLEBLKRDS SINGLEBLKRDTIM_MICRO CON_ID
---------- -------------------- ---------- ---------- ------------ -------------------- ----------
1 /mnt/vdisk1 1073741824 1 0 0 0
2 /mnt/vdisk2 1073741824 1 0 0 0
SQL>12345678910
ALTER SYSTEM RESET DB_FLASH_CACHE_FILE SCOPE=SPFILE;
ALTER SYSTEM RESET DB_FLASH_CACHE_SIZE SCOPE=SPFILE;
SHUTDOWN IMMEDIATE;
STARTUP;
SELECT * FROM v$flashfilestat;
no rows selected
SQL>123456789
-- Prevent EMP from using the Smart Flash Cache.
ALTER TABLE scott.emp STORAGE (FLASH_CACHE NONE);
-- Force EMP to remain in the Smart Flash Cache, space provided.
ALTER TABLE scott.emp STORAGE (FLASH_CACHE KEEP);
-- Reset EMP to default use of Smart Flash Cache.
ALTER TABLE scott.emp STORAGE (FLASH_CACHE);
ALTER TABLE scott.emp STORAGE (FLASH_CACHE DEFAULT);Please to add comments
No comments yet. Be the first to comment!