Friday, March 30, 2012
Pros and cons of reindexing
Should we reindex periodically our database? If yes at what frequency? This
will help for performance?
Second question after the reindexing the transactions log have 5 Gig. After
a backup should we shrink the log? This will help performance?
Thank for your help
Dany"Dany Marois" <dany.marois@.videotron.ca> wrote in message
news:uBGRsL9BEHA.3404@.TK2MSFTNGP10.phx.gbl...
> Hi we have a debate here,
> Should we reindex periodically our database?
yes it will because reindexing will defragment the database. As for
frequency, depends on the database. my PeopleSoft db takes 19 hours to
reindex so I reserve weekends for this chore but I do it every week
If yes at what frequency? This
> will help for performance?
>
> Second question after the reindexing the transactions log have 5 Gig.
After
> a backup should we shrink the log? This will help performance?
>
not much but it will save space ...:-)
> Thank for your help
> Dany
>
Neil MacMurchy
"you'd do what, to who for how many biscuits?"|||> Should we reindex periodically our database?
If you need it, i.e., it helps performance, then yes.
> If yes at what frequency?
It depends on the level of fragmentation occurs. I.e., volume of data, the
pattern of your modifications and index layouts and stuff like that.
> This
> will help for performance?
Possibly, but again it depends. You can use DBCC SHOWCONTIG to check the
fragmentation level. And you can time your queries between going against
fragmented data and non-fragmented data to determine how much defrag will
improve performance. Mileage does vary.
> Second question after the reindexing the transactions log have 5 Gig.
After
> a backup should we shrink the log? This will help performance?
Why would you want to shrink it? It will only grow to that size as the users
do modifications and the file need to grow. I.e., shrinking the file will
hurt performance.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"Dany Marois" <dany.marois@.videotron.ca> wrote in message
news:uBGRsL9BEHA.3404@.TK2MSFTNGP10.phx.gbl...
> Hi we have a debate here,
> Should we reindex periodically our database? If yes at what frequency?
This
> will help for performance?
> Second question after the reindexing the transactions log have 5 Gig.
After
> a backup should we shrink the log? This will help performance?
> Thank for your help
> Dany
>|||Read this whitepaper which will answer all of your questions:
http://www.microsoft.com/technet/tr...ze/ss2kidbp.asp
Paul Randal
Dev Lead, Microsoft SQL Server Storage Engine
This posting is provided "AS IS" with no warranties, and confers no rights.
"Dany Marois" <dany.marois@.videotron.ca> wrote in message
news:uBGRsL9BEHA.3404@.TK2MSFTNGP10.phx.gbl...
> Hi we have a debate here,
> Should we reindex periodically our database? If yes at what frequency?
This
> will help for performance?
> Second question after the reindexing the transactions log have 5 Gig.
After
> a backup should we shrink the log? This will help performance?
> Thank for your help
> Dany
>
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 <<