Viewing 15 posts - 2,026 through 2,040 (of 2,355 total)
Aside from the fact that neither TableB or TableC have a primary key defined, what is wrong with the structure in the script you posted?
Neither of the two possible solutions...
Michael L John
If you assassinate a DBA, would you pull a trigger?
To properly post on a forum:
http://www.sqlservercentral.com/articles/61537/
June 19, 2015 at 7:02 am
sgmunson (6/18/2015)
A couple of additional notes:3.) I simplified some of the coding to use BETWEEN.
Enjoy...
You probably do not want to use BETWEEN for a datetime field.
If you are...
Michael L John
If you assassinate a DBA, would you pull a trigger?
To properly post on a forum:
http://www.sqlservercentral.com/articles/61537/
June 18, 2015 at 11:18 am
sgmunson (6/18/2015)
sqlnoob2015 (6/17/2015)
Thank you!!
Basically i want my...
Michael L John
If you assassinate a DBA, would you pull a trigger?
To properly post on a forum:
http://www.sqlservercentral.com/articles/61537/
June 18, 2015 at 8:40 am
mark.dickinson (6/18/2015)
Michael L John (6/17/2015)
3. I don't think Database name is part of the EventData Function....
Michael L John
If you assassinate a DBA, would you pull a trigger?
To properly post on a forum:
http://www.sqlservercentral.com/articles/61537/
June 18, 2015 at 7:50 am
1. Mark, if you don't have a database of DBA-type stuff, give it some thought. Don't give anyone other than the DBAs permission to it and collect whatever you...
Michael L John
If you assassinate a DBA, would you pull a trigger?
To properly post on a forum:
http://www.sqlservercentral.com/articles/61537/
June 18, 2015 at 7:38 am
Polymorphist (6/17/2015)
My team is deciding to go with code-only solutions rather than continue our heavy reliance on SSIS.
At the risk of sounding like a certain grumpy expert, why???...
Michael L John
If you assassinate a DBA, would you pull a trigger?
To properly post on a forum:
http://www.sqlservercentral.com/articles/61537/
June 17, 2015 at 7:39 pm
Union will not work.
This will:
SELECT
case
when Substring(gl_account.id, 5, 3) = 001 then 'Group 1'
when Substring(gl_account.id, 5, 3) = 002 then 'Group 2'
when Substring(gl_account.id, 5, 3) = 003 then 'Group...
Michael L John
If you assassinate a DBA, would you pull a trigger?
To properly post on a forum:
http://www.sqlservercentral.com/articles/61537/
June 17, 2015 at 7:26 pm
Sorry, I saw this post and ran out the door after I published the code.
1. I have a DBAUtilities database on all my servers. This holds auditing tables,...
Michael L John
If you assassinate a DBA, would you pull a trigger?
To properly post on a forum:
http://www.sqlservercentral.com/articles/61537/
June 17, 2015 at 7:19 pm
CREATE TRIGGER [Server_Logon_Trigger]
ON ALL SERVER
FOR LOGON
AS
INSERT INTO DBAUtilities.dbo.Server_Logon_History(EventType, PostTime, ServerName, LoginName, LoginType, SID, ClientHost, IsPooled)
SELECT EVENTDATA().value('(/EVENT_INSTANCE/EventType)[1]', 'nvarchar(100)'),
EVENTDATA().value('(/EVENT_INSTANCE/PostTime)[1]', 'datetime'),
EVENTDATA().value('(/EVENT_INSTANCE/ServerName)[1]', 'nvarchar(512)'),
EVENTDATA().value('(/EVENT_INSTANCE/LoginName)[1]', 'nvarchar(512)'),
EVENTDATA().value('(/EVENT_INSTANCE/LoginType)[1]', 'nvarchar(512)'),
EVENTDATA().value('(/EVENT_INSTANCE/SID)[1]', 'nvarchar(512)'),
EVENTDATA().value('(/EVENT_INSTANCE/ClientHost)[1]', 'nvarchar(512)'),
EVENTDATA().value('(/EVENT_INSTANCE/IsPooled)[1]',...
Michael L John
If you assassinate a DBA, would you pull a trigger?
To properly post on a forum:
http://www.sqlservercentral.com/articles/61537/
June 17, 2015 at 1:01 pm
See this thread:
http://www.sqlservercentral.com/Forums/Topic1694442-2893-1.aspx
What likely will happen in the event you need to restore from a SAN backup is inconstancy.
As was suggested, test your RSTORES regularly. I would suggest...
Michael L John
If you assassinate a DBA, would you pull a trigger?
To properly post on a forum:
http://www.sqlservercentral.com/articles/61537/
June 16, 2015 at 8:15 am
This may be better
SELECT
count(hc),
CS,
S_W,
SUM(case when Reg_Temp = 'Reg' then 1...
Michael L John
If you assassinate a DBA, would you pull a trigger?
To properly post on a forum:
http://www.sqlservercentral.com/articles/61537/
June 15, 2015 at 1:07 pm
Does this work?
SELECT TOP (100)
COALESCE(DB_NAME(ST.dbid),
DB_NAME(CAST(PA.value AS INT)) + '*', 'Resource') as [Database_Name]
...
Michael L John
If you assassinate a DBA, would you pull a trigger?
To properly post on a forum:
http://www.sqlservercentral.com/articles/61537/
June 15, 2015 at 12:34 pm
yb751 (6/15/2015)
Did you try using GO?Example:
First SPGO
Second SP
This will not work inside a procedure.
Can you post your code?
Michael L John
If you assassinate a DBA, would you pull a trigger?
To properly post on a forum:
http://www.sqlservercentral.com/articles/61537/
June 15, 2015 at 12:23 pm
karend211 34657 (6/15/2015)
Michael L John
If you assassinate a DBA, would you pull a trigger?
To properly post on a forum:
http://www.sqlservercentral.com/articles/61537/
June 15, 2015 at 10:08 am
Jeff Moden (6/12/2015)
phosplait (6/12/2015)
@jeff, there is no begin in the function. It is an inline function that does a cross apply with another inline function onto a range of dates
Just...
Michael L John
If you assassinate a DBA, would you pull a trigger?
To properly post on a forum:
http://www.sqlservercentral.com/articles/61537/
June 15, 2015 at 9:04 am
Viewing 15 posts - 2,026 through 2,040 (of 2,355 total)