Showing posts with label log. Show all posts
Showing posts with label log. Show all posts

Monday, March 26, 2012

Proper Way to Truncate Log After Performing Full Backup (SQL Server 2000)

Hello all - I have a SQL Server 2000 database setup using the Full Recovery Model. Each night, we backup the entire database, and as such would like to truncate the log at this time as well.

Is the best way to do this to also backup the Transaction Log, and then perform a DBCC SHRINKFILE command? It just seems like there should be an easier way...?

Thanks!

Let's back up a few steps here.

What are you gaining by shrinking the transaction log every night?

The transaction log is designed to continually reuse its space internally. Whenever you back up the transaction log, all virtual log files (logical areas within the physical log file) which are not involved in any current transaction are marked as "free" and can be reused.

So, one way to manage the growth of a transaction log is to vary the frequency of log backups. The more frequent the log backup, the less data needs to be stored in the log (and the less data is lost in the event of a disaster).

Once the log reaches a steady-state, it shouldn't grow unless some exceptional update happens.

When you continually shrink and grow the file, you end up with filesystem fragmentation, which isn't good for performance. Also, the log file growth itself takes time.

proper time to shrink tempdb size?

hi,
working on sql server 2000.
Can you shrink tempdb's log and data file size at any time
during the day on production servers?
Will this impact other user's jobs on the server?
many thanks.
JJPlease don't post independently in multiple newsgroups. You can add the
other newsgroups in the "Newsgroups" section in the header and it will show
up in all those simultaneously as will the answers. See my reply in the
other newsgroup.
Andrew J. Kelly
SQL Server MVP
"JJ Wang" <anonymous@.discussions.microsoft.com> wrote in message
news:06b201c3a4da$e397ad60$a301280a@.phx.gbl...
> hi,
> working on sql server 2000.
> Can you shrink tempdb's log and data file size at any time
> during the day on production servers?
> Will this impact other user's jobs on the server?
> many thanks.
> JJ|||am I causing any problem this way? What's the difference
between the two ways?
Thanks.
JJ
>--Original Message--
>Please don't post independently in multiple newsgroups.
You can add the
>other newsgroups in the "Newsgroups" section in the
header and it will show
>up in all those simultaneously as will the answers. See
my reply in the
>other newsgroup.
>
>--
>Andrew J. Kelly
>SQL Server MVP
>
>"JJ Wang" <anonymous@.discussions.microsoft.com> wrote in
message
>news:06b201c3a4da$e397ad60$a301280a@.phx.gbl...
>> hi,
>> working on sql server 2000.
>> Can you shrink tempdb's log and data file size at any
time
>> during the day on production servers?
>> Will this impact other user's jobs on the server?
>> many thanks.
>> JJ
>
>.
>|||Hi JJ
There could be problems, or at least wasted time and fewer people getting
answers. If you post INDEPENDENTLY in separate newsgroups, someone could
answer you one place, and someone else could read your question in a
different group, and not know that you had already been answered. The
threads are kept completely separate., A second person could spend time
researcching and responding to a question that had already been answered.
This is wasting time they could have used to help somebody else.
If you list all the newsgroups in the header in one post, then any answer
posted in one newsgroup will be visible to people reading your question in
any of the included newsgroups.
Does that make sense?
--
HTH
--
Kalen Delaney
SQL Server MVP
www.SolidQualityLearning.com
"JJ Wang" <anonymous@.discussions.microsoft.com> wrote in message
news:00f501c3a553$5bc5e3b0$a301280a@.phx.gbl...
> am I causing any problem this way? What's the difference
> between the two ways?
> Thanks.
> JJ
> >--Original Message--
> >
> >Please don't post independently in multiple newsgroups.
> You can add the
> >other newsgroups in the "Newsgroups" section in the
> header and it will show
> >up in all those simultaneously as will the answers. See
> my reply in the
> >other newsgroup.
> >
> >
> >
> >--
> >
> >Andrew J. Kelly
> >SQL Server MVP
> >
> >
> >"JJ Wang" <anonymous@.discussions.microsoft.com> wrote in
> message
> >news:06b201c3a4da$e397ad60$a301280a@.phx.gbl...
> >> hi,
> >>
> >> working on sql server 2000.
> >>
> >> Can you shrink tempdb's log and data file size at any
> time
> >> during the day on production servers?
> >>
> >> Will this impact other user's jobs on the server?
> >>
> >> many thanks.
> >>
> >> JJ
> >
> >
> >.
> >|||Very well put Kalen... Thank you
--
Andrew J. Kelly
SQL Server MVP
"Kalen Delaney" <replies@.public_newsgroups.com> wrote in message
news:%23BBKFdVpDHA.1020@.TK2MSFTNGP09.phx.gbl...
> Hi JJ
> There could be problems, or at least wasted time and fewer people getting
> answers. If you post INDEPENDENTLY in separate newsgroups, someone could
> answer you one place, and someone else could read your question in a
> different group, and not know that you had already been answered. The
> threads are kept completely separate., A second person could spend time
> researcching and responding to a question that had already been answered.
> This is wasting time they could have used to help somebody else.
> If you list all the newsgroups in the header in one post, then any answer
> posted in one newsgroup will be visible to people reading your question in
> any of the included newsgroups.
> Does that make sense?
> --
> HTH
> --
> Kalen Delaney
> SQL Server MVP
> www.SolidQualityLearning.com
>
> "JJ Wang" <anonymous@.discussions.microsoft.com> wrote in message
> news:00f501c3a553$5bc5e3b0$a301280a@.phx.gbl...
> > am I causing any problem this way? What's the difference
> > between the two ways?
> >
> > Thanks.
> >
> > JJ
> > >--Original Message--
> > >
> > >Please don't post independently in multiple newsgroups.
> > You can add the
> > >other newsgroups in the "Newsgroups" section in the
> > header and it will show
> > >up in all those simultaneously as will the answers. See
> > my reply in the
> > >other newsgroup.
> > >
> > >
> > >
> > >--
> > >
> > >Andrew J. Kelly
> > >SQL Server MVP
> > >
> > >
> > >"JJ Wang" <anonymous@.discussions.microsoft.com> wrote in
> > message
> > >news:06b201c3a4da$e397ad60$a301280a@.phx.gbl...
> > >> hi,
> > >>
> > >> working on sql server 2000.
> > >>
> > >> Can you shrink tempdb's log and data file size at any
> > time
> > >> during the day on production servers?
> > >>
> > >> Will this impact other user's jobs on the server?
> > >>
> > >> many thanks.
> > >>
> > >> JJ
> > >
> > >
> > >.
> > >
>|||good to know. thank you for the pointers. never knew
about this until now. where can I go to find out more
tips like this? I think we should make this kind of rules
very visible for people so that there won't be any more
confusions like this.
JJ
>--Original Message--
>Very well put Kalen... Thank you
>--
>Andrew J. Kelly
>SQL Server MVP
>
>"Kalen Delaney" <replies@.public_newsgroups.com> wrote in
message
>news:%23BBKFdVpDHA.1020@.TK2MSFTNGP09.phx.gbl...
>> Hi JJ
>> There could be problems, or at least wasted time and
fewer people getting
>> answers. If you post INDEPENDENTLY in separate
newsgroups, someone could
>> answer you one place, and someone else could read your
question in a
>> different group, and not know that you had already been
answered. The
>> threads are kept completely separate., A second person
could spend time
>> researcching and responding to a question that had
already been answered.
>> This is wasting time they could have used to help
somebody else.
>> If you list all the newsgroups in the header in one
post, then any answer
>> posted in one newsgroup will be visible to people
reading your question in
>> any of the included newsgroups.
>> Does that make sense?
>> --
>> HTH
>> --
>> Kalen Delaney
>> SQL Server MVP
>> www.SolidQualityLearning.com
>>
>> "JJ Wang" <anonymous@.discussions.microsoft.com> wrote
in message
>> news:00f501c3a553$5bc5e3b0$a301280a@.phx.gbl...
>> > am I causing any problem this way? What's the
difference
>> > between the two ways?
>> >
>> > Thanks.
>> >
>> > JJ
>> > >--Original Message--
>> > >
>> > >Please don't post independently in multiple
newsgroups.
>> > You can add the
>> > >other newsgroups in the "Newsgroups" section in the
>> > header and it will show
>> > >up in all those simultaneously as will the answers.
See
>> > my reply in the
>> > >other newsgroup.
>> > >
>> > >
>> > >
>> > >--
>> > >
>> > >Andrew J. Kelly
>> > >SQL Server MVP
>> > >
>> > >
>> > >"JJ Wang" <anonymous@.discussions.microsoft.com>
wrote in
>> > message
>> > >news:06b201c3a4da$e397ad60$a301280a@.phx.gbl...
>> > >> hi,
>> > >>
>> > >> working on sql server 2000.
>> > >>
>> > >> Can you shrink tempdb's log and data file size at
any
>> > time
>> > >> during the day on production servers?
>> > >>
>> > >> Will this impact other user's jobs on the server?
>> > >>
>> > >> many thanks.
>> > >>
>> > >> JJ
>> > >
>> > >
>> > >.
>> > >
>>
>
>.
>|||today I followed your tip and posted one message with
multiple addresses to the group. One person answered me
in one group and also showed in the other, so this part
worked.
But when I answered back in one group, my answer didn't
get automatically posted in the other group. How come? I
sure hope this thing won't cause so much trouble for me.
JJ
>--Original Message--
>Very well put Kalen... Thank you
>--
>Andrew J. Kelly
>SQL Server MVP
>
>"Kalen Delaney" <replies@.public_newsgroups.com> wrote in
message
>news:%23BBKFdVpDHA.1020@.TK2MSFTNGP09.phx.gbl...
>> Hi JJ
>> There could be problems, or at least wasted time and
fewer people getting
>> answers. If you post INDEPENDENTLY in separate
newsgroups, someone could
>> answer you one place, and someone else could read your
question in a
>> different group, and not know that you had already been
answered. The
>> threads are kept completely separate., A second person
could spend time
>> researcching and responding to a question that had
already been answered.
>> This is wasting time they could have used to help
somebody else.
>> If you list all the newsgroups in the header in one
post, then any answer
>> posted in one newsgroup will be visible to people
reading your question in
>> any of the included newsgroups.
>> Does that make sense?
>> --
>> HTH
>> --
>> Kalen Delaney
>> SQL Server MVP
>> www.SolidQualityLearning.com
>>
>> "JJ Wang" <anonymous@.discussions.microsoft.com> wrote
in message
>> news:00f501c3a553$5bc5e3b0$a301280a@.phx.gbl...
>> > am I causing any problem this way? What's the
difference
>> > between the two ways?
>> >
>> > Thanks.
>> >
>> > JJ
>> > >--Original Message--
>> > >
>> > >Please don't post independently in multiple
newsgroups.
>> > You can add the
>> > >other newsgroups in the "Newsgroups" section in the
>> > header and it will show
>> > >up in all those simultaneously as will the answers.
See
>> > my reply in the
>> > >other newsgroup.
>> > >
>> > >
>> > >
>> > >--
>> > >
>> > >Andrew J. Kelly
>> > >SQL Server MVP
>> > >
>> > >
>> > >"JJ Wang" <anonymous@.discussions.microsoft.com>
wrote in
>> > message
>> > >news:06b201c3a4da$e397ad60$a301280a@.phx.gbl...
>> > >> hi,
>> > >>
>> > >> working on sql server 2000.
>> > >>
>> > >> Can you shrink tempdb's log and data file size at
any
>> > time
>> > >> during the day on production servers?
>> > >>
>> > >> Will this impact other user's jobs on the server?
>> > >>
>> > >> many thanks.
>> > >>
>> > >> JJ
>> > >
>> > >
>> > >.
>> > >
>>
>
>.
>|||If the original post was to multiple groups and you use the Reply to Group
feature it should post to all the groups.
--
Andrew J. Kelly
SQL Server MVP
"JJ Wang" <anonymous@.discussions.microsoft.com> wrote in message
news:067b01c3aa48$46ed2620$a101280a@.phx.gbl...
> today I followed your tip and posted one message with
> multiple addresses to the group. One person answered me
> in one group and also showed in the other, so this part
> worked.
> But when I answered back in one group, my answer didn't
> get automatically posted in the other group. How come? I
> sure hope this thing won't cause so much trouble for me.
> JJ
> >--Original Message--
> >Very well put Kalen... Thank you
> >
> >--
> >
> >Andrew J. Kelly
> >SQL Server MVP
> >
> >
> >"Kalen Delaney" <replies@.public_newsgroups.com> wrote in
> message
> >news:%23BBKFdVpDHA.1020@.TK2MSFTNGP09.phx.gbl...
> >> Hi JJ
> >>
> >> There could be problems, or at least wasted time and
> fewer people getting
> >> answers. If you post INDEPENDENTLY in separate
> newsgroups, someone could
> >> answer you one place, and someone else could read your
> question in a
> >> different group, and not know that you had already been
> answered. The
> >> threads are kept completely separate., A second person
> could spend time
> >> researcching and responding to a question that had
> already been answered.
> >> This is wasting time they could have used to help
> somebody else.
> >>
> >> If you list all the newsgroups in the header in one
> post, then any answer
> >> posted in one newsgroup will be visible to people
> reading your question in
> >> any of the included newsgroups.
> >>
> >> Does that make sense?
> >>
> >> --
> >> HTH
> >> --
> >> Kalen Delaney
> >> SQL Server MVP
> >> www.SolidQualityLearning.com
> >>
> >>
> >> "JJ Wang" <anonymous@.discussions.microsoft.com> wrote
> in message
> >> news:00f501c3a553$5bc5e3b0$a301280a@.phx.gbl...
> >> > am I causing any problem this way? What's the
> difference
> >> > between the two ways?
> >> >
> >> > Thanks.
> >> >
> >> > JJ
> >> > >--Original Message--
> >> > >
> >> > >Please don't post independently in multiple
> newsgroups.
> >> > You can add the
> >> > >other newsgroups in the "Newsgroups" section in the
> >> > header and it will show
> >> > >up in all those simultaneously as will the answers.
> See
> >> > my reply in the
> >> > >other newsgroup.
> >> > >
> >> > >
> >> > >
> >> > >--
> >> > >
> >> > >Andrew J. Kelly
> >> > >SQL Server MVP
> >> > >
> >> > >
> >> > >"JJ Wang" <anonymous@.discussions.microsoft.com>
> wrote in
> >> > message
> >> > >news:06b201c3a4da$e397ad60$a301280a@.phx.gbl...
> >> > >> hi,
> >> > >>
> >> > >> working on sql server 2000.
> >> > >>
> >> > >> Can you shrink tempdb's log and data file size at
> any
> >> > time
> >> > >> during the day on production servers?
> >> > >>
> >> > >> Will this impact other user's jobs on the server?
> >> > >>
> >> > >> many thanks.
> >> > >>
> >> > >> JJ
> >> > >
> >> > >
> >> > >.
> >> > >
> >>
> >>
> >
> >
> >.
> >

Wednesday, March 21, 2012

Promlem with loging in Managment Studio

hi

I'm going to use Enterprise edition

when I want to log in Managment Studio I face a window asking me for Server Name in addition to Server Type and authentication mode.

what should I write in Server Name section.I know the format is:

ComputerName\Instance Name

but what should I write in Instance Name?

thanks

Hello -

If you've installed SQL Server on the system with all the defaults, you don't have to type anything in the instance name. It's just the name of the server. If you installed SQL Server Express, it installs as a named instance by default. Usually it is named SQLExpress, so the name would be:

(your Server name)\SQLEXPRESS

To find out if the server is default or named, open a command prompt in Windows and type this:

NET START

Look for the service that starts with "SQL Server" in the name and to the right you'll see if it is a named instance or not. It will have the name of the instance in parenthesis, and if it is MSSQLSERVER it's default, and you don't have to type anything other than the server name. If it has something else there, it is named and that is the name you type.

More here: http://www.mssqltips.com/tip.asp?tip=1048

Note: If this answers your question, make sure you mark it "answered" so that others can find it!

Buck Woody
http://www.buckwoody.com

|||

You have to know what the instance name is; we can't tell you that. The best advice I can give you is to launch the SQL Server Configuration Manager (In your Start Menu->SQL Server 2005->Configuration Tools folder), browse to the Services tab, and locate any service that has a Service Type of "SQL Server", and then work from there.

If the service name is "SQL Server (MSSQLSERVER)" then you do not have an instance name (just use the computer name)

If the service name is "SQL Server (SQLEXPRESS)" then use ComputerName\SqlExpress

Check out my SQL Server 2005 video tutorials: http://www.learnsqlserver.com/

|||Where is it? I searched it and it does not come up in my search but when I go to microsoft .com they say it is already on the compuer

Promlem with loging in Managment Studio

hi

I'm going to use Enterprise edition

when I want to log in Managment Studio I face a window asking me for Server Name in addition to Server Type and authentication mode.

what should I write in Server Name section.I know the format is:

ComputerName\Instance Name

but what should I write in Instance Name?

thanks

Hello -

If you've installed SQL Server on the system with all the defaults, you don't have to type anything in the instance name. It's just the name of the server. If you installed SQL Server Express, it installs as a named instance by default. Usually it is named SQLExpress, so the name would be:

(your Server name)\SQLEXPRESS

To find out if the server is default or named, open a command prompt in Windows and type this:

NET START

Look for the service that starts with "SQL Server" in the name and to the right you'll see if it is a named instance or not. It will have the name of the instance in parenthesis, and if it is MSSQLSERVER it's default, and you don't have to type anything other than the server name. If it has something else there, it is named and that is the name you type.

More here: http://www.mssqltips.com/tip.asp?tip=1048

Note: If this answers your question, make sure you mark it "answered" so that others can find it!

Buck Woody
http://www.buckwoody.com

|||

You have to know what the instance name is; we can't tell you that. The best advice I can give you is to launch the SQL Server Configuration Manager (In your Start Menu->SQL Server 2005->Configuration Tools folder), browse to the Services tab, and locate any service that has a Service Type of "SQL Server", and then work from there.

If the service name is "SQL Server (MSSQLSERVER)" then you do not have an instance name (just use the computer name)

If the service name is "SQL Server (SQLEXPRESS)" then use ComputerName\SqlExpress

Check out my SQL Server 2005 video tutorials: http://www.learnsqlserver.com/

Promblem with log in Managment studio

hi

Until now I was using SQLServer Express edition and whenever I wanted to log in Management Studio In the Server Name section I used to wirte MyComputername\SQLExpress

but now I'm going to use Enterprise edition

what should I write in the Server Name section to log in Management studio?

Hi,

well, that depends. If you are using a default instance it should be just the "servername" or "." or "(localhost)". If you are using a named instance it should be something like your mentioned combination with the name of the instance substituted with the SQLExpress keyword.

MachineName\NameInstanceName

HTH, Jens K. Suessmeyer.

http:://www.sqlserver2005.de

Tuesday, March 20, 2012

Progress on runaway log files issue?

Can anyone tell me the status of the hotfix to resolve the runaway log file
issue? I've been trying to keep an eye on this group as it had been
mentioned in previous posts that an announcement would be posted here when
the fix is available, but I haven't seen it yet. Didn't know if I had
missed it or if it's still being worked on.
Thanks,
ShawnGo to support.microsoft.com and search for article 885286
Jeff
"Shawn Hansen" <shansen@.lrs.com> wrote in message
news:ecK18ZHsEHA.3712@.TK2MSFTNGP15.phx.gbl...
> Can anyone tell me the status of the hotfix to resolve the runaway log
file
> issue? I've been trying to keep an eye on this group as it had been
> mentioned in previous posts that an announcement would be posted here when
> the fix is available, but I haven't seen it yet. Didn't know if I had
> missed it or if it's still being worked on.
> Thanks,
> Shawn
>

Friday, March 9, 2012

Programmatically determine IIS log directory

I wrote a custom IIS log reader windows service that reads and parses log data and periodically uploads it to a SQL server table which I run my reports from later. Currently I read the file by giving the absolute physical path name for the log directory followed by the log file name I anticipate depending on date/time stamps.

My question is: Is there a programmatic way to get the directory path which is configured in IIS to store the IIS log files to? We use non default location e.g. D:\DATA\LOGS\IIS\W3SVC1 or something similar, which might change from server to server. Also, I am not worried about the individual log file names but the directory. I would prefer a C# code example.

Any help is appreciated!

KC

Hi,

I'm sorry that I don't have a solution to your problem, but your reader sounds like something I really could use. Any chance I could get you to send me a copy of the program? Unfortunately I'm a delphi programmer so I can't help you out, but I'm learning C in my spare (ha!) time and your code and logic could help me come up with a solution for my company. My email address is:

lkuderick

@.

hotmail

.

com

if you can help.

Thanks!

>> larry <<

Programmatically determine IIS log directory

I wrote a custom IIS log reader windows service that reads and parses log data and periodically uploads it to a SQL server table which I run my reports from later. Currently I read the file by giving the absolute physical path name for the log directory followed by the log file name I anticipate depending on date/time stamps.

My question is: Is there a programmatic way to get the directory path which is configured in IIS to store the IIS log files to? We use non default location e.g. D:\DATA\LOGS\IIS\W3SVC1 or something similar, which might change from server to server. Also, I am not worried about the individual log file names but the directory. I would prefer a C# code example.

Any help is appreciated!

KC

Hi,

I'm sorry that I don't have a solution to your problem, but your reader sounds like something I really could use. Any chance I could get you to send me a copy of the program? Unfortunately I'm a delphi programmer so I can't help you out, but I'm learning C in my spare (ha!) time and your code and logic could help me come up with a solution for my company. My email address is:

lkuderick

@.

hotmail

.

com

if you can help.

Thanks!

>> larry <<

Monday, February 20, 2012

Programatic Import (Space delimited) import into SQL Server 2000

I am trying to find a way to do a programatic import of a space delimited
file into a SQL Server 2000 database.
The file is actually an IIS web log file. I can run through the file and
strip out the header information, I can even create a seperate file for each
change in header information is needed.
The problem becomes importing that file into the database. The log files are
on average 6MB each. The import will need to run daily on just a single log
file (after previous log files have been imported)
I do not want to use BULK INSERT because I have had a lot of inconsistant
problems with that functionality in the past.
Does anyone have any ideas?
John WycoffI would start with the DTS data import wizard. You can specify a text
file as input, and space as the column delimiter, and the package it
generates can be saved and modified later. It does assume that all
the rows are in the same format.
Roy Harvey
Beacon Falls, CT
On Thu, 20 Jul 2006 07:15:01 -0700, John Wycoff <John
Wycoff@.discussions.microsoft.com> wrote:
>I am trying to find a way to do a programatic import of a space delimited
>file into a SQL Server 2000 database.
>The file is actually an IIS web log file. I can run through the file and
>strip out the header information, I can even create a seperate file for each
>change in header information is needed.
>The problem becomes importing that file into the database. The log files are
>on average 6MB each. The import will need to run daily on just a single log
>file (after previous log files have been imported)
>I do not want to use BULK INSERT because I have had a lot of inconsistant
>problems with that functionality in the past.
>Does anyone have any ideas?
>John Wycoff|||Use DTS. If the file is 'space' delimited, or is fixed position, DTS can
handle the import. You can create a DTS 'Package' (the set of instructions),
and then schedule that Package to run when appropriate.
--
Arnie Rowland
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
"John Wycoff" <John Wycoff@.discussions.microsoft.com> wrote in message
news:170BB6CA-D3E7-4BEA-A336-390BF6A3DF9E@.microsoft.com...
> I am trying to find a way to do a programatic import of a space delimited
> file into a SQL Server 2000 database.
> The file is actually an IIS web log file. I can run through the file and
> strip out the header information, I can even create a seperate file for
> each
> change in header information is needed.
> The problem becomes importing that file into the database. The log files
> are
> on average 6MB each. The import will need to run daily on just a single
> log
> file (after previous log files have been imported)
> I do not want to use BULK INSERT because I have had a lot of inconsistant
> problems with that functionality in the past.
> Does anyone have any ideas?
> John Wycoff|||The problem is that I do not know what the filenames will be. And the formats
will be different. The closest I can get is to run through the log files
generating a seperate log file for every different format. But I cannot
programattically change the DTS package everytime, nor can I tell the DTS
package to import every file in a specific directory.|||On Tue, 25 Jul 2006 06:08:02 -0700, John Wycoff
<JohnWycoff@.discussions.microsoft.com> wrote:
>The problem is that I do not know what the filenames will be. And the formats
>will be different. The closest I can get is to run through the log files
>generating a seperate log file for every different format. But I cannot
>programattically change the DTS package everytime, nor can I tell the DTS
>package to import every file in a specific directory.
I am still pretty unclear about what the files look like. How many
different tables is the data being loaded into? Do the headers have
any data you need? Is it one header per file? Or a header, followed
by several items, then another header and more items?
It IS possible to get DTS to import every file in a folder. There is
VBA coding involved.
Roy Harvey
Beacon Falls, CT

Programatic Import (Space delimited) import into SQL Server 2000

I am trying to find a way to do a programatic import of a space delimited
file into a SQL Server 2000 database.
The file is actually an IIS web log file. I can run through the file and
strip out the header information, I can even create a seperate file for each
change in header information is needed.
The problem becomes importing that file into the database. The log files are
on average 6MB each. The import will need to run daily on just a single log
file (after previous log files have been imported)
I do not want to use BULK INSERT because I have had a lot of inconsistant
problems with that functionality in the past.
Does anyone have any ideas?
John WycoffI would start with the DTS data import wizard. You can specify a text
file as input, and space as the column delimiter, and the package it
generates can be saved and modified later. It does assume that all
the rows are in the same format.
Roy Harvey
Beacon Falls, CT
On Thu, 20 Jul 2006 07:15:01 -0700, John Wycoff <John
Wycoff@.discussions.microsoft.com> wrote:

>I am trying to find a way to do a programatic import of a space delimited
>file into a SQL Server 2000 database.
>The file is actually an IIS web log file. I can run through the file and
>strip out the header information, I can even create a seperate file for eac
h
>change in header information is needed.
>The problem becomes importing that file into the database. The log files ar
e
>on average 6MB each. The import will need to run daily on just a single log
>file (after previous log files have been imported)
>I do not want to use BULK INSERT because I have had a lot of inconsistant
>problems with that functionality in the past.
>Does anyone have any ideas?
>John Wycoff|||Use DTS. If the file is 'space' delimited, or is fixed position, DTS can
handle the import. You can create a DTS 'Package' (the set of instructions),
and then schedule that Package to run when appropriate.
Arnie Rowland
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
"John Wycoff" <John Wycoff@.discussions.microsoft.com> wrote in message
news:170BB6CA-D3E7-4BEA-A336-390BF6A3DF9E@.microsoft.com...
> I am trying to find a way to do a programatic import of a space delimited
> file into a SQL Server 2000 database.
> The file is actually an IIS web log file. I can run through the file and
> strip out the header information, I can even create a seperate file for
> each
> change in header information is needed.
> The problem becomes importing that file into the database. The log files
> are
> on average 6MB each. The import will need to run daily on just a single
> log
> file (after previous log files have been imported)
> I do not want to use BULK INSERT because I have had a lot of inconsistant
> problems with that functionality in the past.
> Does anyone have any ideas?
> John Wycoff