creating a table in oracle using sql server table -
i have table in sql server 2008 r2, contains 1m or more records want create table in oracle same contents thats in sql.
there several ways of doing that. can first on following tutorial: migrating microsoft sql server database oracle database 11g
i have done task in past using following steps:
- create table in oracle database (only schema, not data).
- export data sql server 1 or more csv (or other delimiter files (i suggest create files no more 100,000 records)
- use sql*loader (an oracle utilily) load data files oracle.
the oracle sql*loader utility command line tool allows load data files oracle. uses control file specifies source file, structure , loading strategy.
the advantage of using tool vs. loading using insert statements speed of loading. since tool bypass log files extreamly fase.
here link sql loader tutorial: sql*loader faq
from tutorial:
usage:
sqlldr username/password@server control=loader.ctl
control file sample:
(1) load data (2) infile 'c:\data\mydata.csv' (3) table emp (4) fields terminated "," optionally enclosed '"' (5) ( empno, empname, sal, deptno )
line 1: speciefies want load data table
line 2: specifies source file contains data
line 3: specifies destination table
line 4: specifies columns delimiter (comma in example) , string values might enclosed " char.
line 5: specifies order of columns in file
data files sample (corresponds control file above):
10001,"scott tiger", 1000, 40 10002,"frank naude", 500, 20
hope helped.
koby
Comments
Post a Comment