Chinaunix首页 | 论坛 | 博客
  • 博客访问: 101879785
  • 博文数量: 19283
  • 博客积分: 9968
  • 博客等级: 上将
  • 技术积分: 196062
  • 用 户 组: 普通用户
  • 注册时间: 2007-02-07 14:28
文章分类

全部博文(19283)

文章存档

2011年(1)

2009年(125)

2008年(19094)

2007年(63)

分类: Oracle

2008-05-22 17:12:46

  来源:

  
  
   
  7、现在在ORACLE   SERVER上创建DB   LINK就可以了。下面实验数据: 

   
  C:>sqlplus   /nolog 
  
  SQL*Plus:   Release   9.2.0.1.0   -   Production   on   星期三   6月   25   13:29:41   2003 
  
  Copyright   (c)   1982,   2002,   Oracle   Corporation.   All   rights   reserved. 
  
  SQL>   conn   sys/change_on_install   as   sysdba 
  
  已连接。 
  
  SQL>   create   user   cyx   identified   by   cyx   default   tablespace   users; 
  
  用户已创建 
  
  SQL>   grant   connect   to   cyx; 
  
  授权成功。 
  
  SQL>   grant   resource   to   cyx; 
  
  授权成功。 
  
  SQL>   conn   cyx/cyx 
  
  已连接。 
  
  SQL>   create   database   link   tosql2k   connect   to   cyx   identified   by   cyx   using   
  
  2   'sql2k'; 
  
  数据库已创建。 
  
  SQL>   select   *   from   t@tosql2k
  
  c 
  
  ---------- 
  
  abc 
  
  aaa 
  
  bbb 
  
  cyx 
  
  gototop 
  
  ncn 
  
  11111 
  
  已选择7行。 
  
  SQL>   insert   into   t@tosql2k   values('ncn.cn');  
  
已创建   1   行。 
  
  SQL>   commit; 
  
  提交完成。 
  
  SQL>   select   *   from   t@tosql2k
  
  c 
  
  ---------- 
  
  abc 
  
  aaa 
  
  bbb 
  
  cyx 
  
  gototop 
  
  ncn 
  
  11111 
  
  ncn.cn 
  
  已选择8行。

阅读(226) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~