February 20, 2011 at 5:43 pm
As a dba, do you prefer to use sms GUI or use sql command to do daily dba jobs?
What are mostly used SQL commands for DBAs, any articles specific about this?
Thanks
February 20, 2011 at 6:42 pm
Preference over GUI or using commands: There are some task that using the GUI is just more effecient, with the exception of needing to do something across multiple instances/servers. You would get into T-SQL stuff when you start troubleshooting performance issues. There is no real GUI interface in SSMS to get at the DMV data, you pretty much have to query them in some manner. You can get 3rd party tools that will collect this information and put it on nice reports and such.
I think most common commands people should know and be familar with are DBCC CHECKDB followed by BACKUP DATABASE commands. I use CREATE DATABASE every now and then to get a quick test database to play with up but will also use the GUI sometimes as well. I'm familar with the syntax but just can't bringing it to memory every time. By the time I look it up I could have just created with the GUI. So it boils down to how much time you have and if the task is going to be repetative or not.
IMHO 😀
Shawn Melton
Twitter: @wsmelton
Blog: wsmelton.github.com
Github: wsmelton
February 20, 2011 at 8:54 pm
I write a lot more TSQL than I click on the GUI. I mainly use the object explorer window to keep track of all the tables & columns, but other than that, I type a lot. Of course, it helps that I've been using Red Gate SQL Prompt for years (and I'd say that even if I didn't work for them).
I just find that I can put together tables, drop objects, backup or restore databases faster by using TSQL.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
February 21, 2011 at 12:29 am
I write a lot of t-sql and use XDetails (www.sqlxdetails.com) to look-up tables and columns.
February 21, 2011 at 12:50 am
It depends 😉
For investigation / development I use SSMS and TSQL.
I have a script library which I built over time, so starting from there I'm fairly at ease.
With SSMS being able to generate most of the sql it would use, that is also a starting point.
In many cases, I have SSMS generate the script of what it would do and I execute that script in a sql panel because SSMS has stricter timeouts.
I use SQLAgent / SQLCMD with sqlscripts for scheduled followup.
I use SQLCMD (from my laptop) for inventory purposes.
However, there are also very nice tools on the market, especially for system operations managers, to keep track of what's going on, where it hurts, ....
Redgate, Quest, ... have great tools. But it needs an extra budget.
From a change management point of view, these companies also have very good supporting tools.
Do you really need these extra tools ? No, but they will prevent you from overlooking small or big details and will save you prep. time and give you more upgrade stability !
Can your company afford you having a little flaw ?
Johan
Learn to play, play to learn !
Dont drive faster than your guardian angel can fly ...
but keeping both feet on the ground wont get you anywhere :w00t:
- How to post Performance Problems
- How to post data/code to get the best help[/url]
- How to prevent a sore throat after hours of presenting ppt
press F1 for solution, press shift+F1 for urgent solution 😀
Need a bit of Powershell? How about this
Who am I ? Sometimes this is me but most of the time this is me
February 21, 2011 at 4:15 am
'A Real RockNRolla uses T-sql'.
Carlton.
February 21, 2011 at 5:49 am
As a rule, I never perform actions from the GUI. The most I do is use it to generate T-SQL for efficiency. You'll find that management studio performs a lot of un-needed/undesired steps if you let it have complete freedom.
Try altering a login mapping to a database and its objects and you'll see it ALTER the login's default language! Try adding a column to a table, creating an index or publishing a new article in replication. You'll find they may have undesired effects on your production environment.
Keep it simple and scripted.
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply