March 18, 2010 at 3:57 pm
JC-3113 (3/18/2010)
on Paul's i get an errorthe linked one works
how do i save it to a file ?
Thanks
Jim
I copy and paste the results. I have not played with other methods to automate the saving of it to file.
Jason...AKA CirqueDeSQLeil
_______________________________________________
I have given a name to my pain...MCM SQL Server, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw[/url]
Learn Extended Events
March 18, 2010 at 10:45 pm
JC-3113 (3/18/2010)
on Paul's i get an error
XML methods require that your session has SET QUOTED IDENTIFER ON.
Many features of SQL Server 2005 require specific settings (indexed views, for example).
Output to a file can be done directly from SSMS - choose output to file instead of output to text or grid.
The other way is to use SQLCMD mode in SSMS.
Paul White
SQLPerformance.com
SQLkiwi blog
@SQL_Kiwi
March 18, 2010 at 11:45 pm
Paul White NZ (3/18/2010)
JC-3113 (3/18/2010)
on Paul's i get an errorXML methods require that your session has SET QUOTED IDENTIFER ON.
Many features of SQL Server 2005 require specific settings (indexed views, for example).
Output to a file can be done directly from SSMS - choose output to file instead of output to text or grid.
The other way is to use SQLCMD mode in SSMS.
It has been a while since I needed to use this script but if memory serves,
I think I tried it that way with the ssms and it formatted it weird. It wouldn't load correctly as an html file.
However, I think I was able to get it to save correctly via the use of sqlcmd. I will have to go find my modified script.
Jason...AKA CirqueDeSQLeil
_______________________________________________
I have given a name to my pain...MCM SQL Server, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw[/url]
Learn Extended Events
March 19, 2010 at 5:15 am
Using sqlcmd mode in SSMS is as easy as turning it on (there's even a toolbar icon in SSMS 2005).
An example script producing a simple output can be found here:
http://msdn.microsoft.com/en-us/library/ms174187.aspx
Paul White
SQLPerformance.com
SQLkiwi blog
@SQL_Kiwi
March 19, 2010 at 2:49 pm
I am going to post a blog on what I did with this script.
I made a bunch of changes to suit my needs. Some of which include the output to file piece.
You can find it SQL RNNR (click the link in my sig).
Jason...AKA CirqueDeSQLeil
_______________________________________________
I have given a name to my pain...MCM SQL Server, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw[/url]
Learn Extended Events
March 19, 2010 at 9:33 pm
CirquedeSQLeil (3/19/2010)
I am going to post a blog on what I did with this script.
Good idea. Should be an interesting read.
Paul White
SQLPerformance.com
SQLkiwi blog
@SQL_Kiwi
March 19, 2010 at 11:54 pm
Paul White NZ (3/19/2010)
CirquedeSQLeil (3/19/2010)
I am going to post a blog on what I did with this script.Good idea. Should be an interesting read.
Blog is posted.
Jason...AKA CirqueDeSQLeil
_______________________________________________
I have given a name to my pain...MCM SQL Server, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw[/url]
Learn Extended Events
March 22, 2010 at 3:12 pm
Thanks Paul
I will try it out
Jim
March 22, 2010 at 3:12 pm
okay thanks
Jim
March 22, 2010 at 3:23 pm
You're welcome.
Jason...AKA CirqueDeSQLeil
_______________________________________________
I have given a name to my pain...MCM SQL Server, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw[/url]
Learn Extended Events
March 22, 2010 at 3:28 pm
Here is one quick way:
sqlcmd -Q "exec spAuditUsersPermissions" -o c:\temp\SecurityReport.html
Jim
March 22, 2010 at 3:31 pm
JC-3113 (3/22/2010)
Here is one quick way:sqlcmd -Q "exec spAuditUsersPermissions" -o c:\temp\SecurityReport.html
Jim
Thanks
Jason...AKA CirqueDeSQLeil
_______________________________________________
I have given a name to my pain...MCM SQL Server, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw[/url]
Learn Extended Events
Viewing 12 posts - 16 through 26 (of 26 total)
You must be logged in to reply to this topic. Login to reply