Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2000 > SQL Server 2000
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old June 26th, 2003, 02:26 AM
Authorized User
Join Date: Jun 2003
Posts: 60
Thanks: 0
Thanked 0 Times in 0 Posts
Default Importing a TextFile, best way

I want to import a textfile (approx 5mb) into a SQL Server table on a regular basis.

The way I am doing this at the moment is via a DTS package, where I delete a base table and import the new data. This works but my transaction log has grown 200Mb,

I have looked at Bulk Insert within DTS, but assume this creates a table each time, therefore my base table with indexes in will be lost.

My problem is the Tran Log, whats the best practice to delete this log or stop it growing. The freshly created base table is used only for reporting off.
Old June 27th, 2003, 07:24 AM
Authorized User
Join Date: Jun 2003
Posts: 77
Thanks: 0
Thanked 0 Times in 0 Posts

i think you should check out 'Using Recovery Models' on BOL, if you don't know about recovery models already. if you use 'simple recovery model' for a database (if this is what you need) means the transaction log files won't grow continually.

after that you may check-out 'Truncating the Transaction Log'. i didn't read this one :); the method i use is: i detach the database, then i delete the .ldf file(s) and then i attach the database back and a new small .ldf file is automatically created :). do a backup first if you want to try this method.


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to load multiple textfile royaloba Pro VB 6 2 October 27th, 2006 12:18 AM
BCP Error while importing data from a textfile happygv SQL Server 2000 5 October 6th, 2006 02:07 AM
Querying a textfile in QA daniel SQL Server 2000 10 February 1st, 2006 01:51 AM
Appending to a TextFile jfleming SQL Server DTS 3 June 16th, 2004 08:45 AM
Append a textfile information to a variable Helmut Classic ASP Professional 1 July 16th, 2003 08:23 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.