May 29, 2015 at 4:28 pm
Comments posted to this topic are about the item Email SP Results
June 1, 2015 at 10:55 am
How to do it for all procedures available in a database and mail them to email address??
Thanks.
June 12, 2015 at 8:42 am
This is a great Utility and will definitely be in my Toolbox. With a few tweaks most people will be able to make this work for their environment.
I had to add the Parameter @profile_name to the Stored Procedure. I also made changes the greeting and footer section.
Thank you for sharing your code
June 29, 2015 at 1:42 am
Anyone having reshaped form of this code Please let me know at safeernadeem@yahoo.com
July 15, 2015 at 6:04 am
What do you mean reshaped? Any specific requirements?
September 21, 2015 at 1:37 am
Great utility! I am working on implementing a similar solution. Will post an update if I can fine tune it.
July 23, 2016 at 8:46 am
what if lync server is not active? can this be done without it?
I would love to use this. I receive the following errors.
OLE DB provider "SQLNCLI10" for linked server "(null)" returned message "A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online.".
OLE DB provider "SQLNCLI10" for linked server "(null)" returned message "Client unable to establish connection".
Msg 21, Level 16, State 1, Line 0
Encryption not supported on the client.
December 5, 2016 at 7:40 am
Interesting concept, thanks.
March 14, 2018 at 7:38 am
Nicolas Thank you!
Is there any reason why your proc cannot find a database?
I even tried to use the Master database.
Msg 7202, Level 11, State 2, Line 1
Could not find server 'Master' in sys.servers. Verify that the correct server name was specified. If necessary, execute the stored procedure sp_addlinkedserver to add the server to sys.servers.
YThank you for your help!
Jacob Milter
March 14, 2018 at 2:58 pm
Nicolas,
I made a few changes that allow running this proc on the Local Server without using OPENROWSET.
Also, you can use any Query or View to get the record set you need/
/*
SET @vcServerName = 'Server='+(SELECT @@SERVERNAME)+';Trusted_Connection=yes;'
Print 'Server ' + @vcServerName
SELECT @vcString = 'EXEC ['+@vcDatabaseName+'].['+@vcSchemaName+'].'+(REPLACE(@vcProcName, '''',''''''))+''
Print @vcString
EXEC ('
SELECT * INTO ##MyTempTable
FROM OPENROWSET(''SQLNCLI'', '''+@vcServerName+''','''+@vcString+''')
')
print '
SELECT * INTO ##MyTempTable
FROM OPENROWSET(''SQLNCLI'', '''+@vcServerName+''','''+@vcString+''')
'
*/
SELECT * INTO ##MyTempTable FROM MyDatabase..[v_Current_Job_Records]
Jacob Milter
August 12, 2018 at 8:56 am
Hi Jacob,
I will give this a try - thanks for the info!
Regards,
Nicholas W.
Viewing 11 posts - 1 through 10 (of 10 total)
You must be logged in to reply to this topic. Login to reply