I checked the link below as part (@Oliver) posted as a duplicate of my Question. But this query returns the last execution of the script. This is not related to my question.
Recent Queries Completed for a Specific Database
I have a database with Sample_Training, and I created a stored procedure in it, and then I deleted it and now I want to get this remote stored procedure.
I am an employee in the company, so I do not have administrative rights
DECLARE @Date_From DATETIME = '2015-01-02' DECLARE @Date_To DATETIME = '2015-01-05' SELECT CONVERT(VARCHAR(MAX), SUBSTRING([RowLog Contents 0], 33, LEN([RowLog Contents 0]))) AS [Script] FROM fn_dblog(NULL,NULL) WHERE [Operation] = 'LOP_DELETE_ROWS' AND [Context] = 'LCX_MARK_AS_GHOST' AND [AllocUnitName] = 'sys.sysobjvalues.clst' AND [TRANSACTION ID] IN (SELECT DISTINCT [TRANSACTION ID] FROM sys.fn_dblog(NULL, NULL) WHERE Context IN ('LCX_NULL') AND Operation IN ('LOP_BEGIN_XACT') AND [Transaction Name] = 'DROPOBJ' AND CONVERT(NVARCHAR(11), [Begin Time]) BETWEEN @Date_From AND @Date_To) AND SUBSTRING([RowLog Contents 0], 33, LEN([RowLog Contents 0])) <> 0
In the above query, I can get the stored procedure, and now my question is how to get the function, the table.
database sql-server select sql-server-2008 stored-procedures
Dinesh reddy alla
source share