私は、Oracle SQLで新しいですし、私は次のコンテキストでテーブルの更新をしようとしています:表領域TEMPで128セグメントの一時セグメントを拡張できません。そのクエリを実行する別のオプションは?
+---------+---------+---------+----------+
| ColumnA | name | ColumnC | Column H |
+---------+---------+---------+----------+
| 1 | Harry | null | null |
| 2 | Harry | null | null |
| 3 | Harry | null | null |
+---------+---------+---------+----------+
とテーブルB:
+---------+---------+---------+
| name | ColumnE | ColumnF |
+---------+---------+---------+
| Harry | a | d |
| Ron | b | e |
| Hermione| c | f |
+---------+---------+---------+
私はテーブルAを持っています
そして、私は結果は次となるように、テーブルAを更新する:
+---------+---------+---------+----------+
| ColumnA | name | ColumnC | Column H |
+---------+---------+---------+----------+
| 1 | Harry | a | d |
| 2 | Harry | a | d |
| 3 | Harry | a | d |
+---------+---------+---------+----------+
Oracle SQL文に問題があります。
merge into tableA a
using tableB b
on (a.name=b.name)
when matched then update set
columnC = b.columnE,
columnH = b.columnF
create table tableA (columnC varchar2(20), columnH varchar2(20), name varchar2(20), columnA number);
create table tableB (columnE varchar2(20), columnF varchar2(20), name varchar2(20));
insert into tableA values (null, null,'Harry',1);
insert into tableA values (null, null,'Harry',3);
insert into tableA values (null, null,'Harry',3);
insert into tableB values ('a', 'd','Harry');
insert into tableB values ('b', 'e','Ron');
insert into tableB values ('c', 'f','Hermione');
select * from tableA;
merge into tableA a
using tableB b
on (a.name=b.name)
when matched then update set
columnC = b.columnE,
columnH = b.columnF;
select * from tableA;
問題は、私はそのコマンドを実行したときに、私は次のエラーを取得することです::
Error: ORA-01652: unable to extend temp segment by 128 in tablespace TEMP
私はTEMP表領域に多くのスペースを与えることはできませんが、私は次のコンテキストを持っています。ですから、私の質問です:TEMPテーブルスペースを使用しない別のSQLクエリを使用するオプションはありますか?
なぜ、TEMPテーブルスペースを増やせませんか?あなたはサーバーや何かのスペースを使い果たしてしまったのですが、それ以上物理的に追加することはできませんか?それともあなたのDBAや何かからのプッシュバックですか? IMOは、システムが12GBの一時表領域を消費するチューニング済の問合せを実行できる必要がある場合、少なくとも12GBの一時表領域を必要とするためです。一時的なテーブル・スペースを追加するように私のDBAに要求するのは苦労しない、一時的な特別な問合せに対してのみです。 – Boneist