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

Wednesday, March 28, 2012

Iterating updated fields within a Trigger

Hi,

I want to log updates to specific fields, storing the new and old
values. Is there any way I can iterate the collection of updated
fields within a trigger in order accomplish this?
Thanks in advance,

Julie Vazquezjv (julie_vazquez@.hotmail.com) writes:
> I want to log updates to specific fields, storing the new and old
> values. Is there any way I can iterate the collection of updated
> fields within a trigger in order accomplish this?

Not in a way that I would call painless. You could use something
with dynamic SQL, but that would come with a performance cost, and
you really don't want to spend to much time in triggers, since you
are in a transaction. You can easliy get into locking issues.

It is better - although boring - to type the SQL for each column to
log. Writing a program that generates the trigger code could be an
option to save time.

If you are in for massive auditing, consider using a third-party
product. A trigger-based solution is SQLAudit from Red Matrix.
Lumigent offers Entegra which works from the transaction log.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||Do you know if there is away I could iterate through a table and get
all the field names? That would also be a great help.

Thanks.|||On 17 Jan 2005 17:02:45 -0800, jv wrote:

>Do you know if there is away I could iterate through a table and get
>all the field names? That would also be a great help.
>Thanks.

Hi jv,

Check out the INFORMATION_SCHEMA.COLUMNS view.

Best, Hugo
--

(Remove _NO_ and _SPAM_ to get my e-mail address)|||jv (julie_vazquez@.hotmail.com) writes:
> Do you know if there is away I could iterate through a table and get
> all the field names? That would also be a great help.

Yes. But don't do it. If you are going roll your own, write code for
each column.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp

Friday, March 23, 2012

it is save to reindex table system ?

Hi friends,
Is it save to reindex (dbcc reindex) table system in db
master, msdb, model ?
Can we truncate datafile & log in tempdb ?
How to determine size of db in tempdb ?
Please advice.
Thanks.> Is it save to reindex (dbcc reindex) table system in db
> master, msdb, model ?
I wouldn't recommend this unless you have a very good backup in place. Why
do you think you need to reindex these tables?
> Can we truncate datafile & log in tempdb ?
Sure, see http://www.aspfaq.com/2446
> How to determine size of db in tempdb ?
Using Query Analyzer:
USE tempdb
GO
EXEC sp_spaceused|||Not only that but DBCC DBREINDEX does not allow system tables to be
reindexed (in SQL Server 2000)
--
Paul Randal
DBCC Technical Lead, Microsoft SQL Server Storage Engine
This posting is provided "AS IS" with no warranties, and confers no rights.
"Aaron Bertrand [MVP]" <aaron@.TRASHaspfaq.com> wrote in message
news:e1bDwGooDHA.1096@.TK2MSFTNGP11.phx.gbl...
> > Is it save to reindex (dbcc reindex) table system in db
> > master, msdb, model ?
> I wouldn't recommend this unless you have a very good backup in place.
Why
> do you think you need to reindex these tables?
> > Can we truncate datafile & log in tempdb ?
> Sure, see http://www.aspfaq.com/2446
> > How to determine size of db in tempdb ?
> Using Query Analyzer:
> USE tempdb
> GO
> EXEC sp_spaceused
>|||But I found , they are fragmented, this is one of them in
master db:
DBCC SHOWCONTIG scanning 'sysaltfiles' table...
Table: 'sysaltfiles' (94); index ID: 1, database ID: 1
TABLE level scan performed.
- Pages Scanned........................: 8
- Extents Scanned.......................: 5
- Extent Switches.......................: 4
- Avg. Pages per Extent..................: 1.6
- Scan Density [Best Count:Actual Count]......: 20.00%
[1:5]
- Logical Scan Fragmentation ..............: 25.00%
- Extent Scan Fragmentation ...............: 80.00%
- Avg. Bytes Free per Page................: 4760.0
- Avg. Page Density (full)................: 41.19%
If we cannot use reindex (dbcc reindex), can we defrag it
with dbcc defrag ? or just leave it as it is.
Thanks.
>--Original Message--
>Not only that but DBCC DBREINDEX does not allow system
tables to be
>reindexed (in SQL Server 2000)
>--
>Paul Randal
>DBCC Technical Lead, Microsoft SQL Server Storage Engine
>This posting is provided "AS IS" with no warranties, and
confers no rights.
>"Aaron Bertrand [MVP]" <aaron@.TRASHaspfaq.com> wrote in
message
>news:e1bDwGooDHA.1096@.TK2MSFTNGP11.phx.gbl...
>> > Is it save to reindex (dbcc reindex) table system in
db
>> > master, msdb, model ?
>> I wouldn't recommend this unless you have a very good
backup in place.
>Why
>> do you think you need to reindex these tables?
>> > Can we truncate datafile & log in tempdb ?
>> Sure, see http://www.aspfaq.com/2446
>> > How to determine size of db in tempdb ?
>> Using Query Analyzer:
>> USE tempdb
>> GO
>> EXEC sp_spaceused
>>
>
>.
>|||There are only 8 pages in this table. You shouldn't worry about
fragmentation until you get several dozen pages at least.
--
HTH
--
Kalen Delaney
SQL Server MVP
www.SolidQualityLearning.com
"kresna rudy kurniawan" <anonymous@.discussions.microsoft.com> wrote in
message news:096c01c3a28a$d412bc10$a401280a@.phx.gbl...
> But I found , they are fragmented, this is one of them in
> master db:
> DBCC SHOWCONTIG scanning 'sysaltfiles' table...
> Table: 'sysaltfiles' (94); index ID: 1, database ID: 1
> TABLE level scan performed.
> - Pages Scanned........................: 8
> - Extents Scanned.......................: 5
> - Extent Switches.......................: 4
> - Avg. Pages per Extent..................: 1.6
> - Scan Density [Best Count:Actual Count]......: 20.00%
> [1:5]
> - Logical Scan Fragmentation ..............: 25.00%
> - Extent Scan Fragmentation ...............: 80.00%
> - Avg. Bytes Free per Page................: 4760.0
> - Avg. Page Density (full)................: 41.19%
> If we cannot use reindex (dbcc reindex), can we defrag it
> with dbcc defrag ? or just leave it as it is.
> Thanks.
>
> >--Original Message--
> >Not only that but DBCC DBREINDEX does not allow system
> tables to be
> >reindexed (in SQL Server 2000)
> >
> >--
> >Paul Randal
> >DBCC Technical Lead, Microsoft SQL Server Storage Engine
> >
> >This posting is provided "AS IS" with no warranties, and
> confers no rights.
> >
> >"Aaron Bertrand [MVP]" <aaron@.TRASHaspfaq.com> wrote in
> message
> >news:e1bDwGooDHA.1096@.TK2MSFTNGP11.phx.gbl...
> >> > Is it save to reindex (dbcc reindex) table system in
> db
> >> > master, msdb, model ?
> >>
> >> I wouldn't recommend this unless you have a very good
> backup in place.
> >Why
> >> do you think you need to reindex these tables?
> >>
> >> > Can we truncate datafile & log in tempdb ?
> >>
> >> Sure, see http://www.aspfaq.com/2446
> >>
> >> > How to determine size of db in tempdb ?
> >>
> >> Using Query Analyzer:
> >>
> >> USE tempdb
> >> GO
> >> EXEC sp_spaceused
> >>
> >>
> >
> >
> >.
> >sql

Issues with Transaction Log backups

I'm pretty new to SQL, and am running into a problem. I had setup a
Maintenance plan on one of my databases and the Transaction Log Backups are
not working. I'm not getting any feedback in the error on why they are not
working. This is the error that I get:
JOB RUN: 'Transaction Log Backup Job for DB Maintenance Plan 'CRMDEV DB
Maintenance Plan'' was run on 9/7/2006 at 5:30:00 PM
DURATION: 0 hours, 0 minutes, 0 seconds
STATUS: Failed
MESSAGES: The job failed. The Job was invoked by Schedule 2 (Schedule 1).
The last step to run was step 1 (Step 1).
Does anyone know what could be causing the error? I first thought it was
because of the account assigned to run the job, so I switched it from the
administrator to the SA account. But, still fails. Any suggestions on what
could be going on would be appreciated...My daily backups configured in the
Maintenance plan of the database are working though.
Thank you, Sara
Thanks!Saral6978 wrote:
> I'm pretty new to SQL, and am running into a problem. I had setup a
> Maintenance plan on one of my databases and the Transaction Log Backups are
> not working. I'm not getting any feedback in the error on why they are not
> working. This is the error that I get:
> JOB RUN: 'Transaction Log Backup Job for DB Maintenance Plan 'CRMDEV DB
> Maintenance Plan'' was run on 9/7/2006 at 5:30:00 PM
> DURATION: 0 hours, 0 minutes, 0 seconds
> STATUS: Failed
> MESSAGES: The job failed. The Job was invoked by Schedule 2 (Schedule 1).
> The last step to run was step 1 (Step 1).
> Does anyone know what could be causing the error? I first thought it was
> because of the account assigned to run the job, so I switched it from the
> administrator to the SA account. But, still fails. Any suggestions on what
> could be going on would be appreciated...My daily backups configured in the
> Maintenance plan of the database are working though.
> Thank you, Sara
> Thanks!
>
>
Are you possibly trying to do a transaction log backup on a database
that is in Simple recovery mode?
Tracy McKibben
MCDBA
http://www.realsqlguy.com|||I guess I'm not sure...how would I know that?
"Tracy McKibben" wrote:
> Saral6978 wrote:
> > I'm pretty new to SQL, and am running into a problem. I had setup a
> > Maintenance plan on one of my databases and the Transaction Log Backups are
> > not working. I'm not getting any feedback in the error on why they are not
> > working. This is the error that I get:
> >
> > JOB RUN: 'Transaction Log Backup Job for DB Maintenance Plan 'CRMDEV DB
> > Maintenance Plan'' was run on 9/7/2006 at 5:30:00 PM
> > DURATION: 0 hours, 0 minutes, 0 seconds
> > STATUS: Failed
> > MESSAGES: The job failed. The Job was invoked by Schedule 2 (Schedule 1).
> > The last step to run was step 1 (Step 1).
> >
> > Does anyone know what could be causing the error? I first thought it was
> > because of the account assigned to run the job, so I switched it from the
> > administrator to the SA account. But, still fails. Any suggestions on what
> > could be going on would be appreciated...My daily backups configured in the
> > Maintenance plan of the database are working though.
> >
> > Thank you, Sara
> >
> > Thanks!
> >
> >
> >
> Are you possibly trying to do a transaction log backup on a database
> that is in Simple recovery mode?
>
> --
> Tracy McKibben
> MCDBA
> http://www.realsqlguy.com
>|||Saral6978 wrote:
> I guess I'm not sure...how would I know that?
>
Check the database properties of each database you're attempting to back
up. If the recovery model is "Simple", you can't (nor do you need to)
run a transaction log backup against that database. Consult Books
Online to learn what the various recovery models (Simple, Full,
Bulk-Logged) mean and what they offer.
--
Tracy McKibben
MCDBA
http://www.realsqlguy.com|||Thank you, Tracy. The recovery model IS Simple...I will be taking a 2day
course on SQL in the next month, so I'm sure that will help too. Thank you
so much for your input.
"Tracy McKibben" wrote:
> Saral6978 wrote:
> > I guess I'm not sure...how would I know that?
> >
> Check the database properties of each database you're attempting to back
> up. If the recovery model is "Simple", you can't (nor do you need to)
> run a transaction log backup against that database. Consult Books
> Online to learn what the various recovery models (Simple, Full,
> Bulk-Logged) mean and what they offer.
> --
> Tracy McKibben
> MCDBA
> http://www.realsqlguy.com
>|||Saral6978 wrote:
> Thank you, Tracy. The recovery model IS Simple...I will be taking a 2day
> course on SQL in the next month, so I'm sure that will help too. Thank you
> so much for your input.
>
No problem. I won't go into my rant about the maintenance plan wizards
allowing you to do this to yourself... After you finish your course,
you should learn how to write your own maintenance scripts without
relying on those wizards.
Tracy McKibben
MCDBA
http://www.realsqlguy.com|||Aww, c'mon Tracy. We love your rants. ;)
To the poster, I found that the SQL Server Unleashed book is invaluable
as a resource. I picked it up on Ebay for under $30 and I use it
nearly every day.
Tracy McKibben wrote:
> Saral6978 wrote:
> > Thank you, Tracy. The recovery model IS Simple...I will be taking a 2day
> > course on SQL in the next month, so I'm sure that will help too. Thank you
> > so much for your input.
> >
> No problem. I won't go into my rant about the maintenance plan wizards
> allowing you to do this to yourself... After you finish your course,
> you should learn how to write your own maintenance scripts without
> relying on those wizards.
>
> --
> Tracy McKibben
> MCDBA
> http://www.realsqlguy.com

Issues with Transaction Log backups

I'm pretty new to SQL, and am running into a problem. I had setup a
Maintenance plan on one of my databases and the Transaction Log Backups are
not working. I'm not getting any feedback in the error on why they are not
working. This is the error that I get:
JOB RUN: 'Transaction Log Backup Job for DB Maintenance Plan 'CRMDEV DB
Maintenance Plan'' was run on 9/7/2006 at 5:30:00 PM
DURATION: 0 hours, 0 minutes, 0 seconds
STATUS: Failed
MESSAGES: The job failed. The Job was invoked by Schedule 2 (Schedule 1).
The last step to run was step 1 (Step 1).
Does anyone know what could be causing the error? I first thought it was
because of the account assigned to run the job, so I switched it from the
administrator to the SA account. But, still fails. Any suggestions on what
could be going on would be appreciated...My daily backups configured in the
Maintenance plan of the database are working though.
Thank you, Sara
Thanks!Saral6978 wrote:
> I'm pretty new to SQL, and am running into a problem. I had setup a
> Maintenance plan on one of my databases and the Transaction Log Backups ar
e
> not working. I'm not getting any feedback in the error on why they are no
t
> working. This is the error that I get:
> JOB RUN: 'Transaction Log Backup Job for DB Maintenance Plan 'CRMDEV DB
> Maintenance Plan'' was run on 9/7/2006 at 5:30:00 PM
> DURATION: 0 hours, 0 minutes, 0 seconds
> STATUS: Failed
> MESSAGES: The job failed. The Job was invoked by Schedule 2 (Schedule 1).
> The last step to run was step 1 (Step 1).
> Does anyone know what could be causing the error? I first thought it was
> because of the account assigned to run the job, so I switched it from the
> administrator to the SA account. But, still fails. Any suggestions on wh
at
> could be going on would be appreciated...My daily backups configured in th
e
> Maintenance plan of the database are working though.
> Thank you, Sara
> Thanks!
>
>
Are you possibly trying to do a transaction log backup on a database
that is in Simple recovery mode?
Tracy McKibben
MCDBA
http://www.realsqlguy.com|||I guess I'm not sure...how would I know that?
"Tracy McKibben" wrote:

> Saral6978 wrote:
> Are you possibly trying to do a transaction log backup on a database
> that is in Simple recovery mode?
>
> --
> Tracy McKibben
> MCDBA
> http://www.realsqlguy.com
>|||Saral6978 wrote:
> I guess I'm not sure...how would I know that?
>
Check the database properties of each database you're attempting to back
up. If the recovery model is "Simple", you can't (nor do you need to)
run a transaction log backup against that database. Consult Books
Online to learn what the various recovery models (Simple, Full,
Bulk-Logged) mean and what they offer.
Tracy McKibben
MCDBA
http://www.realsqlguy.com|||Thank you, Tracy. The recovery model IS Simple...I will be taking a 2day
course on SQL in the next month, so I'm sure that will help too. Thank you
so much for your input.
"Tracy McKibben" wrote:

> Saral6978 wrote:
> Check the database properties of each database you're attempting to back
> up. If the recovery model is "Simple", you can't (nor do you need to)
> run a transaction log backup against that database. Consult Books
> Online to learn what the various recovery models (Simple, Full,
> Bulk-Logged) mean and what they offer.
> --
> Tracy McKibben
> MCDBA
> http://www.realsqlguy.com
>|||Saral6978 wrote:
> Thank you, Tracy. The recovery model IS Simple...I will be taking a 2day
> course on SQL in the next month, so I'm sure that will help too. Thank yo
u
> so much for your input.
>
No problem. I won't go into my rant about the maintenance plan wizards
allowing you to do this to yourself... After you finish your course,
you should learn how to write your own maintenance scripts without
relying on those wizards.
Tracy McKibben
MCDBA
http://www.realsqlguy.com|||Aww, c'mon Tracy. We love your rants. ;)
To the poster, I found that the SQL Server Unleashed book is invaluable
as a resource. I picked it up on Ebay for under $30 and I use it
nearly every day.
Tracy McKibben wrote:
> Saral6978 wrote:
> No problem. I won't go into my rant about the maintenance plan wizards
> allowing you to do this to yourself... After you finish your course,
> you should learn how to write your own maintenance scripts without
> relying on those wizards.
>
> --
> Tracy McKibben
> MCDBA
> http://www.realsqlguy.com

Wednesday, March 21, 2012

Issues With SQL 2005 Encryption

Has anyone had any expierences with encryption and log shipping/database mirroring.

I think you should always create a symetric key with a passphrase so it can be recovered, but that does really help here. If you use a password to open the key versus a certificate I think database mirroring wouldn't have an effect. However, I think certificates are nicer since you don't have to worry about having a password being passed around. If using a certificate it seems like you would have do some work once the mirroed database was brought online.

Hey twiggy, I split this into a separate thread so it didn't get buried as part of the other thread.

(sorry, I'm not sure what the answer to your question is)

Sung

|||

Twiggy, you also posted this question on my blog. I answered it there. Here's a link to the post:

http://blogs.msdn.com/lcris/archive/2005/10/14/481434.aspx

Please post your questions in a single place.

Thanks
Laurentiu

Monday, March 19, 2012

Issues upgrading MSDE to SP4

Hello I'm having some issues upgrading MSDE sp3 to MSDE sp4. I don't
see anything in the log file of any importance, no return value 3 just
an occasional 2 which is interesting because I'm not canceling. The
only error I can find is in the application log:
Event Type:Warning
Event Source:MsiInstaller
Event Category:None
Event ID:1015
Date:6/14/2005
Time:1:41:48 PM
User:domain\user
Computer:servername
Description:
Failed to connect to server. Error: 0x800401F0
I am part of the system administrators role so should be able to
contact the database. I did stop all of the services prior to
beginning the install so that I would not have to reboot in order for
the upgrade to go through. This is a production machine and I can't
afford downtime nor any reboots.
Thanks in advance for your help.
Also this is not a named instance and I have already attempted to use
the proper MSP file to accomodate the upgrade.
|||hi,
Kewlhand wrote:
> Hello I'm having some issues upgrading MSDE sp3 to MSDE sp4. I don't
> see anything in the log file of any importance, no return value 3 just
> an occasional 2 which is interesting because I'm not canceling. The
> only error I can find is in the application log:
> Event Type: Warning
> Event Source: MsiInstaller
> Event Category: None
> Event ID: 1015
> Date: 6/14/2005
> Time: 1:41:48 PM
> User: domain\user
> Computer: servername
> Description:
> Failed to connect to server. Error: 0x800401F0
> I am part of the system administrators role so should be able to
> contact the database. I did stop all of the services prior to
> beginning the install so that I would not have to reboot in order for
> the upgrade to go through. This is a production machine and I can't
> afford downtime nor any reboots.
> Thanks in advance for your help.
please have a look at http://tinyurl.com/bwrvv if helps
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.12.0 - DbaMgr ver 0.58.0
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply
|||none of those keys exist with those parameters. Thanks for the info
though. If you've got anything else I'd love to hear it.
Thanks.
Kewlhand
|||I too am experiencing this issue. I've found that on two systems
running XP SP2 that I can connect to the SQL server using SQLDMO, but
not using Enterprise Manager over a remote TCP/IP connection.
I also am seeing this on both systems' Application Event Logs when MSDE
starts:
SuperSocket info: ConnectionListen(Shared-Memory (LPC)) : Error 5.
and
SuperSocket info: (SpnRegister) : Error 1355.
Both systems report the same MSDE version:
Microsoft SQL Server 2000 - 8.00.760 (Intel X86)
Dec 17 2002 14:22:05
Copyright (c) 1988-2003 Microsoft Corporation
Desktop Engine on Windows NT 5.1 (Build 2600: Service Pack 2)
I'm pressed for time, so I'll be backing up data and reinstalling MSDE
then SP4 on the two machines, but any tips for the future would be
greatly appreciated.
Kind regards,
Jordan.
Kewlhand wrote:
> none of those keys exist with those parameters. Thanks for the info
> though. If you've got anything else I'd love to hear it.
> Thanks.
> Kewlhand

Issues Minimizing Size of LDF Transaction Log on SQL Server 2000

Greetings,
I'm trying to minimize my 40gb .ldf transaction log. First, I tried shrinking just the transaction log by using both the Shrink Database > Files method and by scripting (DBCC SHRINKFILE) and while the transaction log seemed to go down quite a bit according to the Enterprise Manager statistics, the LDF sitting in our Program Files folder remains at about 37gb.
I then read somewhere that backing up the transaction log can also aid in minimizing its size but this has yet to make any kind of a difference. In addition, I'm also seeing here on the newsgroup that converting the database to simple recovery mode can help keep the LDF to a good size but, according to MS documentation, "there are limitations placed on the recoverability of a database if this recovery model is used." That sounds a little too eerie to me as this particular DB is quite crucial to our operation. Does anyone have any tricks to get a nearly 40gb LDF down to a decent size?
Thanks in advance for any and al information!
- J
The first and most important thing is that you understand what the
transaction log is for and how to use it for backup and recovery purposes.
It seems obvious from several things you have said that you need to do some
reading. Please study the backup and recovery topics in Books Online and
review your backup and recovery strategy before deciding how to proceed.
If you are running under full recovery then you need to make sure your
transaction log is large enough to accommodate all transactions between each
log backup. The correct size for the transaction log will therefore be
determined by how many updates your database has and how often you do
backups. Note that backing up the log will not reduce its size but it will
allow SQL Server to re-use that space. On the information given therefore
there is no reason to believe you need do anything immediately. What makes
you want to reduce the size of the log?
David Portas
|||Dear Jason,
Thank you for posting here.
Before running the DBCC SHRINKFILE to shrink the Transaction Log, we must
first run a BACKUP LOG statement to backup the current Transaction Log. As
mentioned by David, although backing up the log will not directly reduce
its size, it removes the inactive portion of the log and then "DBCC
SHRINKFILE" command will be able to free these spaces. For your reference,
the following actions are required to complete the shrinking of the
transaction log:
1. You must run a BACKUP LOG statement to free up space by removing the
inactive portion of the log.
2. You must run DBCC SHRINKFILE again with the desired target size until
the log file shrinks to the target size.
Below is the related KB article:
INF: Shrinking the Transaction Log in SQL Server 2000 with DBCC SHRINKFILE
http://support.microsoft.com/kb/272318
Additionally, although Simple Recovery mode can keep the LDF file to a
smaller size, there are some limitation s exist. For example, we are unable
to recover to a specific point in time and can only recover to the end of a
backup. This recovery mode is NOT recommended for the database in the
production environment. You can refer to the SQL Server Book Online about
this topic (http://msdn2.microsoft.com/en-us/library/ms189275.aspx)
Hope it helps.
Have a nice day!
Best regards,
Adams Qu, MCSE, MCDBA, MCTS
Microsoft Online Support
Microsoft Global Technical Support Center
Get Secure! - www.microsoft.com/security
================================================== ===
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
================================================== ===
This posting is provided "AS IS" with no warranties, and confers no rights.
| From: "Jason H." <cupahr@.community.nospam>
| Subject: Issues Minimizing Size of LDF Transaction Log on SQL Server 2000
| Date: Thu, 13 Mar 2008 15:10:51 -0400
| Lines: 69
| Organization: CUPA-HR
| Message-ID: <CB7EEA2C-2E49-43E1-9491-E4082D529223@.microsoft.com>
| MIME-Version: 1.0
| Content-Type: multipart/alternative;
| boundary="--=_NextPart_000_0028_01C8851C.6D2EC7E0"
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Windows Mail 6.0.6000.16480
| X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6000.16545
| X-MS-CommunityGroup-PostID: {CB7EEA2C-2E49-43E1-9491-E4082D529223}
| X-MS-CommunityGroup-MessageCategory:
{E4FCE0A9-75B4-4168-BFF9-16C22D8747EC}
| Newsgroups: microsoft.public.sqlserver.server
| NNTP-Posting-Host: mail.cupahr.org 65.23.122.33
| Path: TK2MSFTNGHUB02.phx.gbl!TK2MSFTNGP01.phx.gbl!TK2MSF TNGP02.phx.gbl
| Xref: TK2MSFTNGHUB02.phx.gbl microsoft.public.sqlserver.server:38532
| X-Tomcat-NG: microsoft.public.sqlserver.server
|
| Greetings,
| I'm trying to minimize my 40gb .ldf transaction log. First, I tried
shrinking just the transaction log by using both the Shrink Database >
Files method and by scripting (DBCC SHRINKFILE) and while the transaction
log seemed to go down quite a bit according to the Enterprise Manager
statistics, the LDF sitting in our Program Files folder remains at about
37gb.
| I then read somewhere that backing up the transaction log can also aid in
minimizing its size but this has yet to make any kind of a difference. In
addition, I'm also seeing here on the newsgroup that converting the
database to simple recovery mode can help keep the LDF to a good size but,
according to MS documentation, "there are limitations placed on the
recoverability of a database if this recovery model is used." That sounds
a little too eerie to me as this particular DB is quite crucial to our
operation. Does anyone have any tricks to get a nearly 40gb LDF down to a
decent size?
| Thanks in advance for any and al information!
| - J
|
|||Dear Jason,
We wanted to see if the information provided was helpful. Please keep us
posted on your progress and let us know if you have any additional
questions or concerns.
We are looking forward to your response.
Have a nice day!
Best regards,
Adams Qu, MCSE, MCDBA, MCTS
Microsoft Online Support
Microsoft Global Technical Support Center
Get Secure! - www.microsoft.com/security
================================================== ===
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
================================================== ===
This posting is provided "AS IS" with no warranties, and confers no rights.
| X-Tomcat-ID: 89922039
| References: <CB7EEA2C-2E49-43E1-9491-E4082D529223@.microsoft.com>
| MIME-Version: 1.0
| Content-Type: text/plain
| Content-Transfer-Encoding: 7bit
| From: v-adamqu@.online.microsoft.com (Adams Qu [MSFT])
| Organization: Microsoft
| Date: Fri, 14 Mar 2008 09:46:48 GMT
| Subject: RE: Issues Minimizing Size of LDF Transaction Log on SQL Server
2000
| X-Tomcat-NG: microsoft.public.sqlserver.server
| Message-ID: <LixsThbhIHA.360@.TK2MSFTNGHUB02.phx.gbl>
| Newsgroups: microsoft.public.sqlserver.server
| Lines: 99
| Path: TK2MSFTNGHUB02.phx.gbl
| Xref: TK2MSFTNGHUB02.phx.gbl microsoft.public.sqlserver.server:38573
| NNTP-Posting-Host: tk5tomimport2.phx.gbl 10.201.218.20
|
| Dear Jason,
|
| Thank you for posting here.
|
| Before running the DBCC SHRINKFILE to shrink the Transaction Log, we must
| first run a BACKUP LOG statement to backup the current Transaction Log.
As
| mentioned by David, although backing up the log will not directly reduce
| its size, it removes the inactive portion of the log and then "DBCC
| SHRINKFILE" command will be able to free these spaces. For your
reference,
| the following actions are required to complete the shrinking of the
| transaction log:
|
| 1. You must run a BACKUP LOG statement to free up space by removing the
| inactive portion of the log.
| 2. You must run DBCC SHRINKFILE again with the desired target size until
| the log file shrinks to the target size.
|
| Below is the related KB article:
|
| INF: Shrinking the Transaction Log in SQL Server 2000 with DBCC SHRINKFILE
| http://support.microsoft.com/kb/272318
|
| Additionally, although Simple Recovery mode can keep the LDF file to a
| smaller size, there are some limitation s exist. For example, we are
unable
| to recover to a specific point in time and can only recover to the end of
a
| backup. This recovery mode is NOT recommended for the database in the
| production environment. You can refer to the SQL Server Book Online about
| this topic (http://msdn2.microsoft.com/en-us/library/ms189275.aspx)
|
| Hope it helps.
|
| Have a nice day!
|
| Best regards,
|
| Adams Qu, MCSE, MCDBA, MCTS
| Microsoft Online Support
|
| Microsoft Global Technical Support Center
|
| Get Secure! - www.microsoft.com/security
| ================================================== ===
| When responding to posts, please "Reply to Group" via your newsreader so
| that others may learn and benefit from your issue.
| ================================================== ===
| This posting is provided "AS IS" with no warranties, and confers no
rights.
|
| --
| | From: "Jason H." <cupahr@.community.nospam>
| | Subject: Issues Minimizing Size of LDF Transaction Log on SQL Server
2000
| | Date: Thu, 13 Mar 2008 15:10:51 -0400
| | Lines: 69
| | Organization: CUPA-HR
| | Message-ID: <CB7EEA2C-2E49-43E1-9491-E4082D529223@.microsoft.com>
| | MIME-Version: 1.0
| | Content-Type: multipart/alternative;
| | boundary="--=_NextPart_000_0028_01C8851C.6D2EC7E0"
| | X-Priority: 3
| | X-MSMail-Priority: Normal
| | X-Newsreader: Microsoft Windows Mail 6.0.6000.16480
| | X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6000.16545
| | X-MS-CommunityGroup-PostID: {CB7EEA2C-2E49-43E1-9491-E4082D529223}
| | X-MS-CommunityGroup-MessageCategory:
| {E4FCE0A9-75B4-4168-BFF9-16C22D8747EC}
| | Newsgroups: microsoft.public.sqlserver.server
| | NNTP-Posting-Host: mail.cupahr.org 65.23.122.33
| | Path: TK2MSFTNGHUB02.phx.gbl!TK2MSFTNGP01.phx.gbl!TK2MSF TNGP02.phx.gbl
| | Xref: TK2MSFTNGHUB02.phx.gbl microsoft.public.sqlserver.server:38532
| | X-Tomcat-NG: microsoft.public.sqlserver.server
| |
| | Greetings,
| | I'm trying to minimize my 40gb .ldf transaction log. First, I tried
| shrinking just the transaction log by using both the Shrink Database >
| Files method and by scripting (DBCC SHRINKFILE) and while the transaction
| log seemed to go down quite a bit according to the Enterprise Manager
| statistics, the LDF sitting in our Program Files folder remains at about
| 37gb.
| | I then read somewhere that backing up the transaction log can also aid
in
| minimizing its size but this has yet to make any kind of a difference.
In
| addition, I'm also seeing here on the newsgroup that converting the
| database to simple recovery mode can help keep the LDF to a good size
but,
| according to MS documentation, "there are limitations placed on the
| recoverability of a database if this recovery model is used." That
sounds
| a little too eerie to me as this particular DB is quite crucial to our
| operation. Does anyone have any tricks to get a nearly 40gb LDF down to
a
| decent size?
| | Thanks in advance for any and al information!
| | - J
| |
|
|

Friday, March 9, 2012

issue with log shipping datetimes

nations_document_sts_20070917144501.trn

9-17 9:45:01 am

Has anybody else noticed this

Hi refer the below link,

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1773170&SiteID=1 log shipping in sql 2005 uses UTC time zone

Thanxx

Deepak Rangarajan

Wednesday, March 7, 2012

issue with history log settings

sql server 2000 sp3 -
this is very odd, we had a crash because the history log grew to big, and we
discovered it's not retaining the settings. the sql server agent, job
history log, if we check the options to clear the log set to 1000...
somewhere along the line that just mysteriously unchecks itself and the
history log just grews unabated. any advice?
David Bartosik - [MSFT MVP]
www.davidbartosik.comDavid,
Is it possible another DBA changed this setting in EM? I'm not aware of
this "automagically" changing. Perhaps SP4 would help. Until it is fixed
I'd recommend increasing the size of MSDB database (including monitoring
it's growth). You may also want to periodically perform:
SELECT COUNT(*) FROM MSDB..SYSJOBHISTORY
This can be automated with notification > value if needed.
HTH
Jerry
"David Bartosik [MSFT MVP]" <dbartosik@.community.nospam> wrote in messag
e
news:%23zJBKmPyFHA.3812@.TK2MSFTNGP09.phx.gbl...
> sql server 2000 sp3 -
> this is very odd, we had a crash because the history log grew to big, and
> we
> discovered it's not retaining the settings. the sql server agent, job
> history log, if we check the options to clear the log set to 1000...
> somewhere along the line that just mysteriously unchecks itself and the
> history log just grews unabated. any advice?
> David Bartosik - [MSFT MVP]
> www.davidbartosik.com
>|||Hello,
It sounds strange. You may need to make sure "Limit size of job history
log" option is checked. The "Maximum job history log size (rows)" option
specify the maximum job history log size, in rows. By default, it is 1000.
You may run sp_purge_jobhistory to purge jobhistory for a particular job.
Or you can run
DELETE FROM msdb.dbo.sysjobhistory
WHERE (job_id = @.job_id) and (run_date = @.run_date)
to delete job history.
I hope the information is helpful.
Sophie Guo
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
========================================
=============
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
========================================
=============
This posting is provided "AS IS" with no warranties, and confers no rights.

issue with history log settings

sql server 2000 sp3 -
this is very odd, we had a crash because the history log grew to big, and we
discovered it's not retaining the settings. the sql server agent, job
history log, if we check the options to clear the log set to 1000...
somewhere along the line that just mysteriously unchecks itself and the
history log just grews unabated. any advice?
David Bartosik - [MSFT MVP]
www.davidbartosik.com
David,
Is it possible another DBA changed this setting in EM? I'm not aware of
this "automagically" changing. Perhaps SP4 would help. Until it is fixed
I'd recommend increasing the size of MSDB database (including monitoring
it's growth). You may also want to periodically perform:
SELECT COUNT(*) FROM MSDB..SYSJOBHISTORY
This can be automated with notification > value if needed.
HTH
Jerry
"David Bartosik [MSFT MVP]" <dbartosik@.community.nospam> wrote in message
news:%23zJBKmPyFHA.3812@.TK2MSFTNGP09.phx.gbl...
> sql server 2000 sp3 -
> this is very odd, we had a crash because the history log grew to big, and
> we
> discovered it's not retaining the settings. the sql server agent, job
> history log, if we check the options to clear the log set to 1000...
> somewhere along the line that just mysteriously unchecks itself and the
> history log just grews unabated. any advice?
> David Bartosik - [MSFT MVP]
> www.davidbartosik.com
>
|||Hello,
It sounds strange. You may need to make sure "Limit size of job history
log" option is checked. The "Maximum job history log size (rows)" option
specify the maximum job history log size, in rows. By default, it is 1000.
You may run sp_purge_jobhistory to purge jobhistory for a particular job.
Or you can run
DELETE FROM msdb.dbo.sysjobhistory
WHERE (job_id = @.job_id) and (run_date = @.run_date)
to delete job history.
I hope the information is helpful.
Sophie Guo
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
================================================== ===
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
================================================== ===
This posting is provided "AS IS" with no warranties, and confers no rights.

issue with history log settings

sql server 2000 sp3 -
this is very odd, we had a crash because the history log grew to big, and we
discovered it's not retaining the settings. the sql server agent, job
history log, if we check the options to clear the log set to 1000...
somewhere along the line that just mysteriously unchecks itself and the
history log just grews unabated. any advice?
David Bartosik - [MSFT MVP]
www.davidbartosik.comDavid,
Is it possible another DBA changed this setting in EM? I'm not aware of
this "automagically" changing. Perhaps SP4 would help. Until it is fixed
I'd recommend increasing the size of MSDB database (including monitoring
it's growth). You may also want to periodically perform:
SELECT COUNT(*) FROM MSDB..SYSJOBHISTORY
This can be automated with notification > value if needed.
HTH
Jerry
"David Bartosik [MSFT MVP]" <dbartosik@.community.nospam> wrote in message
news:%23zJBKmPyFHA.3812@.TK2MSFTNGP09.phx.gbl...
> sql server 2000 sp3 -
> this is very odd, we had a crash because the history log grew to big, and
> we
> discovered it's not retaining the settings. the sql server agent, job
> history log, if we check the options to clear the log set to 1000...
> somewhere along the line that just mysteriously unchecks itself and the
> history log just grews unabated. any advice?
> David Bartosik - [MSFT MVP]
> www.davidbartosik.com
>|||Hello,
It sounds strange. You may need to make sure "Limit size of job history
log" option is checked. The "Maximum job history log size (rows)" option
specify the maximum job history log size, in rows. By default, it is 1000.
You may run sp_purge_jobhistory to purge jobhistory for a particular job.
Or you can run
DELETE FROM msdb.dbo.sysjobhistory
WHERE (job_id = @.job_id) and (run_date = @.run_date)
to delete job history.
I hope the information is helpful.
Sophie Guo
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
=====================================================When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
=====================================================This posting is provided "AS IS" with no warranties, and confers no rights.