Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 

Get your favorite SSC scripts directly in SSMS with the free SQL Scripts addin. Search for scripts directly from SSMS, and instantly access any saved scripts in your SSC briefcase from the favorites tab.
Download now (direct download link)

Process XML against XSL template and save output

By brazem,

Given SQL text (@sql_txt) that will return XML data, run that XML data against an XSL template (@xsl_file_nm), and save the output to the specified outputfile (@out_file_nm). If @xsl_file_nm is not specified, then output is just saved as XML.

This script is very usefull, but not secure. One could easily overload any of the script input parameters and compromise system security. you should'nt give anyone that does not normally have access to sp_OACreate access to this script.

The script is prefixed by sp_ so that we may place it master database and give certain of our "trusted" users access to it (regardless of database).

Feel free to change, but don't forget to mention its original author.

Total article views: 256 | Views in the last 30 days: 2
 
Related Articles
FORUM

Script/s to check backups of all accessible SQLServer - ???

Script/s to check backups of all accessible SQLServer - ???

FORUM

Monitoring script

script

FORUM

SSIS Accessing the properties of another Component from within a Script Component

SSIS Accessing the properties of another Component from within a Script Component

FORUM

Auditing Logins and Their Access

Looking for T-SQL scripts that will show logins, rights and database they have access too

Tags
 
Contribute

Join the most active online SQL Server Community

SQL knowledge, delivered daily, free:

Email address:  

You make SSC a better place

As a member of SQLServerCentral, you get free access to loads of fresh content: thousands of articles and SQL scripts, a library of free eBooks, a weekly database news roundup, a great Q & A platform… And it’s our huge, buzzing community of SQL Server Professionals that makes it such a success.

Join us!

Steve Jones
Editor, SQLServerCentral.com

Already a member? Jump in:

Email address:   Password:   Remember me: Forgotten your password?
Steve Jones