Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
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: 263 | 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