[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Rupesh Mondal

3/22/2007 7:46:00 AM

Dear Friends

I am using sql 2000, i want to know the date time of the last record
inserted in the table.The table doesnt have a seperate column for
datetime.Please reply me as early as possible.

Rupesh Mondal
5 Answers

Tibor Karaszi

3/22/2007 7:57:00 AM

0

SQL Server doesn't keep track of that by itself. You have some options:

1. Have a profiler trace running from which you can get this info.

2. Keep track of this in a column in your table (for instance using a trigger)

3. Use some tool to mine for this from the transaction log. Assuming the log record is still in the
log, of course.

--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/d...
http://www.solidqualitylea...


"Rupesh Mondal" <RupeshMondal@discussions.microsoft.com> wrote in message
news:00389460-28BB-4094-BFF1-46800ED45129@microsoft.com...
> Dear Friends
>
> I am using sql 2000, i want to know the date time of the last record
> inserted in the table.The table doesnt have a seperate column for
> datetime.Please reply me as early as possible.
>
> Rupesh Mondal


masri999

3/22/2007 9:18:00 AM

0

On Mar 22, 12:46 pm, Rupesh Mondal
<RupeshMon...@discussions.microsoft.com> wrote:
> Dear Friends
>
> I am using sql 2000, i want to know the date time of the last record
> inserted in the table.The table doesnt have a seperate column for
> datetime.Please reply me as early as possible.
>
> Rupesh Mondal

You need create a column lastupdateddate with default getdate(). Then
select max(lastupdateddate ) column after insert

Rupesh Mondal

3/22/2007 10:40:00 AM

0

then how to extract information from the transaction log

Rupesh

"Tibor Karaszi" wrote:

> SQL Server doesn't keep track of that by itself. You have some options:
>
> 1. Have a profiler trace running from which you can get this info.
>
> 2. Keep track of this in a column in your table (for instance using a trigger)
>
> 3. Use some tool to mine for this from the transaction log. Assuming the log record is still in the
> log, of course.
>
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/d...
> http://www.solidqualitylea...
>
>
> "Rupesh Mondal" <RupeshMondal@discussions.microsoft.com> wrote in message
> news:00389460-28BB-4094-BFF1-46800ED45129@microsoft.com...
> > Dear Friends
> >
> > I am using sql 2000, i want to know the date time of the last record
> > inserted in the table.The table doesnt have a seperate column for
> > datetime.Please reply me as early as possible.
> >
> > Rupesh Mondal
>
>
>

Tibor Karaszi

3/22/2007 12:06:00 PM

0

You need to use some of the 3:rd party products available on the market. I've listed some on below
web-site:

http://www.karaszi.com/SQLServer...

--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/d...
http://www.solidqualitylea...


"Rupesh Mondal" <RupeshMondal@discussions.microsoft.com> wrote in message
news:98DCCE60-095D-4529-AFC7-A490B8C75FDE@microsoft.com...
> then how to extract information from the transaction log
>
> Rupesh
>
> "Tibor Karaszi" wrote:
>
>> SQL Server doesn't keep track of that by itself. You have some options:
>>
>> 1. Have a profiler trace running from which you can get this info.
>>
>> 2. Keep track of this in a column in your table (for instance using a trigger)
>>
>> 3. Use some tool to mine for this from the transaction log. Assuming the log record is still in
>> the
>> log, of course.
>>
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/d...
>> http://www.solidqualitylea...
>>
>>
>> "Rupesh Mondal" <RupeshMondal@discussions.microsoft.com> wrote in message
>> news:00389460-28BB-4094-BFF1-46800ED45129@microsoft.com...
>> > Dear Friends
>> >
>> > I am using sql 2000, i want to know the date time of the last record
>> > inserted in the table.The table doesnt have a seperate column for
>> > datetime.Please reply me as early as possible.
>> >
>> > Rupesh Mondal
>>
>>
>>


Hari

3/22/2007 1:12:00 PM

0

Hello Rupesh,

You can use tools like logexplorer from lumigent to read the transaction
logs. See the details of Logexplorer from below UR:L:-

http://www.lumigent.com/products/l...

If the table is very critical, you can log the updates, Inserts and delets
on that table to a Audit table using Insert/Update triggers.
This will help you identifying the person updated the data very fast.

Thanks
Hari


"Rupesh Mondal" <RupeshMondal@discussions.microsoft.com> wrote in message
news:98DCCE60-095D-4529-AFC7-A490B8C75FDE@microsoft.com...
> then how to extract information from the transaction log
>
> Rupesh
>
> "Tibor Karaszi" wrote:
>
>> SQL Server doesn't keep track of that by itself. You have some options:
>>
>> 1. Have a profiler trace running from which you can get this info.
>>
>> 2. Keep track of this in a column in your table (for instance using a
>> trigger)
>>
>> 3. Use some tool to mine for this from the transaction log. Assuming the
>> log record is still in the
>> log, of course.
>>
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/d...
>> http://www.solidqualitylea...
>>
>>
>> "Rupesh Mondal" <RupeshMondal@discussions.microsoft.com> wrote in message
>> news:00389460-28BB-4094-BFF1-46800ED45129@microsoft.com...
>> > Dear Friends
>> >
>> > I am using sql 2000, i want to know the date time of the last record
>> > inserted in the table.The table doesnt have a seperate column for
>> > datetime.Please reply me as early as possible.
>> >
>> > Rupesh Mondal
>>
>>
>>