March 12, 2008 at 5:50 am
Hi All
I'm running the following script to get all failed logins from a server, via a linked server:
SELECT * FROM OPENQUERY (myserver,'master.dbo.usp__Failed_LogIns')
The script is as follows (called usp__Failed_LogIns):
truncate table Errors
INSERT INTO Errorstmp
(textRow, continuationRow)
EXEC dbo.xp_readerrorlog
insert into Errors
SELECT @@servername as ServerName,textRow as ErrorMsg,
(convert(varchar(8),getdate(),112)) as RunDate
FROM Errorstmp
WHERE CHARINDEX('logon ', textRow) > 0 and
textRow like '%login f%'
ORDER by rowID
--insert into Errors
--select * from Errors_tmp
truncate table Errorstmp
select * from Errors
Can anyone please shed some light on this? I did read other blogs, but can someone give me a clear undertsanding of whats happening? Thanks in advance.
A
March 12, 2008 at 6:01 am
Hi
Seems like I called the same procedure in the usp__Failed_Logins proc
😉
I do however get the following error when I execute the linked server script:
Could not process object 'master.dbo.usp__Failed_LogIns'. The OLE DB provider 'SQLOLEDB' indicates that the object has no columns.
OLE DB error trace [Non-interface error: OLE DB provider unable to process the object:ProviderName='SQLOLEDB', Query=master.dbo.usp__Failed_LogIns'].
Any ideas?
Thanks
A
March 12, 2008 at 6:59 am
You have issued a "SELECT", which expects results to be returned back. however your script does an insert and doesn't return any results.
March 12, 2008 at 7:10 am
Hi there
Thanks for the reply.But can you be a bit clearer. Can you perhaps guide me into the right direction?
Thanks
A
March 12, 2008 at 7:12 am
Nesting level tells me you likely have a trigger that's firing over and over and over again. If a trigger is set up in such a way as to make itself fire, (like doing an insert in an ON INSERT query on a database with Recursive Triggers turned on) - you will get the "Nested level exceeded" error.
----------------------------------------------------------------------------------
Your lack of planning does not constitute an emergency on my part...unless you're my manager...or a director and above...or a really loud-spoken end-user..All right - what was my emergency again?
Viewing 5 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply