select * from scott(用户名).emp(表名)

解决方案 »

  1.   

    emp是在那个用户下,就要
    select * from user.emp
    而且要先将权限赋予sccot用户.
      

  2.   

    select * from scott(用户名).emp(表名)《--这个我早知道说啊大哥!我是要在客户端的scott用户下,访问**服务器上的表emp**!
    应该怎么写这个表名!我没说清楚吗?!
      

  3.   

    GerryYang(轻尘) 也没理解我说的意思?select * from  ????(想查服务器上的).scott(用户名).emp(表名)郁闷
      

  4.   

    比如我现在想把服务器上的emp表中的数据导到客户端上(都是scott用户)我在客户端登陆后(scott/tiger),这样写
    insert into emp(select * from ????)????就是服务器上的emp表,但不知道该怎么访问
      

  5.   

    就是那样的select * from scott(用户名).emp(表名)
      

  6.   

    楼上的你看清我的问题了吗?比如我现在想把服务器上的emp表中的数据导到客户端上(都是scott用户)我在客户端登陆后(scott/tiger),这样写
    insert into emp(select * from ????)????就是服务器上的emp表,但不知道该怎么访问
      

  7.   

    我误把自己机器上的scott.emp那个表中的数据删掉了,
    现在想把另外一台机器上的scott.emp中的数据导过来用,应该怎么办?
    两台机器的oracle连接已经没问题,网络服务名为z6
      

  8.   

    更正一下,另外一台机器名是z6,我在我的机器上建的服务名是z6service来连到z6
    在我的机器上scott/tiger下:
    insert into emp(select * fromz6(服务器主机名).z6service(网络服务名).scott(用户名).emp(表名))
    ?
      

  9.   

    在客户端登陆后(scott/tiger),
    你登陆sqlplus的时候就要登陆该服务器scott/tiger@z6service
    然后用select * from scott(用户名).emp(表名)
      

  10.   

    服了楼上的了,我解释了这么多遍还没看明白?????我现在是这样登陆的:sqlplus scott/tiger(登陆到自己的机器上,连服务名都没写)
    并不是也不想登陆到scott/tiger@z6service上,然后想把scott/tiger@z6service里的emp表中的数据导到我自己的(sqlplus scott/tiger)环境下!极度郁闷,难道我真表达明白?
    请大家评评理!
      

  11.   

    那就用dblink吧,可以实现你的想法
      

  12.   

    是啊用dblink,没错。开始你是没讲清楚
      

  13.   

    先从第一个服务器上导出来嘛:
    exp username/password@servername tables=(emp) file=emp.dmp compress=n再导入到第二个服务器不就得了!
    drop table emp;
    imp username/password@servername file=emp.dmp full=y
      

  14.   

    顺便问问,dblink怎么用啊,谢谢!
      

  15.   

    呵呵,彬彬彬挺有意思的,谢谢
    我也想知道怎么通过dblink实现这个要求
      

  16.   

    create database link Linkdb connect to DBNAME  identified pwd;select * from user.emp@Linkdb
      

  17.   

    创建一个数据库的连接
    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;
      

  18.   

    多谢 zealot_zk(风中追风) ( ) ,dblink会用了。