create database link Linkdb connect to DBNAME identified pwd;select * from user.emp@Linkdb
创建一个数据库的连接 slqplus /nolog conn / as sysdba create public database link link_name connect to user_name identified by PWD using 'service_name';insert into scott.emp select * form scott.emp@link_name; commit;
select * from user.emp
而且要先将权限赋予sccot用户.
应该怎么写这个表名!我没说清楚吗?!
insert into emp(select * from ????)????就是服务器上的emp表,但不知道该怎么访问
insert into emp(select * from ????)????就是服务器上的emp表,但不知道该怎么访问
现在想把另外一台机器上的scott.emp中的数据导过来用,应该怎么办?
两台机器的oracle连接已经没问题,网络服务名为z6
在我的机器上scott/tiger下:
insert into emp(select * fromz6(服务器主机名).z6service(网络服务名).scott(用户名).emp(表名))
?
你登陆sqlplus的时候就要登陆该服务器scott/tiger@z6service
然后用select * from scott(用户名).emp(表名)
并不是也不想登陆到scott/tiger@z6service上,然后想把scott/tiger@z6service里的emp表中的数据导到我自己的(sqlplus scott/tiger)环境下!极度郁闷,难道我真表达明白?
请大家评评理!
exp username/password@servername tables=(emp) file=emp.dmp compress=n再导入到第二个服务器不就得了!
drop table emp;
imp username/password@servername file=emp.dmp full=y
我也想知道怎么通过dblink实现这个要求
slqplus /nolog
conn / as sysdba
create public database link link_name connect to user_name identified by PWD using 'service_name';insert into scott.emp select * form scott.emp@link_name;
commit;