Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: EXPORT A GREAT AMOUNT OF DATA FROM A TEXT FILE TO AN ORACLE TABLE
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