SQL Server 2008 :: How To Track Modification Date On Specific Table

Jul 13, 2015

I would like to know about the DML process (Insert/update /delete) in a particular table .. it is like change tracking but I also want to know the modification date

I know CDC ( Change data capture ) but unfortunately it needs SQL 2008 developer/enterprise edition and my SQL server is SQL 2008 STANDARD edition.

View 5 Replies


ADVERTISEMENT

SQL Server 2008 :: Track All DML Statements Executed From SSMS Into A Table

Apr 1, 2015

I have a specific requirement. I need to insert the DML statements executed from Management Studio into a SQL table. We have SQL Server 2008 R2 and 2012 instances.

View 8 Replies View Related

How To Track Changes Made To A Specific Table?

Nov 3, 1998

Hi, we are almost finished developing our database and we have a table we want to monitor because it is getting information deleted from it
and it has a delete trigger on it but we want to track the changes to
the table and were wondering how to track specific changes to a user database?
We want to see who is making the change, what the change they are making is and also what is the time they are making it. I have used
SELECT * FROM SYSPROCESSES
and I am running SQL TRACE with filter on MS SQLEW, and MS TRANS, and
Visual Basic with SQL statements on tblRoute,( the table that I want to monitor) and I want to know if there is any other way to monitor this table more closely?

View 1 Replies View Related

SQL Server 2008 :: How To Load SSIS Package For Any Specific Date

May 18, 2015

I have a ssis package which runs daily. This ssis package has couple of execute sql tasks which load data for yesterday's transaction. Ex.

INSERT INTO Shipped (Div_Code, shipment_value, ship_l_id, shipped_qty, shipped_date, whse_code,

ord_id, ship_id, ship_l_ord_l_id, Created_date) select ord.DIV_CODE as div_code, ship.SHIPMENT_VALUE as shipment_value, ship_l.SHIP_L_ID as ship_l_id, ship_l.SHIPPED_QTY as shipped_qty, ship.SHIPPED_DATE as shipped_date, ship.WHSE_CODE as whse_code, ord.ORD_ID as ord_id, ship.SHIP_ID as ship_id, ship_l.ord_l_id as ship_l_ord_l_id, Getdate() as Created_date from SHIP ship, ORD ord, SHIP_L ship_l where ship.SHIPPED_DATE=(dateadd(day, -1, CONVERT(VARCHAR(10),GETDATE(),120))) and ship.WHSE_CODE='WPP' and ord.ORD_ID=ship.ORD_ID and ship.SHIP_ID=ship_l.SHIP_ID

All execute sql task has query like above query. and in some query we have date filter which loads data for yesterday. Ex. one query has ship.SHIPPED_DATE=(dateadd(day, -1, CONVERT(VARCHAR(10),GETDATE(),120))). some other query has ord.trans_date=(dateadd(day, -1, CONVERT(VARCHAR(10),GETDATE(),120))). this package runs daily through sql server job, so It loads data for yesterday. Now If i want to run for any particular date, How could we achieve from ssis?

View 3 Replies View Related

SQL Server 2008 :: Load Data For Yesterday And Specific Date

May 31, 2015

I have a ssis package, which runs on date parameter. If we dont specify the date it always load data for yesterday's date. And if we give any specific date like '2015-05-10', It should load for that date. How can we achieve this dynamically (using package configuration)? Once we load for any specific date, package should be set for yesterday's date dynamically. How to achieve this as I am new to SSIS.

View 2 Replies View Related

SQL Server 2008 :: Query To Delete All Backup Files Older Than A Specific Date?

Jul 29, 2015

I want to delete all backup files from a folder older than a specific date. But if I use the beklow query, I need to pass how many days of older backup files I need to delete whereas in my case, I dont know how many days/month/syears of old backup files are there in the backup folder.

EXEC xp_cmdshell 'FORFILES /p c:BACKUP /s /m *.sql /d -30 /c "CMD /C del /Q /F @FILE"'

View 2 Replies View Related

Finding Table Modification Date

Oct 10, 2001

Is there a way to find out when the last modification or change to data in a table occured ? How about the last change of a view ?

We'd like to be able to extract data to another table based on a view. Then, at a later date, check to see if the first table or view has changed since the last extract. If not, then we don't need to re-extract the data, we know it hasn't changed.

View 1 Replies View Related

SQL Server 2008 :: Replicate Only Specific Data To Specific Subscriber?

Jun 30, 2015

We have a "main" SQL 2014 server who imports XML files using SSIS in a datacenter. In remote sites (which are warehouses), there is an instance of SQL 2014 Express. A merge replication is setup, as every operations done on each site must be "forwared" to the main database, as some XML files are generated as output for an ERP system.

Now, the merge replication replicate all the data to the server on each sites. But a specific site don't need the data of every other sites, only the data relevant to itself (which is the warehouse code). Is there a way to replicate only the data relevant to each individual sites to the subscribers? Or is there a better way than replication to accomplish this?

View 2 Replies View Related

SQL Server 2008 :: Track Unallocated Space On Database?

Apr 1, 2015

I am trying to track unallocated space (because on my database growth is not kicking in) So using below query but not working!!! Is there any way I can track 'database size' and 'unallocated space' on a single database?

create table A(
Rundate DATETIME NOT NULL DEFAULT(GETDATE())
,DatabaseName varchar(100)
,Database_size varchar (100)
,unallocatedSpace varchar (100)
,reserved varchar(100)

[code].....

exec AdventureWork..sp_spaceused ------not working------

View 2 Replies View Related

Track A Specific Procedure In Profiler

Aug 2, 2006

Hello
I am using SQL Server 2000 and How should I track a specific procedure and DMLs in it with profiler, I was trying to filer ObjecName=MySP but it seems it does not track only the SP. Any idea?

View 2 Replies View Related

Track A Specific Procedure In Profiler

Aug 2, 2006

Hello
I am using SQL Server 2000 and How should I track a specific procedure and DMLs in it with profiler, I was trying to filer ObjecName=MySP but it seems it does not track only the SP. Any idea?

View 3 Replies View Related

SQL Server 2012 :: Using Merge Statement Output Records To Rebuild Table On Specific Date

Mar 5, 2015

I have a table which is updated daily using a MERGE statement. As records are insert, updated and deleted, I am saving the OUTPUT from the MERGE statement into a history table with a timestamp and action$ column appended to the record.

Using this history table, I'd like to rebuild the data based on specific past date. I was able to create a stored procedure that inspects each record in the history table and apply it to the data in a temp table. The stored procedure solution uses multiple queries to rebuild the data at a point in time. I was curious if there was an easier and more efficient solution using a table function.

View 2 Replies View Related

Reporting Services :: SSRS 2008 R2 - Create A Single Vertical Stripline At Specific Date Value Along X-axis?

Jun 5, 2012

I'm struggling with trying to display a single vertical stripline at a date value along my x-axis. 

I'm using the following non-default settings within the stripline editor:

bordercolor = tomato
borderstyle = solid
borderwidth  = 1pt
intervaloffset = Fields!uidate.Value.ToOADate()

where uidate is a calculated field in my dataset that always has the value of 05/29/2012  (using formatdatetime("05/29/2012",dateformat.ShortDate))

Everything else is set to Auto, with stripwidth=0

I'm trying to display a single vertical line at the x-axis value of 05/29/2012

I have previously tried setting the interval offset to "05/29/2012" but that didn't work. I've also tried setting the value of a hidden text box on the report to "05/29/2012" and setting the interval offset to the value of that text box, but that gave me a "text box not declared" error.

How I can simply display a vertical stripline on my line graph at the x-axis value of 05/29/2012 ?

View 2 Replies View Related

T-SQL (SS2K8) :: Track How Many Times A Specific SP Called Every Day

Apr 3, 2014

I need to know /observe for a period like 10 days in a row HOW MANY TIMES a specific Stored Proc is executed on the server. How can I do that? is there a way to precisely know a number of such calls via DMVs?

View 9 Replies View Related

SQL Server 2008 :: Update A Table With Date When There Are New Records In Another Table

Sep 16, 2015

I have a scenario where I have to Update a table with date when there are new records in another table

For example:

I load ODS table with the data from a file in SSIS. the file has CustomerID and other columns.

Now, when there is new record for any customerID in Ods, then Update the dbo table with the most recent record for every CustomerID(i.e. update the date column in dbo for that customerID). Also Include an Identifier that relates back to the ODS table. How do I do this?

View 8 Replies View Related

SQL 2012 :: Track Blocking Details At A Specific Time?

May 28, 2015

In sql 2012 i want to track the blocking details at a specific time is any query to get the data ?

View 6 Replies View Related

SQL Server 2008 :: Dynamically Create The Table With Current Date At The End?

Feb 12, 2015

I am running a script by the end of the day. What I need is the rows in my temp table get saved in a permanent table.

The name of the table should end with the current date at the end.

Declare @tab varchar(100)
set @tab = 'MPOG_Research..ACRC_427_' + CONVERT(CHAR(10), GETDATE(), 112 )
IF object_id(@tab ) IS NOT NULL
DROP TABLE '@tab';
Select * INTO @tab from #acrc427;

View 3 Replies View Related

SQL Server 2008 :: Archive And Delete Old Records In Table With No Date Column

Feb 4, 2015

I have these two tables Log and CategoryLog, I need to archive records older than 13 months in these two tables to two separate tables and then delete the archived records from Log and CategoryLog tables. The problem is that only 'Log' table has a date column, the other table CategoryLog does not have any date column. But the two tables are connected by a column(LogID). How to archive the data and then delete the archive data from both tables.

View 9 Replies View Related

SQL Server 2008 :: Moving Into A Specific Filegroup

Jun 3, 2015

SQL 2008 R2

I have a partitioned table in which one of the partitions is on the Primary filegroup. I want to move the data off of that Primary filegroup, and and on to a new filegroup named RTFG6.

Scheme and function currently defined as:

CREATE PARTITION SCHEME [PS1_Left_id] AS PARTITION [PF1_Left_id] TO ([RTFG1], [RTFG2], [RTFG3], [RTFG4], [RTFG5], [PRIMARY])

CREATE PARTITION FUNCTION [PF1_Left_id](int) AS RANGE LEFT FOR VALUES (10, 15, 35, 48, 53)

I've tried split and merge, and for whatever reason, always end up with the Primary filegroup holding data.

How do i get it off of Primary completely, and onto RTFG1 to RTFG6?

I don't want to export to a holding table and re-create the table if i can avoid it, due to identity columns and relationships with multiple tables.

View 0 Replies View Related

How Track Changes Of A Table In Sql Server 2000 Database

Jan 4, 2006

Hi
anyone please help!
I have created the database driven web application with asp.net and sql server 2000. now I want keep track three operation(insert, updata and delete) that have been made on tables in a SQL Server 2000 database. what i did is:
1, create a audit table with columns: auditTable, actions, actionUser, actionTime
2, create three trigger(insert, update and delect respectivily) for every  table
my problem is that i can not get right user name. I use form authentication and i stored user login information in the database. every time, no matter who is logining to the web application, the action user is always SA. I user user-name() function to get userName(actionUser).
Please anyone can help me to get current login user name, or tell the best way to track operations on a table.
Thanks
jili

View 9 Replies View Related

SQL Server 2008 :: SSIS Expression On Getting The Specific Files?

Feb 26, 2015

I am developing the SSIS and stuck on copying specific files.

1. We receive CSV file to our drive on a daily basis.

2. The csv file name has the last 8 digits formatted with the yyyymmdd. For example, the file name might be abcdef_20150226.csv This means it will be our CSV file for today, Thursday, February 26, 2015.

3. There are a lot of files in this directory.

[URL]

What we would like to do:

Add the constraints (or expression) that will copy the files from this directory to another directory that have the date equivalent to Monday only. For example, the file abcdef_20150226.csv will not be copied because it is Thursday file. But the abcdec_20150223 will be copied to a new Directory because it is Monday.

View 1 Replies View Related

SQL Server 2008 :: Specific Type Of Join For 3 Tables

Jul 3, 2015

I have 3 tables as per following:

orddet
OrderProductQtyOrd
1 Item1 20
2 Item1 10
3 Item2 10
4 Item1 5
4 Item2 5

ordhead
OrderDate
110/06/2015
205/07/2015
307/06/2015
415/08/2015

product
ProductdescMinQty
Item1This is 110
Item2This is 220

I want to pull only the 1 line for minqty for an item as follows

OrderProductQtyOrddate minqty
1 Item1 20 10/06/2015 10
2 Item1 10 05/07/2015
3 Item2 10 07/06/2015 20
4 Item1 5 15/08/2015
4 Item2 5 15/08/2015

View 2 Replies View Related

SQL Server 2008 :: Join Two Tables With Specific Data

Jul 15, 2015

I have two queries from two different tables ex ABC and BCD. For table ABC, according to my query, I got 11 records ; for table BCD I only got 9 records.

Bottom line: I would like to see only 11 records from Table ABC including certain data from table BCD after I joined this two tables.

However, no matter what I did I always got 99 records when I joined.

View 3 Replies View Related

How Do I Identify Object Modification Date Under Sql7 And 2000

May 23, 2001

I used to rely heavily on the sysobjects.crdate under mssql 6.5 to identify the last time an object was updated (primarily sprocs, but also tables and views). With the Sql7 Alter command, there doesn't seem to be any easy way to tell the last time an object was changed. Is this data stored out on any of the system tables/information views?

View 1 Replies View Related

SQL Server 2008 :: Extended Events Capture A Specific Proc Parameter

Feb 19, 2015

I know very little about Extended Events, but I know it is supposed to be more powerful than Profiler. The SQL Instance involved is 2008R2. I was asked whether we could capture when a stored proc was called with a certain parameter. So for example, if dbo.usp_mystoredproc is called and is passed a value of '12345a' for @customer, can that be captured? I would want to know the time it was called, the parameter and parameter value. Probably would be interested in the SPID or LoginName as well.

View 4 Replies View Related

SQL Server 2008 :: Query That Returns Only Rows That Meet Specific Condition?

Oct 22, 2015

Here's what my table looks like;

UniqID | Code |

1 | ABC
1 | 123
2 | ABC
3 | ABC
4 | ABC
4 | ABC

I only want to UniqIds that only have the CODE of ABC... and if it contains ANYTHING other than ABC then It doesnt return that UniqID... Now keep in mind there's multiple different codes.. I'm just looking for a bit of code that drops any ID's that don't have my criteria.

View 9 Replies View Related

SQL Server 2008 :: Syntax Error When Trying To Change Mirroring For Dedicated Network Through Specific IP

Jun 10, 2015

We have a database in SQL Server 2008 R2 with mirroring and want that replication is done by dedicated network.We stop the endpoint and when we try to run the following command, syntax error occurred:

Msg 102, Level 15, State 1, Line 1
Incorrect syntax near '192.168.1.14'.

What is the correct syntax of the command line below?

ALTER ENDPOINT Endpoint_Mirroring AS TCP (LISTENER_IP = '192.168.1.14')

View 2 Replies View Related

SQL Server 2008 :: Add Target Specific Extended Properties To Replication Subscriber Tables

Oct 6, 2015

I have documentation in the form of extended properties for tables which are subscribers in a replication scheme. The documentation describes the tables in reference to their replication scheme. I don't want to apply them to the source and have them published.I can't apply the extended properties receiving the error, 'don't have permission' yet I am DB creator on all systems. The theory is that I can't modify the subscription. Which makes sense.Can I turn off the replication, apply the extended properties, then turn on replication without causing harm?

View 0 Replies View Related

SQL Server 2008 :: Finding Beginning Date From Multiple Lines Of Date Ranges?

Mar 20, 2015

I am trying to find a beginning date from multiple date ranges, for example:

RowNumberidBegin dtEnd Dt
107933192014-09-022015-06-30
207933192013-09-032014-09-01
307933192012-09-042013-09-02
407933192011-09-062012-09-03

For this id: 0793319, my beginning date is 2011-09-06

108203492014-09-022015-06-30
208203492013-09-032014-09-01
308203492012-09-042013-09-02
408203492011-12-122012-07-03--not a continuous date range

For this id: 0793319, my beginning date is 2012-09-04

108203492014-09-022015-06-30

For this id: 0820349, my beginning date is 2014-09-02

To find continuous date, you look at the beginning date in row 1 and end date in row 2, then if no break in dates, row 2 beginning date to row 3 end date, if no break continue until last date There could multiple dates up to 12 which I have to check for "no break" in dates, if break, display beginning date of last continuous date.

View 9 Replies View Related

How To Get The Week Number Of A Specific Date In SQL Server 2005

Jan 10, 2008

Hi,


Can anybody tell me to How to get the week number of a specific Date in SQL Server 2005.

Like : say Date "03/01/2008" belongs to the 1st week of the year 2008, same way "21/02/2008" is 8th week of the year 2008.

So, the same way I need to know the week number of a given (variable) date.


I need to write / use a Function in SQL server which will return the Number (INT) (i.e. 1 or 8 or 10 etc...) against a specific (Parameter) date.

regards,

Saibal


Note : Please feel free to write me if my question is not clear.

View 5 Replies View Related

SQL Server 2008 :: How To Get A Year Ago Date From The Particular Date

May 15, 2015

I have a list of students who have taken a test on different dates.

I need a function to calculate year ago date from the date of test.

eg Sam took the test on feb 23 2015

I need to get a feb 23 2014 to see what subjects he studied from feb 23 2014 to feb 23 2015.

How can I do that.

View 3 Replies View Related

Dynamic Table Creation/Modification

Oct 1, 2006

I'm wondering if there is a control available for creating/modifying db tables through a web interface. I want for users to be able to add/remove, rename, and change the datatype of certain fields in a database table. I've been searching all day online if such a control exists in asp.net but haven't found anything. 

View 1 Replies View Related

View Based On Table Modification

Aug 8, 2013

I have been inserted one row in to table called as Teachers..

vTeachers is the View ctreated on Teachers Table.

When i Inserted one row in to Table Teachers i didn't see that row in vTeachers View.

How can i get that newly inserted values in to my View?

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved