Start learning with our library of video tutorials taught by experts. Get started
Viewers: in countries Watching now:
In SQL Server 2008 Essential Training, Simon Allardice explores all the major features of SQL Server 2008 R2, beginning with core concepts: installing, planning, and building a first database. Explore how Transact-SQL is used to retrieve, update, and insert information, and gain insight into how to effectively administer databases. The course also covers features outside SQL Server's database engine, including technologies that have grown up around it: SQL Server Reporting Services and Integration Services. Exercise files are included with the course.
When you first begin working with SQL Server Management Studio, a lot of people do write queries. That's how they're getting to grips with the database and with SQL. Some folks can get a little frustrated by the fact that when you reopen Management Studio and click New Query, you will find this drop-down list of the default database often shifts back to whatever it was. Meaning that you have to remember to change it or to write the word USE AdventureWorksLT for example, or to include the name of the database in your SQL statement.
And that can be a little annoying. Now what a lot of people try and do is they say, okay, if it keeps coming up with master or a different database, they go and look in say Tools > Options and they try and find some setting in SQL Server Management Studio where this is controlled. And they won't find one. So sometimes they give up and say, well, it's always going to be master or it's always going to be a particular database. Well, really, this setting has not a lot to do with SQL Server Management Studio and more to do with how you are logged on to this database instance, because every user has their own identity in SQL Server.
If I expand the Security folder, the one right of the top here, I am going to expand Logins and find myself listed here. This is all the information about me as a user logged on to SQL Server. I right-click and select Properties. What I will find is that I have a default database. And what's happening is Management Studio is just reading my settings. What I need to do is change this to, for example, AdventureWorksLT, click OK, and now if I close down Management Studio and a little later or the next day I reopen it, I connect to that instance, and I say I want to make a new query, it's going to read my data, say what is your default database, and that's what will show up in this drop-down list.
So, you might find that convenient from time to time. Though do bear in mind that every different user has a different default database and if somebody else has a different one from you, you might not necessarily just be able to copy and paste them SQL in an email and have it work. But this makes it a bit more convenient than remembering to type the name of the database all the time in your SQL.
Find answers to the most frequently asked questions about SQL Server 2008 Essential Training.
Here are the FAQs that matched your search "":
Sorry, there are no matches for your search ""—to search again, type in another word or phrase and click search.
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.