Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: EXPORT A GREAT AMOUNT OF DATA FROM A TEXT FILE TO AN ORACLE TABLE

Re: EXPORT A GREAT AMOUNT OF DATA FROM A TEXT FILE TO AN ORACLE TABLE

From: Sybrand Bakker <oradba_at_sybrandb.demon.nl>
Date: Wed, 14 Nov 2001 14:22:31 +0100
Message-ID: <4ur4vt0p5q48cn0jsja0q0jmdmm11qdrkr@4ax.com>


On 14 Nov 2001 03:37:07 -0800, eusjavi_at_ole.com (Javi) wrote:

>Hi, i have to export (monthly) a 300 Mb text file to an oracle table,
>and the only method that i know to do it is the one below.
>This is a bullsheet i need a very higher speed. Does anybody know how
>to do it much faster in other way?
>
>
>Private Sub Command2_Click()
>'Dim nADO As Adodc
>
> Dim dbTxt As Database
> Dim rds As Recordset
>
>
>
> Set dbTxt = OpenDatabase("C:\", False, False, "TEXT;")
> Set rds = dbTxt.OpenRecordset("Co1107~1.txt")
>
>
>Screen.MousePointer = vbHourglass
> nADO.CommandType = adCmdTable
>
>nADO.ConnectionString = "Provider=MSDAORA.1;Password=********;User
>ID=***;Data Source=****;Persist Security Info=True"
>
>nADO.RecordSource = "tarifica.llamadas1"
>nADO.Refresh
>
>
>rds.MoveFirst
>MsgBox (Time())
>ProgressBar1.Min = 0
>ProgressBar1.Max = rds.RecordCount + 2
>ProgressBar1.Value = 0
>While Not rds.EOF
> nADO.Recordset.AddNew
> nADO.Recordset("col0") = rds(0)
> nADO.Recordset.Update
> rds.MoveNext
> ProgressBar1.Value = ProgressBar1.Value + 1
>Wend
>rds.Close
>nADO.Recordset.Close
>Dim a As Integer
>a = 1
>
>MsgBox (Time())
>
>Screen.MousePointer = vbNormal
>End Sub

Use SQL*Loader, it's there for this type of work. It is described in the Oracle Server Utilities manual, installed with the Administrator client, complete with samples (utlcase?.ctl)

Hth

Sybrand Bakker, Senior Oracle DBA

To reply remove -verwijderdit from my e-mail address Received on Wed Nov 14 2001 - 07:22:31 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US