Best Way To Keep Track Of SQL Server Changes
What would be the best practice to follow to keep track of MS SQL
server changes... Stroed procs, tables, views, triggers, indexes, DTS
and also jobs ect....
I am not quite sure how Source safe works with sql server. Any other
way to do this... Even if its manual work, its okey.. I would
appreciate if any of the DBA's let me know how they are facing this
issue....
Thanks in advance...
View Complete Forum Thread with Replies
Sponsored Links:
Related Messages:
Track Changes Made To SQL Server
Hello there,Does anyone know of a way to track changes to an SQL Server database so thatI can easily run those changes at a later date?That is, I want to make schema changes, and record those changes so that Ican execute them 6 months later on a copy of the orignal database.Thank you kindly for any ideas anyone may haveJohn
View Replies !
View Related
How Track Changes Of A Table In Sql Server 2000 Database
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 Replies !
View Related
Track All Changes
hello,I was wondering how to track all changes on tables by using some sort of ahistory table.What i would like is a generic history table where i can see who updated,inserted, deleted or executed(stored procedures, triggers) what value inwhat table with a date when it was occured.Could somebody help me with this?
View Replies !
View Related
Log To Track T Sql
hi, Is there a way to view any Transact sql in a log for instance, I am iserting a new records into a table. how can I track a log for the isert statment. I know that using bcp code provides me with a log if I use /o in the bcp code. Is there any similar thing for Transact sql thanks Ali
View Replies !
View Related
Track Changes
Is there a way to track changes to views, stored procedures and permissions, i.e, to see who/if/when something is altered or modified on SQL Server 7.0? If not is there a way to create a dts package that will script any changes? There has to be a way to do this right?
View Replies !
View Related
Keep Track Of Tables
Hi Guys. I am using sql server 6.5. Can anyine tell me where can get the information like 1. no. of times the database has been accessed, the time and date when accesses and by which user. 2. And also i want to know the latest user who accessed/inserted/ updated a particular table and its time and date. Thanks MAK
View Replies !
View Related
User Track Down
SQL Server 7.0 A stored procedure has been executed either yesterday or today. I would like to find out which user and when they executed it. Is this possible without 3rd party transaction log interrogation tools? Thanks, Nev.
View Replies !
View Related
How To Track Changes In A Database?
Situation: 2 servers: 1 production, 1 test. While my application is running on the production server, I want to develop on the test server. After a few weeks, I want to update the application, and have to update the database structure on the production server also with the most recent one from the testserver, but without deleting the current data on the production server. I create/modify all tables in SQL Server 2005 via Management Studio. The application is built in VS2008 Pro. I'm using SubVersion (SVN). I can let Management Studio generate scripts for every change and store them manualy, but that's a little bit too much work. What I want is a sort off version control solution. A solution that a service running on the background tracks every change on a specific database on my test server, and stores them as T-SQL code in a repository. Then I can collect all those T-SQL scripts, and run them against the production server. Is there some solution for that?
View Replies !
View Related
Keep Track Changes Made In Data
I want to create a page(using GridView) where it will detect changes made in the database and display it for Administrator observation. I've created a table name history for this purpose. History guid (uniqueidentifier) dateCreated(datetime) lastDateUpdated(datetime) changesMade(varchar(50)) ---- eg; dropdownlist oldValue(varchar(50)) ----- compaq newValue(varchar(50)) -----dell updateBy(varchar(10)) <------ username of registered user comNo(int) = foreign key for Computer table History data will insert data whenever a changes made. Could anyone advise and direct me how to do this function. I was thinking of using stored procedure to insert the data. Thanks in advance.
View Replies !
View Related
Best Way To Track Who Is Accessing A Record
I have an application that has a SQL back end, and I want to be able to track who is accessing a record so that no one else can access it at the same time. I was going to do this with a table or application state, but how can I avoid keeping files locked when someone abandons a session? Any Ideas?
View Replies !
View Related
Is There A Way To Track View Usage?
We're using SQL Server 2000 and we'd like to be able to track our viewusage to tell which of our views get used most often. This will helpus determine which views we need to concentrate on first foroptimizing, indexing, etc... Does anybody know if there's a way totell when a view is opened?Thanks,Gary
View Replies !
View Related
Is There A Way To Track User Access To Db?
I need to be able to track which users and the number of times a user connects to a particular SQL Server database. I have a simple SQL Server database that users query (SELECT only) using an Access 2000 front-end. I do not have any control over the front-end so my only tools on the database side. I can't use 3rd party software, just SQL Server. Is there any way? Thanks.
View Replies !
View Related
Track Duplication Of Records
Hello, I have a table which consists of 27,000 of records. Among these records, there is one record which is a duplication of another record. Is there any way to track this record from the same table by the SQL statement ? I have been advised to use the following statement but it does not help: Select count(*) As Duplicate, columnname from tablename group by columnname Scrolling 27,000 lines of records with bare eyes is very painful. Any help is appreciated. Cheers
View Replies !
View Related
How To Track Changes In A Stored Procedure
Hi I have a stored procedure for which i need to track the changes. I wanted to know which user has updated the stored procedure and what all changes are done to it. I thought of getting these details from the transaction log, but looks like sql server 2000 doesnt have any log reader. Kindly help Thanks in advance Sreenath
View Replies !
View Related
Keeping Track Of Table Changes ...
Hi We need to keep track of all changes that are made to our tables. The changes will be saved in a table that records: - the table in which the change was made - the name of the field that was changed - the old data for the field - the new data for the field etc.. I've seen a few examples that record the name of the table that was modified but none that record done to the field level. Can anybody give some guidance? Thanks.. Wayne
View Replies !
View Related
Need To Track Updated Records
Hi all, I have a data of applicants. Everyday we dump this data into SQL server. Now I need to generate reports everyday so that we can track how many records get updated everyday. Now the thing is that the applicants are in various stages. So my reports need to track the how many applicants changed from stage "abc" to "pqr" and how many changed from "pqr" to "xyz". Now it is not necessary that all the records change stages everyday. thanks in advance, Rohit
View Replies !
View Related
Help With Keeping Track Of Payment
Hello All, I have a problem concerning keeping track of a value within a query. I have a table that tracks invoices recieved and payments made. For each invoice number there may be multiple payments made against it. I need something that will check and make sure that each invoice number has its payments equal to its received amount. Any help would be greatly appreciated. Thanks,
View Replies !
View Related
Recomendations For Keeping Track Of Changes
Let's say I develop a 'version 1' of a program/database and ship it to some customers. Then I continue work on version 2 with some databasechanges etc. When version 2 is shipped to the customers, they need a way to upgrade their database from version 1 to version 2. I guess this is easiest done with one/several sql-scripts. What I want is your opinion about the best way to keep track of the changes between version 1 and 2. Here are two ways with pros and cons I've thought of: 1 - Keep manual track of every change (index, changed columns, relations etc) and update a scriptfile with all changes. Pros: Full control of what is happening Cons: Pretty much extra work and risk of missing some changes. 2 - When version 2 is ready, run some third party tool to get a diff between the databases Pros: Fast and easy Cons: The DB-changes may need to be applied in a special order, with default values, etc etc and I'm not sure all tools handle this in a good way...? So... what is your recomendations? I'm sure this must be a headace in every development project? Regards Andreas
View Replies !
View Related
Track Stored Procedure Changes
Is there any method to track stored procedure changes? Basically I want to save a copy of stored procedure definition in my own table whenever a stored procedure is being created/updated/dropped from the database. Thanks. P/S: Table to keep the copy CREATE TABLE USP_HISTORY( UserID nvarchar(128), ActionType varchar(10), ActionDate datetime, SPName nvarchar(128), Definition nvarchar(MAX) ) ActionType stores value like Create or Alter or Drop
View Replies !
View Related
Query Question. On The Right Track, I Think...
Hi. I have a large "view" I'm working with, between 250-280 fields [not sure exactly]. Within this view there are a few fields with similar information. For example, LocationID corresponds to the Address, City, and State, but those three are seperate fields. I also have a field with the most recent date and time that the address was used. There can be multiple records for any address if the address was used more than once in any given month. What I need to do is pull each distinct address-if there is more than one instance of that address, the instance that was most recently touched, along with all the other 200+ corresponding fields. I started off thinking I could sort the address ascending, and then the time descending, and just pull the first hit of each address by using the DISTINCT keyword in my query, but it keeps getting thrown off by all of the fields, and ends up not being distinct. I was using something like this: SELECT DISTINCT Address, BUnit, ResultDateTime FROM dbo.vw_ReportData WHERE BUnit='Blah' ORDER BY Address, ResultDateTime DESC Can anyone shed some light on this issue? That where statement needs to be in there [or its effect anyhow]. Any help would be appreciated. Thanks, Chris
View Replies !
View Related
Track Database Users
I am an advanced user of MS Access and other databases but relatively new to SQL Server. I am utilizing SQL Server Express to analyze a database that was created by another entity. I am interested in looking at any specific record in any table and seeing who created that record, what date/time the record was created, who edited the record, when that edit occurred, etc. I don't see any such fields in the database. Would the designer of the database have to have explicitly added such functionality, or is this information available but just hidden from the novice's view? Thanks for your help.
View Replies !
View Related
Track Query Execution
I have a strong feeling that this isn't possible but I thought I might as well ask... I'm developing a database application (SQL Server 2000 backend) where the client and the server is separated over a slow network connection (satellite). There are parts in the application where I will have to query a large resultset so I was wondering if there is a way to determine the percent complete of a query so I can put a progress bar on the interface so the user can see it loading data instead of having a frozen form. I thought about spliting up the query into different ones and update the bar once each separate one is complete but I'd rather not do that because in the application development environment I'm working in, I have to close the resultset and reopen it every time I do a query... unless this isn't a big deal but I'm under the impression its something to avoid. Thanks!
View Replies !
View Related
Track Select Statements.
different Users are running select statements under their own login. they have readonly permission to the database. My goal is to track all those queries and send notification which tables were opened and which columns were displayed...Looks like I need trigger on select statement for the table...( Unfortunetely it doesn't exists) I collect all those statements in trace file and in the night time I stop trace, move file data to table and then step by step try to massage sql queries using VB.net... Most of those queries are so complicated, have derived tables inside and it is really hard to parse these sql statements... 1.If anybody has an idea how to say: User B opened table tbl_A col_B twice per today...using different methodology rather then go through SQL.(Other words how to create an event on a table which will be fired in a case of request select any column of that table?) 2.If somebody know where we can take good parser which will help with this job? Thanks
View Replies !
View Related
Track All Records Retrieved From Search
Hi, I have a table full of items which can be searched. I also have another table with the ID of each item and columns for no of times details shown, no of times saved etc. What I would like to do is increment a value in this second table for each item every time it is returned in a search. What would be the best way to do this? (Im using a Stored Procedure) Thanks in advance, Pete
View Replies !
View Related
SQL 2005: Keeping Track Of Database Changes
I'm actually taking Microsoft's 2779 and just finished a lab where wekept track of our changes to the database.However, I'm not happy with the scripts interface because it does nottell me the chronological order of my changes to the database.Could someone share with me their technique for keeping track ofdatabase changes?I'm actually thinking a set of tables would be best, because sometimesyou want to know what database object you made a change to and othertimes you want to know when you did something...
View Replies !
View Related
How To Track Changes Made To A Specific Table?
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 Replies !
View Related
Track The Previous Input Selection
Hi, I have to track the "previous input selection" in Reporting service, say for example, 1 week before i have run a report and today i have to check what are the parameters i have given for the report, Is this can be acheived by through "Report History snapshot" or else there is any other feature. Thanks and Regards Altaf Nizamuddin
View Replies !
View Related
Interesting SQL Problem : How To Track Movement History
Hello everyone,There's an interesting SQL problem I've come across that I'm currentlybanging my head against. Given the following table that contains itemlocation information populated every minute :location_id date_created=========== ============5 2000-01-01 01:00 <-- Don't need5 2000-01-01 01:01 <-- Don't need5 2000-01-01 01:02 <-- Need7 2000-01-01 01:03 <-- Don't need7 2000-01-01 01:04 <-- Need5 2000-01-01 01:05 <-- Need2 2000-01-01 01:06 <-- Don't Need2 2000-01-01 01:07 <-- Need7 2000-01-01 01:08 <-- Needhow would you generate a result-set that returns the item's locationhistory *without* duplicating the same location if the item has beensitting in the same room for a while. For example, the result setshould look like the following :location_id date_created=========== ============5 2000-01-01 01:027 2000-01-01 01:045 2000-01-01 01:052 2000-01-01 01:077 2000-01-01 01:08This is turning out to be a finger twister and I'm not sure if itcould be done in SQL; I may have to resort to writing a stored-proc.Regards,Anthony
View Replies !
View Related
How Should I Create A Table To Track Equivalent Relationships?
I'm building an application that tracks courses and equivalent courses. For example, say I have course A which a user should get credit for if they have taken equivalent courses. So if a user has taken (course B or course C) AND (course D or course E) he should get credit for Course A. What's the best way to setup a SQL table to create these type of equivalent relationships?
View Replies !
View Related
Using Triggers To Track Changes In A Single Audit Table
Hi, I am looking to track any changes made to any table within a db into a single audit table which will hold as fields: the table that has been updated/inserted, the field that was changed, its primary key, the old value and the new value specific to that field, and the date it was updated/inserted. From what I have read, it does not look like this is possible with a trigger on table as it is not row specific and that I might have to control this from the business layer (vb.net). I am correct in this assumption, or is there a way of tracking specific data changes through triggers. thanks Welly
View Replies !
View Related
Table Structure To Track Member Activity On Website...
Working on a "social networking site" and would like to have something that records a member's interactions within the site.So for instance if a member uploads a photo, I would like to record it and then display it as "[Member] added photo" with a link to the photo. Also, if a friend is accepted as a friend "[Member1] is now friends with [Member2]" and also if a member posts a comment on the forums "[Member] posted message in [ForumName]" with link to post.This is very similar to Facebook's News Feeds and MySpace Friend Updates.The only way I can think of having this is having an Activity table with a field for each different Id I want to record and an associated list of tracked Actions:Activity:idmemberIdactionTypePhotoIdMember2IdForumIdThen there would be the ActionType tableactionIdNameThe biggest problem I see with this solution is that I would need to add a new field in the Activity table for each different type of activity I would like to track. This could get pretty big as I begin to track more and more activity items.Is there some way I can generalize this. - Andy
View Replies !
View Related
|