有A和B两个库 都有T用户A库中T用户下表C1的表结构 与 B库中T用户下的表C2表结构相同现在将C1中记录倒入C2(不经过中间状态如导成.dmp再倒入等等) 多谢帮忙小弟在线等
解决方案 »
- oracle表空间收缩问题
- min(sysdate-to_date('t2.FIRST_ORD_DATE','yyyymmdd'))
- 有一万条数据需要插入数据库,各位高手给点提示吧
- Toad总没响应的问题
- 着急!!如何通过OCI接口获取一个Package中的自定义类型????
- 安装Oracle817问题:原来装有客户端,现又装了服务器端,提示安装成功。但到服务里面看,没有发现监听服务。晕了,这是为何?
- 请高手写个PL/SQL中存储过程(有输入参数/输出参数)的例子?触发器怎么写?
- 怎么在Oracle中任何用户都可以以管理员身份登录啊?
- PLSQL中动态创建表的问题
- 异常处理的问题,来者有分,解决者一定慷慨给分!
- oracle 在网页链接后session 无变化 .我问过几个版,就没人能回答出来吗?
- 如何比较两个数据库结构是否一致,数据是否相同。
2. insert into c2 select * from c1@db_link
我好像没打public 是不是这个问题?
我也不知道哪里写错了 应该没写错才对 只能明天去再看看了
关键这么写跨网段没有问题么?用不用哪里写一下ip?
PURPOSE
-------
To help troubleshoot database link (dblink) configurations.TROUBLESHOOTING DBLINKS
-----------------------
1) Determine whether GLOBAL_NAMES is set to true. To check this, look in the
init<sid>.ora file located in ORACLE_HOME/dbs directory.If true, the dblink name MUST be the same as the DB_NAME of the target
database.To unset GLOBAL_NAMES, use the following commands using SQL*Plus or Server
Manager:SQL> ALTER SYSTEM SET GLOBAL_NAMES = FALSE; [instance level]
SQL> ALTER SESSION SET GLOBAL_NAMES = FALSE; [session level](If changing GLOBAL_NAMES from TRUE to FALSE, you must restart the database)2) Verify the GLOBAL_NAME matches the DB_NAME.DB_DOMAIN (also in init<sid>.ora)
To check the current value, issue either of the following commands using
SQL*Plus and Server Manager:SQL> SELECT * from GLOBAL_NAME;The return value should match DB_NAME and DB_DOMAIN parameter values in
init<sid>.ora file.If it does not, issue the following statement using SQL*Plus or Server Manager:SQL> ALTER DATABASE RENAME GLOBAL_NAME TO db_name.db_domain;3) Verify you can successfully connect to the database using SQL*Plus by issuing
the following command at the Operating System prompt:sqlplus username/password@aliasExample:
-------
Assuming you have an alias called ORCL in the TNSNAMES.ORA file, and want to
connect to that instance using SQL*Plus, issue the following at the Operating
System prompt:sqlplus system/manager@ORCL4) Recreate the dblink.
To drop an existing dblink, issue the following command using SQL*Plus or
Server Manager:SQL> DROP DATABASE LINK <dblink name>;To create a new DBLINK, issue the following command using SQL*Plus or Server
Manager:SQL> CREATE [PUBLIC] DATABASE LINK <dblink name>
[CONNECT TO <remote database username> IDENTIFIED BY
<remote database user password>] USING '<alias>';Note: Omitting KEYWORD PUBLIC will automatically create a PRIVATE dblink.If GLOBAL_NAMES is true, ensure the dblink name is the same as the DB_NAME.
Also ensure the TNSNAMES.ORA file (by default in ORACLE_HOME/network/admin)
contains an alias of the same name.Example:
-------
Assuming your database SID is ORCL, and GLOBAL_NAMES is true, create a dblink
called ORCL and add the following entry to the TNSNAMES.ORA file:ORCL =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS =
(PROTOCOL = TCP)
(HOST = my_server_name OR IP_address)
(PORT = 1521)
)
)
(CONNECT_DATA=(SID=ORCL))
)
你可以挨个试,总之如果改为false是最简单的.
DBLink是一个办法。另外,若数据库是 Oracle 10g 第2版,可以通过网络不产生dmp文件导入。
其他还有很多ETL工具可以用,比如Sql server的DTS就很好用
完全可以满足你的要求