概述 PCA IP地址:192.168.1.100 主机名:ACIT *** 作系统:windows xp
数据库:SQL SERVER 2005(Common数据库),ORACLE 11g PCB IP地址:192.168.1.101 主机名:TAI
| PCA | IP地址:192.168.1.100 | 主机名:ACIT | | | | | | | | | | |
| | *** 作系统:windows xp | 数据库:sql SERVER 2005(Common数据库),ORACLE 11g | | | | | | |
| | | | | | | | | | | | | | | | |
| PCB | IP地址:192.168.1.101 | 主机名:TAI | | | | | | | | | | |
| | *** 作系统:windows7 | 数据库:ORACLE 10g 用户名:IMEX | | | | | | | | |
| | | | | | | | | | | | | | | | |
| 现在要从PCA中的sql2005中的数据库common中复制数据到PCB中的oracle 10g中 | | | | | | | | |
| | | | | | | | | | | | | | | | |
| 一: | 现在PCB中oracle中创建用户:IMEX | | | | | | | | | | | |
| | sql> create user IMEX IDentifIEd by lenovo | | | | | | | | | | |
| | default tablespace users | | | | | | | | | | | | |
| | temporary tablespace temp | | | | | | | | | | | | |
| | quote unlimited on users | ——给新创建的用户分配磁盘空间,默认是0 | | | | | | | |
| | | | | | | | | | | | | | | | |
| | 单独赋予用户权限 | | | | | | | | | | | | | |
| | sql> grant create session to IMEX; | | | | | | | | | | | |
| | sql> grant create table to IMEX; | | | | | | | | | | | |
| | sql> grant create sequence to IMEX; | | | | | | | | | | | |
| | sql> grant create vIEw to IMEX; | | | | | | | | | | | |
| | | | | | | | | | | | | | | | |
| 二: | 在windows下创建一个ODBC数据源 | | | | | | | | | | | |
| | 控制面板——管理工具——数据源(ODBC),"系统 DSN” 项卡中点击添加按钮,选择相关Oracle驱动 | | | | | | |
| | _ | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | | | | | | | |
| | 配置ODBC如下: | | | | | | | | | | | | | |
| | | | | | | | | |
| | | | | | | | |
| | Data Source name:数据源名称,这个自己定义 | | |
| | | | | | | | |
| | | | | | | | |
| | TNS Service name: | 这个是PCB中的网络服务名,也就是PCB中 | |
| | | | tnsname.ora中的连接标识符(一般就是services_name) |
| | | | | | | | |
| | UserID | :登陆PCB中的用户名 | | | | |
| | Test Connection 按钮如右图: | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | | | | | |
| 三: | sql Server往Oracle导入数据 | | | | | | | | | | | | |
| | 启动"sql Server 企业管理器" ,在数据库——Common 中 "所有任务",导出数据 | | | | | | | | |
| | | | | | | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | |
| | 下面是几个步骤: | 选择数据源, | | | | | | | | | | | |
| | <1>选择数据源 | | | | | | | | | | | | | |
| | | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | Data source:sql的数据源 | | | | |
| | Server name:PCA | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | | | | | | | | |
| | <2>选择目的(要导入数据的PCB) | | | | | | | | | | | |
| | | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | Data Source:可以是PCB的IP地址或者网络服务名 | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | username:PCB上Oracle 10g创建的用户 | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | | | | | | |
| | <3>选择表和视图 | | | | | | | | | | | | | |
| | | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | 这里在"选择源表和视图"的时候,主要要把数据库的目的表名或视图名改成大写的并且去掉前面的用户名, |
| | 在这一步如果你导入的表中的字段类型是nvarchar的,转换成oracle中对应的类型是 |
| | nvarchar2类型,有时候转换的nvarchar2没有长度。所以会报错:缺少左括号 |
| | 可以点击 图中的Edit 修改类型 | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | | | | | | | | |
| | 至此数据的导入完毕 |
总结
以上是内存溢出为你收集整理的sqlserver2005导入数据到oracle 10g全部内容,希望文章能够帮你解决sqlserver2005导入数据到oracle 10g所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
评论列表(0条)