创建临时表,锁表。
在步骤4中,我们使SORTHEAP加倍到2048以避免排序溢出,因为某些查询需要创建临时表。
In Step 4, we doubled SORTHEAP to 2048 to avoid sort overflows because some queries needed to create temporary tables.
在应用程序会话定义已创建的临时表之后,并发运行的会话不需要重新定义它。
After an application session defines a created temporary table, concurrently running sessions do not have to redefine it.
您可以在sql函数、触发器、索引和视图中引用已创建的临时表。
You can reference a created temporary table in SQL functions, triggers, indexes, and views.
下面的脚本给出了一个例子,我们可以对其进行更改,从而在自己的环境中创建一个用户临时表空间。
The script below shows an example, which you can modify to create a user temporary table space in your environment.
没有创建用户临时表空间。
这里要注意的关键是,即使在过程体中没有声明临时表,该过程也被成功创建。
The key point to note here is that the procedure creates successfully even though the temporary table was not declared within the procedure body.
清单7给出了与临时表创建有关的统计信息。
Listing 7 shows the statistics associated with temporary-table creation.
创建数据库时不存在用户临时表空间。
No user temporary table Spaces exist when a database is created.
因为在同一个数据库模式中不可能有两个同名的表,所以临时用SALES _ TMP这个名称创建新的表。
Because it is not possible to have two tables with identical names in the same schema, the new table is temporarily created with the name SALES_TMP.
虽然临时表总是用于SQL过程中,但也能被任何可连接db2的应用程序创建。
Although temporary tables are most often used in SQL procedures, they can also be created by any application which can establish a connection to DB2.
您在DSNDB07创建的表空间将用作处理SQL联接和排序以及临时表的存储。
Table Spaces that you create in DSNDB07 will be used as storage for processing SQL joins and sorts as well as for temporary tables.
在某些条件下,会在merge语句执行过程中创建内部临时表,如清单7所示。
Under certain conditions, internal temporary tables are created during the execution of the merge statement, as shown in Listing 7.
步骤1:在DevelopmentCenter 中,创建名为 init_temp()的过程来封装临时表session.temp 的声明。
Step 1: In Development Center, create a procedure called init_temp() to encapsulate the declaration of the temporary table session.temp.
步骤3:创建count_rows过程,返回在临时表中找到的行数。
Step3: Create the procedure count_rows which returns the number of rows found in the temporary table.
随数据库创建的系统临时表空间的默认名为TEMPSPACE1。
您应当创建一个或多个USER临时表空间来存储临时表的数据。
You should create one or more USER temporary table spaces for storing data of temporary tables.
每个数据库有自己的编目表空间、临时表空间和用户表空间,这些表空间是在成功创建数据库时默认创建的。
Each database has its own catalog table space, temporary table space, and user table space which are created by default upon successful database creation.
至少应当创建一个用户临时表空间以允许定义已声明的临时表。
At least one user temporary table space should be created to allow the definition of declared temporary tables.
为了构建这个日志框架,需要数据库管理员帮我们设置存储过程的日志目录并创建一个用户临时表空间。
In order for you to set up the logging framework, you will need help from your database administrator to set up the stored procedure logging directory and a user temporary table space.
其他用于用户数据、临时数据和索引数据的表空间则需要在创建数据库之后另行创建,并且在使用这些表空间之前,还需要为之指定一个用户。
Other table spaces for user, temporary and index data need to be created after the database has been created, and a user needs to be assigned to these table spaces before they can be used.
此外,任意连接都可以随时引用已创建的临时表,而不需要设置脚本来初始化已创建的临时表。
Also, any connection can refer to a created temporary table at any time without the need for a setup script to initialize the created temporary table.
本节讨论应该考虑的已创建的临时表的行为。
This section discusses the behaviors of created temporary tables that should be taken into account.
使用为基线数据的每会话存储创建的全局临时表(CGTT)(对于每个表函数,使用一个 CGTT)。
Use a created global temporary table (CGTT) for per-session storage of the baseline data (use one CGTT per table function).
清单4中在新创建的临时表上演示了删除表的过程。
The process of dropping a table is demonstrated on a newly created temporary table in Listing 4.
用户临时表空间是可选的,默认情况下不会创建用户临时表空间。
User temporary table Spaces are optional and none are created by default.
Temporary——存储数据库处理过程中所创建的系统临时表。
Temporary - to store the system temporary tables created during database processing.
已创建的全局临时表(CGTT)是DB 2 9.7中的新特性,它提供了以下功能。
Created global temporary tables (CGTTs) are a new feature in DB2 9.7 that provide the following new capabilities.
如果选定此选项,则导入或导出操作将为每一个要复制的表或视图动态创建一个临时包。
When this option is selected, the import or export operation creates a temporary package dynamically for each table or view to be copied.
如果选定此选项,则导入或导出操作将为每一个要复制的表或视图动态创建一个临时包。
When this option is selected, the import or export operation creates a temporary package dynamically for each table or view to be copied.
应用推荐