Download presentation
Presentation is loading. Please wait.
Published byMaurice Lawrence Modified over 8 years ago
1
Making the GUI work for you Tibor Karaszi www.karaszi.com
2
Agenda Why GUI? … Why not? Tools history Mindset SSMS, the good, the bad and the ugly Command-line options Scripting, scripting, scripting… Multi-server query window Various tips
3
Why GUI? … Why not? Advantages –Do I look like I’m psychic? –Explore –One off –Quick and dirty –Speed Disadvantages –Exactly what did you do? –Trust / control issues –Do the same over many tables/databases/instances –Communication over forums –Bugs –Lack of consistency –Speed
4
Tools history Text –ISQL.EXE1.0 – 6.5 –OSQL.EXE7.0 - 2000 –SQLCMD.EXE2005 - now ? –SAF1.0 – 1.1 GUI –SQL Administrator / SQL Object Manager4.2x –Enterprise Manager 6.x6.5 –Enterprise Manager 7.0 / 20007.0 - 2000 –SQL Server Management Studio2005 - now T-SQL commands are much more stable than a GUI
5
Mindset Use what you like, ignore the rest Be lazy, … in a good way Don’t be afraid of T-SQL –For example to generate commands –You will pick up after a while T-SQL commands is not same as writing complex SQL queries –Same language, different sublanguages
6
SSMS, the good, the bad and the ugly The good –Been around for a while –Script what you do (more to come) –Intellisense The bad –Bugs (database reports, partitioning wiz, …) –Intellisense –New query window – what’s the context? The ugly –Re-connects – better now! –Table designer –Can’t make scripting not include square brackets, []
7
Command-line options SSMS, example – ssms.exe /S /d tempdb /nosplash Profiler – profiler.exe /S /E /T Windows, runas – runas /netonly /user: ssms.exe –Allow for Windows authentication through domain account without being in domain
8
Registered servers Use it Save the file, at any node –Export, Import Register same server several times, based on –Role (test, prod, …) –Version (2000, 2005, …) Central Management Server (CMS)
9
Scripting, scripting, scripting Script an action from within a dialog Script existing object Script a bunch of objects –Mark several in Object Explorer Details –Generate Scripts Wizard Script defaults in SSMS (Tools, Options)
10
Multi-server query window Added in SSMS 2008 Do not require CMS –The feature is often presented in conjuction with CMS This alone will get you use more T-SQL Consider server grouping in registered servers Never leave a MSQW open !!! Write queries to work on 2000 servers? Never leave a MSQW open !!!
11
Various tips Drag names from Object Explorer Reports window Object Exporer Details window –Configure columns Template Explorer Use catalog views Use Books Online (mark command, F1) Status bar color for registered server
12
Various tips Clear recently used servers, delete –C:\Users\ \AppData\Roaming\Microsoft\Microsoft SQL Server\100\Tools\Shell\SqlStudio.bin SSMS Tools Pack Customize toolbar –For instance remove the Debug button Shortcuts (Tools, Options, Environment, Keyboard) SQLCMD Mode (Query Menu)
13
Various tips Block mark text: Alt+ –Example with RESTORE [FILELISTONLY] Full screen: Shift-alt-enter Projects and solutions
14
THANK YOU! For attending this session and PASS SQLRally Nordic 2011, Stockholm
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.