Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Save SSMS Query Results Options Expand / Collapse
Author
Message
Posted Friday, January 31, 2014 9:45 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Tuesday, August 12, 2014 8:03 AM
Points: 46, Visits: 238
I have a report to run every day in SSMS. I have selected query options to send results to a file with pipe delimited results. Tomorrow, I don't want to recreated the result options. I would prefer that it be remembered - preferably as a login-specific profile setting. That way I can use that id to log in for those options and that report. No rework to do. Then, if I want to do more work in SSMS, I can log in as another id and have the normal default results-to-grid options.

My question is: Is this possible? I am not interested in SSIS package or other query-running options. I am interested in this specific question regarding the saving Results-to options from SSMS session to SSMS session.
Post #1536869
Posted Friday, January 31, 2014 9:59 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 3:13 PM
Points: 13,282, Visits: 12,116
hayden_jones (1/31/2014)
I have a report to run every day in SSMS. I have selected query options to send results to a file with pipe delimited results. Tomorrow, I don't want to recreated the result options. I would prefer that it be remembered - preferably as a login-specific profile setting. That way I can use that id to log in for those options and that report. No rework to do. Then, if I want to do more work in SSMS, I can log in as another id and have the normal default results-to-grid options.

My question is: Is this possible? I am not interested in SSIS package or other query-running options. I am interested in this specific question regarding the saving Results-to options from SSMS session to SSMS session.


Those are application settings. They are not tied to a given sql login. You could probably setup a different windows user on that machine. I am not 100% certain if those settings are maintained per user. If that doesn't work I am not sure what you could do because afaik there isn't a way to script those settings.


_______________________________________________________________

Need help? Help us help you.

Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

Need to split a string? Try Jeff Moden's splitter.

Cross Tabs and Pivots, Part 1 – Converting Rows to Columns
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs
Understanding and Using APPLY (Part 1)
Understanding and Using APPLY (Part 2)
Post #1536874
Posted Friday, January 31, 2014 9:59 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 1:24 PM
Points: 12,906, Visits: 31,984
hayden_jones (1/31/2014)
I have a report to run every day in SSMS. I have selected query options to send results to a file with pipe delimited results. Tomorrow, I don't want to recreated the result options. I would prefer that it be remembered - preferably as a login-specific profile setting. That way I can use that id to log in for those options and that report. No rework to do. Then, if I want to do more work in SSMS, I can log in as another id and have the normal default results-to-grid options.

My question is: Is this possible? I am not interested in SSIS package or other query-running options. I am interested in this specific question regarding the saving Results-to options from SSMS session to SSMS session.


for SQL2008, i beleive that setting is saved in your %appdata%\Roaming\Microsoft\Microsoft SQL Server\100\Tools\Shell\SQLStudio.bin file, which a per-windows login basis.

to have multiple settings, you'd have to set your settings, save that file separately, and swap the file in and out , say with a cmd file, when you want/don't want the saved settings you are guarding.


Lowell

--There is no spoon, and there's no default ORDER BY in sql server either.
Actually, Common Sense is so rare, it should be considered a Superpower. --my son
Post #1536875
Posted Friday, January 31, 2014 10:12 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Tuesday, August 12, 2014 8:03 AM
Points: 46, Visits: 238
As far as I can see, the results-to settings are not saved even for the same windows login.

I log in to windows as DOMAINA.userA and open SSMS using Windows Auth, set results-to options, run a query. All works fine.
I close SSMS.
I open SSMS using Windows Auth.
I run the query and get grid results.

Is there a way to get results to a file by default after logging back in?
The settings do not seem to be saved in any Windows User profile.
Post #1536879
Posted Friday, January 31, 2014 12:06 PM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 3:13 PM
Points: 13,282, Visits: 12,116
hayden_jones (1/31/2014)
As far as I can see, the results-to settings are not saved even for the same windows login.

I log in to windows as DOMAINA.userA and open SSMS using Windows Auth, set results-to options, run a query. All works fine.
I close SSMS.
I open SSMS using Windows Auth.
I run the query and get grid results.

Is there a way to get results to a file by default after logging back in?
The settings do not seem to be saved in any Windows User profile.


You can change the default destination for query results.

Tools -> Options -> Query Results -> Default destination for results

There is also a keyboard shortcut to change your current setting. ctrl+shift+f


_______________________________________________________________

Need help? Help us help you.

Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

Need to split a string? Try Jeff Moden's splitter.

Cross Tabs and Pivots, Part 1 – Converting Rows to Columns
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs
Understanding and Using APPLY (Part 1)
Understanding and Using APPLY (Part 2)
Post #1536925
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse