Click here to Skip to main content
15,442,472 members
Home / Discussions / Database
   

Database

 
QuestionSQL Optimization Pin
Chaminda Bandara16-Feb-15 20:59
professionalChaminda Bandara16-Feb-15 20:59 
AnswerRe: SQL Optimization Pin
Richard MacCutchan16-Feb-15 21:33
mveRichard MacCutchan16-Feb-15 21:33 
AnswerRe: SQL Optimization Pin
Corporal Agarn17-Feb-15 1:45
professionalCorporal Agarn17-Feb-15 1:45 
AnswerRe: SQL Optimization Pin
Mycroft Holmes17-Feb-15 14:03
professionalMycroft Holmes17-Feb-15 14:03 
GeneralRe: SQL Optimization Pin
Chaminda Bandara17-Feb-15 19:06
professionalChaminda Bandara17-Feb-15 19:06 
GeneralRe: SQL Optimization Pin
Mycroft Holmes18-Feb-15 1:14
professionalMycroft Holmes18-Feb-15 1:14 
QuestionVersioned data strategy Pin
LostTheMarbles15-Feb-15 21:08
professionalLostTheMarbles15-Feb-15 21:08 
AnswerRe: Versioned data strategy Pin
GuyThiebaut16-Feb-15 1:44
professionalGuyThiebaut16-Feb-15 1:44 
What I have done is build an audit table:
id	int 
operation nvarchar(50)
table_name nvarchar(200)
col_name nvarchar(200)
key_col nvarchar(200)
key_val nvarchar(200)
col_val_prior nvarchar(MAX)
col_val_new nvarchar(MAX)
username nvarchar(50)
transaction_dt datetime
batch nvarchar(MAX)


id - unique id on this table
operation - insert,delete or update
table_name - name of table operation pertains to
col_name - name of the column operation pertains to
key_col - name of the key column operation pertains to
key_val - value of the key column operation pertains to
col_val_prior - value of col_name column before operation
col_val_new - value of col_name column after operation
username - name of user running operation
transaction_dt - datetime trigger was run
batch - guid that uniquely identifies an operation

I then created three triggers that I add to all tables to be audited(the triggers cover insert, update and delete operations).
This allows me to see all operations on tables I wish to audit.
“That which can be asserted without evidence, can be dismissed without evidence.”

― Christopher Hitchens

AnswerRe: Versioned data strategy Pin
Mycroft Holmes17-Feb-15 13:59
professionalMycroft Holmes17-Feb-15 13:59 
QuestionVB.NET MYSQL sum row values Pin
KipkoechE15-Feb-15 20:51
MemberKipkoechE15-Feb-15 20:51 
AnswerRe: VB.NET MYSQL sum row values Pin
Richard MacCutchan15-Feb-15 22:11
mveRichard MacCutchan15-Feb-15 22:11 
QuestionMYSQL TABLE RECORDS TO ARRAY Pin
KipkoechE15-Feb-15 4:19
MemberKipkoechE15-Feb-15 4:19 
AnswerRe: MYSQL TABLE RECORDS TO ARRAY Pin
Afzaal Ahmad Zeeshan15-Feb-15 4:41
mveAfzaal Ahmad Zeeshan15-Feb-15 4:41 
GeneralRe: MYSQL TABLE RECORDS TO ARRAY Pin
KipkoechE15-Feb-15 4:46
MemberKipkoechE15-Feb-15 4:46 
GeneralRe: MYSQL TABLE RECORDS TO ARRAY Pin
KipkoechE15-Feb-15 6:15
MemberKipkoechE15-Feb-15 6:15 
AnswerRe: MYSQL TABLE RECORDS TO ARRAY Pin
Eddy Vluggen15-Feb-15 8:18
professionalEddy Vluggen15-Feb-15 8:18 
AnswerRe: MYSQL TABLE RECORDS TO ARRAY Pin
sanket16415-Feb-15 17:43
Membersanket16415-Feb-15 17:43 
QuestionSSRS report is not fitting withing Margins Pin
indian14313-Feb-15 13:39
Memberindian14313-Feb-15 13:39 
QuestionEdit SSRS report file Pin
indian14312-Feb-15 14:08
Memberindian14312-Feb-15 14:08 
AnswerRe: Edit SSRS report file Pin
Member 1102161912-Feb-15 19:07
MemberMember 1102161912-Feb-15 19:07 
AnswerRe: Edit SSRS report file Pin
Chris Quinn13-Feb-15 0:25
MemberChris Quinn13-Feb-15 0:25 
GeneralRe: Edit SSRS report file Pin
indian14313-Feb-15 13:36
Memberindian14313-Feb-15 13:36 
QuestionMYSQL RANKING IN A VIEW Pin
KipkoechE12-Feb-15 2:28
MemberKipkoechE12-Feb-15 2:28 
AnswerRe: MYSQL RANKING IN A VIEW Pin
Richard Deeming12-Feb-15 3:26
mveRichard Deeming12-Feb-15 3:26 
GeneralRe: MYSQL RANKING IN A VIEW Pin
KipkoechE12-Feb-15 4:06
MemberKipkoechE12-Feb-15 4:06 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.