SqlShare.com Logo
 
Skip Navigation Links
Home
Video List
Events
Classes
About Us
Login / Register
Subscribe RSS Feed 

Takes Query Plan Analysis and Performance Monitoring to a New Level

Using the USE Statement

The USE statement allows us to easily change to a different database on a server. If you currently change databases by clicking the drop down list in SSMS, behind the scenes you're executing a USE statement. We'll show you a technique for making sure you're in the database you expect and if not, how to change to the correct database. We'll also show you how to change (or not) the default database for a login.

Duration:
3 mins 16 secs
Skill Level:
100
Rating:
4.10 out of 5
Publish Date:
November 15, 2010
Using the USE Statement You must be logged in to view this video.  
Bookmark and Share
 
1=Poor, 3=Good, 5=Excellent

About the Author

Image of Andy Warren
Andy Warren is a software trainer focusing on SQL Server, a member of the PASS Board of Directors, and a principal in this site - SQLShare.com.

References



Comments
Tim on 11/16/2010
really enjoyed it :)

peter nicolson on 11/16/2010
just good all round

Debasish Barik on 11/16/2010
@#

gregoryread on 11/16/2010
Thanks for showing us how to test things going wrong.

Nilesh on 11/16/2010
nice really like ur videos..keep it up.....

Jamshid Nouri on 11/17/2010
great short and effective demo

RAJKUMAR on 11/17/2010
NICE VIDEO

Alankar Chakravorty on 11/18/2010
Cool information

mark verret on 11/18/2010
Quick and to the point, great example.

Travis Smith on 11/19/2010
Was there a reson to use the IF DB_NAME() <> 'Master' instead of just using the USE Master?

Andy Warren on 11/20/2010
Travis, you're right that's not required, at worst it's an operation that does nothing. Wanted to show it conditional, should have done better at the alternative!

Larry Kinnicutt on 11/22/2010
Would have also like to see how to changes DB's for Linked DB's from a different Instance.

Steve Culshaw on 11/23/2010
Good concise overview of USE

Kat on 11/26/2010
Don't know where to post this. Regarding the videos that include a short quiz; the question page does not hold the scroll-down to let me access the buttons. I keep playing with different click/buttons until I finally get the page to submit. Is there some secret to getting the page to display the buttons?

Loren Scherbak on 12/2/2010
These videos have been really helpful and they are consistently excellent. Keep up the good work!

pradeep on 12/19/2010
Excellent

Maurice Ivory on 5/13/2011
Useful information....I will keep this as an reference.



Must Be Logged In
 

How Do I Become a Video Author? |  Newsletter History

Copyright © Fourdeuce, Inc., 2005-2009. All Rights Reserved | Privacy Policy | Terms & Conditions