copy命令的使用

发布于 2022-06-05 22:42:22 字数 173 浏览 713 评论 7

COPY FROM test/123456 TO test/123456

CREATE test005 USING SELECT * FROM test004;

请问大家我在执行上面语句的时候,报错:ORA-00901: invalid CREATE command

请问为什么?
COPY, 命令, FROM, USING, SELECT

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(7

云之铃。 2022-06-11 01:48:09

SQL> conn sys/liang as sysdba

Connected.

SQL> create user b identified by b;

User created.

SQL> grant create session to b;

Grant succeeded.

SQL> conn b/b

Connected.

SQL> create table t

  2  as select * from all_tables;

as select * from all_tables

                 *

ERROR at line 2:

ORA-01031: insufficient privileges

SQL> conn sys/liang as sysdba

Connected.

SQL> grant create table to b;

Grant succeeded.

SQL> conn b/b

Connected.

SQL>  create table t

  2   as select * from all_tables;

as select * from all_tables

                  *

ERROR at line 2:

ORA-01950: no privileges on tablespace 'USERS'

SQL> conn sys/liang as sysdba

Connected.

SQL> alter user b quota unlimited on users;

User altered.

SQL> conn b/b

Connected.

SQL>  create table t

  2   as select * from all_tables;

Table created.

SQL>

SQL> select * from session_privs;

PRIVILEGE

----------------------------------------

CREATE SESSION

CREATE TABLE

SQL> copy from b/b@orcl to b/b@orcl create t9 using select * from t;

Array fetch/bind size is 15. (arraysize is 15)

Will commit when done. (copycommit is 0)

Maximum long size is 80. (long is 80)

Table T9 created.

   22 rows selected from b@orcl.

   22 rows inserted into T9.

   22 rows committed into T9 at b@orcl.

当梦初醒 2022-06-11 01:46:13

SQL> select * from session_privs;

PRIVILEGE

----------------------------------------

CREATE SESSION

CREATE TABLE

CREATE CLUSTER

CREATE SEQUENCE

CREATE PROCEDURE

CREATE TRIGGER

CREATE TYPE

CREATE OPERATOR

CREATE INDEXTYPE

SQL>  copy from lcm/lcm@orcl to lcm/lcm@orcl  create t9 using select * from t1;

Array fetch/bind size is 15. (arraysize is 15)

Will commit when done. (copycommit is 0)

Maximum long size is 80. (long is 80)

Table T9 created.

   42394 rows selected from lcm@orcl.

   42394 rows inserted into T9.

   42394 rows committed into T9 at lcm@orcl.

oО清风挽发oО 2022-06-11 00:59:43

请问执行这个命令跟用户的权限有没有关系?我的用户只有以下权限:

create procedure

create sequence

create session

create snapshot

create synonym

create table

create trigger

create type

create view

守不住的情 2022-06-11 00:57:17

相同模式下copy:

SQL> copy from lcm/lcm@orcl to lcm/lcm@orcl  create t9 using select * from t1;

Array fetch/bind size is 15. (arraysize is 15)

Will commit when done. (copycommit is 0)

Maximum long size is 80. (long is 80)

Table T9 created.

   42394 rows selected from lcm@orcl.

   42394 rows inserted into T9.

   42394 rows committed into T9 at lcm@orcl.

春风十里 2022-06-10 19:32:01

SQL> copy from lcm/lcm@orcl to aa/aa@orcl create t9 using select * from t1;

Array fetch/bind size is 15. (arraysize is 15)

Will commit when done. (copycommit is 0)

Maximum long size is 80. (long is 80)

Table T9 created.

   42394 rows selected from lcm@orcl.

   42394 rows inserted into T9.

   42394 rows committed into T9 at aa@orcl.

烂人 2022-06-09 23:54:32

应该可以的吧

我换了用户也不行啊?

冧九 2022-06-09 04:23:28

test/123456 TO test/123456 ,同一个用户怎么复制???

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文