SQL server 2000 how to find transaction history for a table/row - sql-server-2000

How do you find the modification history for a certain table / row in SQL server 2000? Thanks.

you need to get a product that can read the transaction log like SQL Log Rescue or Apex SQL Log

Related

Get data from Oracle to SQL server after Oracle statements is excuted

I'm making a project with SQL Server but I just can get data from Oracle database in my customer's PC. Because they want to manage data before i can do with it. I have used Linked Server of Microsoft and Microsoft SQL Server Migration Assistant for Oracle to get data from Oracle database. But I have a problem I dont know when my customer INSERT, DELETE, UPDATE Oracle records. Is there anyway to migrate data from Oracle automatically to my SQL Server?
Really need a help. I have to manual do it everytime I want to update SQL Server database to get new records from Oracle.
Thanks in advance!

How to capture truncate statement information in SQL Server 2012

I would like to capture the truncate statements information along with the user/Login information for all database in my production server.
Example:
Use mydb
go
truncate table deleteme_table
I would like to capture the information into the table like the below
Table Operation Database Login Time
deleteme_table Truncate mydb sandeep.pulikonda 17-12-2014 17:50:00
If the above scenario is not possible please suggest possible ways to capture it
I am using SQL Server 2012 Standard version. So granular level audit are not supported for that version.
you can use the SQL Server Audit functionality and add an audit for those queries.
this article explains in detail how to obtain this.
Another good way of profiling your SQL Server is using SQL Profiler. Here is a SO question similar to yours and an answer describing how to use SQL Profiler to achieve the results.
SQL Server Profiler - How to filter trace to only display TSQL containing a DELETE statement?

Count All incomplete SQL Transactions running on database?

I need T-SQL to count Count All incomplete SQL Transactions running on database in another way I need to count all current sql transactions runnging right now on sql server instance.
I hope if I explained well what I need ?
thanks.
OK, I think I meant sys.dm_tran_active_transactions:
SELECT *
FROM sys.dm_tran_active_transactions
Original Post:
As shown on this post here: SQL SERVER – 2005 -Track Down Active Transactions Using T-SQL
SELECT *
FROM sys.dm_tran_session_transactions
This is for active transactions on the currently selected database. See sys.dm_tran_session_transactions.

How can I post updates (commits) in oracle db to SQL Server 2005

We have an application (BaaN) on Oracle Database.
We also have an application that is on SQL Server 2005 which uses Oracle (BaaN) contents.
Currently we cache all contents of the Oracle DB to SQL Server nightly through linked server from SQL Server to Oracle.
Thought of using a trigger on Oracle db tables to write contents to Oracle table (DeltaCommits) as the commits occur, and then periodically look for entries in DeltaCommits from SQL Server using a scheduled job.
Or can you please suggest a better way to accomplish this ..
Thanks
It's possible to use replication to transfer data between Oracle and SQL server.
This guide looks like a useful starting point which may help you to decide whether this is a route you want to consider.

How to find recent sql update operations acting upon a certain table (SQL Server 2005)

say I want to find the latest added rows (UPDATE by any user, not necessarily the one which is executing UPDATE) in XX table.
You would need to use a Transaction Log reader tool. There are several free ones available as well as commercial offerings.
ApexSQL Log
You could also try this undocumented command:
DBCC LOG(<database name>[,{0|1|2|3|4}]).
If you're using SQL Server 2000, RedGate have a free tool called SQL Log Rescue.
EDIT: Documentation for DBC LOG:
(1) (2)
Please refer to SQL Docs & look for OUTPUT clause (that you can use with UPDATE/INSERT to get the affected records).
http://msdn.microsoft.com/en-us/library/ms177564.aspx
SQL Server Profiler will allow you to track hits to the database in real time. You can set filters on a number of properties to ge the output you need.