- 浏览: 27392 次
- 性别:
- 来自: 北京
最新评论
Temporary Tablespaces: (sort segments and temp table data segments)
1.contains transient data that persists only for the duration of the session.
2.improve the concurrency of multiple sort operations, reduce their overhead, and avoid Oracle Database space management operations.
3.A temporary tablespace can be assigned to users with the CREATE USER
or ALTER USER
statement and can be shared by multiple users.
4.Within a temporary tablespace, all sort operations for a given instance and tablespace share a single sort segment. An extent cannot be shared by multiple transactions.
5.When you create a temporary table, its rows are stored in your default temporary tablespace.
6. V$SORT_SEGMENT view,V$TEMPSEG_USAGE,v$tempfile,v$dba_temp_files
1.create temporary tablespace temp1 tempfile '/u01/oradata/lsh/tempfile.dbf' size 100m extent management local uniform size 10m;
2.alter tablespace temp1 tempfile offline/online ;alter database tempfile '/u01/oradata/lsh/tempfile.dbf' offline/online;
3.alter tablespace temp1 add tempfile '/u01/oradata/lsh/tempfile01.dbf' size 100m; alter database tempfile '/u01/oradata/lsh/tempfile.dbf' resize 150m;
4.alter database tempfile '/u01/oradata/lsh/tempfile.dbf' drop including datafiles;
Temporary Table:
1.The definition of a temporary table is visible to all sessions
2. the data in a temporary table is visible only to the session that inserts the data into the table
3.The ON COMMIT
clause indicate if the data in the table is transaction-specific (the default) or session-specific, the implications of which are as follows:
DELETE ROWS |
This creates a temporary table that is transaction specific. A session becomes bound to the temporary table with a transactions first insert into the table. The binding goes away at the end of the transaction. The database truncates the table (delete all rows) after each commit. |
PRESERVE ROWS |
This creates a temporary table that is session specific. A session gets bound to the temporary table with the first insert into the table in the session. This binding goes away at the end of the session or by issuing a TRUNCATE of the table in the session. The database truncates the table when you terminate the session. |
CREATE GLOBAL TEMPORARY TABLE admin_work_area
(startdate DATE,
enddate DATE,
class CHAR(20))
ON COMMIT DELETE ROWS;
发表评论
-
from string get number data using pl/sql or sql
2012-02-16 17:32 892declare @aa varchar(80),--- ... -
SQL
2012-02-15 18:01 7341.select sal salary from emp; ... -
modify ip
2012-02-10 17:45 7991.netconfig 2./etc/sysconfig/n ... -
MULTI dbwr or io slaves
2012-02-10 15:21 883thanks dukope of itpub. ... -
FAQS
2012-02-09 15:59 7581.How can I get the largest amo ... -
HOW TO STUDY ORACLE FROM Yong Huang
2012-01-18 14:48 804Assuming you want to study orac ... -
RMAN
2012-01-14 17:07 7081.components of the rman ... -
INSTANCE and CRASH RECOVERY
2012-01-12 10:12 7541.type of checkpoint full c ... -
STARTUP PFILE=
2011-12-31 14:11 12281.vi initdbs.ora spfile=&quo ... -
MANAGE TABLE
2011-12-26 16:50 5751.heap table IOT PARTI ... -
MONITOR redo size
2011-12-21 17:48 6501.set autot on stat 2.unsin ... -
What do rollback and commit
2011-12-21 11:21 746When we COMMIT, all that is lef ... -
What is the schema ?
2011-12-20 15:18 592A schema is a collection of dat ... -
MANAGE UNDOTABS
2011-12-19 17:15 6811.manual undo_management=ma ... -
DBA SQL
2011-12-19 15:21 4401.select a.name,b.status from v ... -
SEGMENT EXTENTS ORACLEBLOCK
2011-12-15 16:11 8001.SEGMENT: allocated fo ... -
MANAGE TABLESPACE AND DATAFILES
2011-12-13 15:28 5801. tablespace,segment,extent,bl ... -
ORACLE NET
2011-12-12 09:49 6881.net_service_name: servive ... -
SQLPLUS TIPS
2011-12-09 17:51 9121.SQLPLUS : a tool that execute ... -
ORACLE ENVIRONMENT VARIABLES
2011-12-09 17:15 660ORACLE_HOME ORACLE_SID : or ...
相关推荐
### CREATE TABLESPACE 命令详解 在数据库管理中,`CREATE TABLESPACE` 命令是用于创建新的表空间的基础指令。表空间是数据库逻辑存储结构中的一个基本单位,用于存储数据文件、索引等数据库对象。通过合理地规划和...
在Oracle数据库管理中,临时表空间(Temporary Tablespace)的管理是一项非常重要的任务。合理的管理和优化临时表空间不仅可以提高系统的性能,还可以帮助解决空间不足等问题。本文将详细介绍如何通过SQL脚本进行...
cmd输入 sqlplus;... GRANT CREATE SESSION,CREATE TABLE,CREATE VIEW,CREATE SEQUENCE,UNLIMITED TABLESPACE TO 用户名; GRANT CONNECT TO 用户名; GRANT RESOURCE TO 用户名; GRANT DBA TO 用户名;
创建用户的步骤是:create user jack identified by jack default tablespace test_data temporary tablespace test_temp;。 为用户赋予权限的步骤是:GRANT create any table TO jack;GRANT resource,dba TO jack;...
TEMPORARY TABLESPACE temporary_tablespace_name; ``` 其中,username 是要创建的用户名,password 是用户的密码,tablespace_name 是用户的默认表空间,temporary_tablespace_name 是用户的临时表空间。 例如,...
`CREATE TEMPORARY TABLESPACE exoasystmp IN DATABASE PARTITION GROUP Ibmtempgroup PAGESIZE 8K MANAGED BY SYSTEM USING('/home/exoa2/exoasystmp') EXTENTSIZE 32 PREFETCHSIZE 16 BUFFERPOOL ibmdefault8k ...
sql> create global temporary table xay_temp as select * from xay on commit preserve rows / on commit delete rows; ``` **解析**: - `create global temporary table`: 创建全局临时表。 - `on commit ...
temporary tablespace temp 位置:D:\wwOracle\wwspace.dbf 用户名: wwuser 密码: wwuser 临时表:temp 3、创建角色 sql>create role wwrole; 4、给角色赋予相应权限 sql>grant create session,...
create user user_one identified by 123456 default tablespace users temporary tablespace temp quota unlimited on users; create user user_two identified by 123456 default tablespace users temporary ...
在Oracle数据库系统中,表空间(Tablespace)是存储数据对象(如表、索引、视图等)的逻辑单位,而临时表空间(Temporary Tablespace)则用于存储临时数据,比如排序或联接操作产生的中间结果。创建和管理表空间及...
- **`TEMPORARY TABLESPACE temp_tablespace`**:指定用户的临时表空间,默认情况下,所有用户都共享一个名为TEMP的临时表空间。 - **`PROFILE profile_name`**:指定用户配置文件,用于控制用户的资源限制等。 ###...
1. `CREATE TEMPORARY TABLESPACE test_temp`:指定创建的表空间类型为临时表空间,并命名为 `test_temp`。 2. `TEMPFILE 'D:\Oracle\oradata\orcl\test_temp01.dbf'`:指定临时表空间的数据文件路径。 3. `SIZE 50M...
#### 1.1 临时表空间 (Temporary Tablespace) 临时表空间用于存储临时数据,例如排序操作或临时表的数据。当事务完成时,临时数据会被自动删除。创建临时表空间的基本语法如下: ```sql CREATE TEMPORARY ...
TEMPORARY TABLESPACE<临时表空间> 删除用户: DROP USER 用户名; 设置用户大小: QUATA <空间大小> ON <空间名称> 用户授权方法: GRANT 角色/权限名称 TO 用户名; 常用权限: GRANT CONNECT,RESOURCE TO ...
CREATE TEMPORARY TABLESPACE test_temp TEMPFILE 'E:\oracle\product\10.2.0\oradata\testserver\test_temp01.dbf' SIZE 32M AUTOEXTEND ON NEXT 32M MAXSIZE 2048M EXTENT MANAGEMENT LOCAL; ``` 这条命令解释...
- 创建16KB系统表空间:`CREATE TEMPORARY TABLESPACE exoasystmp16k ... BUFFERPOOL IBMDEFAULT16K ...` - 创建32KB系统表空间:`CREATE TEMPORARY TABLESPACE exoasystmp32k ... BUFFERPOOL IBMDEFAULT32K ...` ...
CREATE TEMPORARY TABLESPACE exoasystmp IN DATABASE PARTITION GROUP IBMTEMPGROUP PAGESIZE 8K MANAGED BY SYSTEM USING('/home/exoa2/exoasystmp') EXTENTSIZE 32 PREFETCHSIZE 16 BUFFERPOOL IBMDEFAULT8K ...
DROP TABLESPACE 表空间名 INCLUDING CONTENTS AND DATAFILES; ``` 4. Temporary Tablespace(临时表空间):用于存储临时数据,例如排序和连接操作的中间结果。创建临时表空间: ```sql CREATE TEMPORARY ...
创建临时表空间类似,但需使用`TEMPORARY TABLESPACE`关键字,用于存储临时工作数据。 2. 用PL/SQL创建用户 创建用户通常涉及到指定用户名、密码、默认表空间和临时表空间。例如: ```sql CREATE USER 用户名 ...