Upload “Email-Match Export.csv” to the SFTP Server ------------create directory create directo
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.
--结束END--
本文标题: 创建外部表(external table)
本文链接: https://www.lsjlt.com/news/45805.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
下载Word文档到电脑,方便收藏和打印~
2024-04-29
2024-04-29
2024-04-29
2024-04-29
2024-04-29
2024-04-29
2024-04-29
2024-04-29
2024-04-29
2024-04-28
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0