溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊(cè)×
其他方式登錄
點(diǎn)擊 登錄注冊(cè) 即表示同意《億速云用戶服務(wù)條款》

創(chuàng)建外部表(external table)

發(fā)布時(shí)間:2020-08-06 22:11:43 來源:ITPUB博客 閱讀:257 作者:wwwwwwyl 欄目:關(guān)系型數(shù)據(jù)庫

Upload “Email-Match Export.csv” to the SFTP Server


------------create directory

create directory xtern_data_dir_yilin as '/backup/yilin';


------------grant access

GRANT READ, WRITE ON DIRECTORY xtern_data_dir_yilin TO willldb;


Login to Database with WILLLDB


------------create table

SQL> CREATE TABLE survey_respdts_yilin

  2  (

  3      email_address  VARCHAR(200)

  4  )

  5  ORGANIZATION EXTERNAL

  6      (DEFAULT DIRECTORY xtern_data_dir_yilin

  7       ACCESS PARAMETERS (

  8           RECORDS DELIMITED BY NEWLINE

  9  FIELDS TERMINATED BY ".com" LDRTRIM

 10       )

 11       LOCATION ('Email-Match Export.csv'));

CREATE TABLE survey_respdts_yilin

*

ERROR at line 1:

ORA-25153: Temporary Tablespace is Empty

 

SQL> create temporary tablespace temp01 tempfile 'd:oracleoradatatestdbtemp01

  2  .dbf' size 100m;

 

Tablespace created.

 

SQL> alter database default temporary tablespace temp01;

 

Database altered.

 

SQL> CREATE TABLE survey_respdts_yilin

  2  (

  3      email_address  VARCHAR(200)

  4  )

  5  ORGANIZATION EXTERNAL

  6      (DEFAULT DIRECTORY xtern_data_dir_yilin

  7       ACCESS PARAMETERS (

  8           RECORDS DELIMITED BY NEWLINE

  9   FIELDS TERMINATED BY ".com" LDRTRIM  

 10       )

 11       LOCATION ('Email-Match Export.csv'));

 

Table created.

向AI問一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI