SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Enterprise Manager Tricks


Enterprise Manager Tricks

Author
Message
sushila
sushila
SSCertifiable
SSCertifiable (6.4K reputation)SSCertifiable (6.4K reputation)SSCertifiable (6.4K reputation)SSCertifiable (6.4K reputation)SSCertifiable (6.4K reputation)SSCertifiable (6.4K reputation)SSCertifiable (6.4K reputation)SSCertifiable (6.4K reputation)

Group: General Forum Members
Points: 6361 Visits: 639
Comments posted to this topic are about the content posted at http://www.sqlservercentral.com/columnists/sarur/enterprisemanagertricks.asp







**ASCII stupid question, get a stupid ANSI !!!**
Jeff Moden
Jeff Moden
SSC Guru
SSC Guru (156K reputation)SSC Guru (156K reputation)SSC Guru (156K reputation)SSC Guru (156K reputation)SSC Guru (156K reputation)SSC Guru (156K reputation)SSC Guru (156K reputation)SSC Guru (156K reputation)

Group: General Forum Members
Points: 156263 Visits: 41784

Nice job Sushila.... I use EM to troubleshoot other people's more complex joins and, occasionally, to make my own. And, I "steal" code from it and QA quite a bit for the sake of speed as you suggested. You and Erik are correct... when I was a newbie and found out how to do those things, it was about as good as Christmas.

I've been busy enough where I haven't paid much attention to Yukon and was disappointed to hear (in your article) the EM is going away. Perhaps another article that compares some of the tools like EM between 2000 and Yukon would be worthwhile.

Thanks for the article and the forum answers you've posted. They help Newbies and Oldbies alike.



--Jeff Moden

RBAR is pronounced ree-bar and is a Modenism for Row-By-Agonizing-Row.
First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column.
If you think its expensive to hire a professional to do the job, wait until you hire an amateur. -- Red Adair

Helpful Links:
How to post code problems
How to post performance problems
Forum FAQs
philcart
philcart
SSCertifiable
SSCertifiable (7.2K reputation)SSCertifiable (7.2K reputation)SSCertifiable (7.2K reputation)SSCertifiable (7.2K reputation)SSCertifiable (7.2K reputation)SSCertifiable (7.2K reputation)SSCertifiable (7.2K reputation)SSCertifiable (7.2K reputation)

Group: General Forum Members
Points: 7187 Visits: 1441

Nice article, but you forgot to mention one trick, or should I say chore Refresh, refresh, refresh and if you still can't find what you're looking for, refresh again



Hope this helps
Phill Carter
--------------------
Colt 45 - the original point and click interface

Australian SQL Server User Groups - My profile
Phills Philosophies
Murrumbeena Cricket Club
Mike C
Mike C
SSCarpal Tunnel
SSCarpal Tunnel (4.9K reputation)SSCarpal Tunnel (4.9K reputation)SSCarpal Tunnel (4.9K reputation)SSCarpal Tunnel (4.9K reputation)SSCarpal Tunnel (4.9K reputation)SSCarpal Tunnel (4.9K reputation)SSCarpal Tunnel (4.9K reputation)SSCarpal Tunnel (4.9K reputation)

Group: General Forum Members
Points: 4855 Visits: 1172
Nice article. You might want to mention that EM should not be used to modify tables that are already populated. EM completely re-builds and re-populates the table from scratch for any modifications to it - even something as simple as adding a new column. Using T-SQL in QA will usually run several orders of magnitude faster, especially for tables with a lot of rows.
Richard Sisk
Richard Sisk
SSCrazy
SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)

Group: General Forum Members
Points: 2069 Visits: 210

I use EM for two functions that I do quite often, creating databases and scripting store procedures.

I know that it is fairly simple to create a db in TSQL, I just got in the habit of doing it through EM.

Scripting store procedures, on the other hand, is another story. I don't know of anyway to script a store procedure from TSQL, scripting it to the point of being able to cut/paste into QA to modify the procedure. sp_helptext does not help because it puts carriage returns in inappropriate places.

Is there a way to script a store procedure in TSQL?


philcart
philcart
SSCertifiable
SSCertifiable (7.2K reputation)SSCertifiable (7.2K reputation)SSCertifiable (7.2K reputation)SSCertifiable (7.2K reputation)SSCertifiable (7.2K reputation)SSCertifiable (7.2K reputation)SSCertifiable (7.2K reputation)SSCertifiable (7.2K reputation)

Group: General Forum Members
Points: 7187 Visits: 1441

Mike, you can add columns to a table in Enterprise Manager without too much fuss at all. Just add them at the end. Then EM will just use the sp_addcolumn stored procedure.

Also, if you are editing the structure of a populated table, then it's actually better to do it in Enterprise Manger, grab the change script, and close the design view without saving the changes. The reason for this is that Enterprise Manager will do a better job of scripting all the constraints that apply to the table.

Richard, you can script most things from the Object Browser in Query Analyzer. Just right-clcick the object and choose "Script to New Window as ..."

Just make sure you visit the Options before you do any scripting. Checking the "Include Object Permissions" is one that always catches me



Hope this helps
Phill Carter
--------------------
Colt 45 - the original point and click interface

Australian SQL Server User Groups - My profile
Phills Philosophies
Murrumbeena Cricket Club
sushila
sushila
SSCertifiable
SSCertifiable (6.4K reputation)SSCertifiable (6.4K reputation)SSCertifiable (6.4K reputation)SSCertifiable (6.4K reputation)SSCertifiable (6.4K reputation)SSCertifiable (6.4K reputation)SSCertifiable (6.4K reputation)SSCertifiable (6.4K reputation)

Group: General Forum Members
Points: 6361 Visits: 639
Richard - not sure about your scripting stored procedures question but there're several ways to do it:
1) In EM - use "All tasks" - "Generate Sql Script"....
2) In QA - use the object browser and "Script object to New Window As..."
3) Create a template & use it to modify & create new procedures.
Hope at least one of these methods has addressed your question.

Jeff - thanks for the kind words - find it difficult to believe that I could've helped any "oldbie" but will take your word for it!
Phill - thx. for drawing my attention to the non-mentioned trick -
Mike - Didn't know that EM does this - Think that with the expertise of all the articles you've written you're quick to find "missing links" and I'm grateful for your input.







**ASCII stupid question, get a stupid ANSI !!!**
homebrew01
homebrew01
SSCrazy Eights
SSCrazy Eights (8.5K reputation)SSCrazy Eights (8.5K reputation)SSCrazy Eights (8.5K reputation)SSCrazy Eights (8.5K reputation)SSCrazy Eights (8.5K reputation)SSCrazy Eights (8.5K reputation)SSCrazy Eights (8.5K reputation)SSCrazy Eights (8.5K reputation)

Group: General Forum Members
Points: 8519 Visits: 9207

I tried the link above, and got page not found ?? Did some pirates whisk it away somewhere ?

(edit) Found it by looking around a bit ....





sushila
sushila
SSCertifiable
SSCertifiable (6.4K reputation)SSCertifiable (6.4K reputation)SSCertifiable (6.4K reputation)SSCertifiable (6.4K reputation)SSCertifiable (6.4K reputation)SSCertifiable (6.4K reputation)SSCertifiable (6.4K reputation)SSCertifiable (6.4K reputation)

Group: General Forum Members
Points: 6361 Visits: 639
what link would that be hb01 ?!







**ASCII stupid question, get a stupid ANSI !!!**
homebrew01
homebrew01
SSCrazy Eights
SSCrazy Eights (8.5K reputation)SSCrazy Eights (8.5K reputation)SSCrazy Eights (8.5K reputation)SSCrazy Eights (8.5K reputation)SSCrazy Eights (8.5K reputation)SSCrazy Eights (8.5K reputation)SSCrazy Eights (8.5K reputation)SSCrazy Eights (8.5K reputation)

Group: General Forum Members
Points: 8519 Visits: 9207
Sorry I wasn't clear. I hadn't seen you EM Tricks article, so I tried clicking the link in your first post.



Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search