Since the command line requires a lot of up-front knowledge, a graphical user interface provides a better onboarding experience for new users. In this video, learn how to get started with Management Studio and how to log into a local database server using both a Windows Authentication account and SQL Server’s system administrator account.
- [Instructor] So far, we've got the database engine for SQL Server installed, and we've installed our graphical command for working with the server, that's SQL Server Management Studio. So let's go ahead and login to the server and take a first look around. I'll come down here to my start menu, and I previously pinned the icon here for SQL Server Management Studio, so go ahead and click on that to start it up. Now, the first time you start up Management Studio, you might get a little window here that goes through some final preparation steps to get the program up and running, but eventually you'll be left with this connect to server window. For the server type, we have the option here of the database engine, which is what we're going to choose, reporting services, or integration services, Let's go ahead and leave this on database engine for now. For the server name, the first time you login, this is going to be blank. Go ahead and click on the drop-down menu over here on the far right hand side, and we're going to click on browse for more. on my local computer with this tab, or I can use this tab over here that says network servers to find SQL Server instances on my network. I'm going to switch back over here to local services and then expand the folder here for database engine and you should see the instance name For me, it's the name of my computer, WINDOWS10-PC, followed by a backslash, and then SQLSERVER2019. We'll go ahead and select it and press okay, and that'll get populated into the server name field. Once we've successfully logged in to the server, Management Studio is going to remember this name here, so we don't need to go through that process again, and we can just simply choose it from this drop-down list. I'll also point out for the server name, that instead of the name of the computer, we could specify the IP address of the computer, or if we're on a local machine, like I am, we can use the word local host here, That'll work as well. if you're on a local connection, SQL Server Database Engine running on the same computer that you're running Management Studio on. I'd prefer to include the full computer name, so I'm going to go with that option. Right now it's currently set to Windows authentication. When we installed SQL Server, we added our current Windows user account as an administrator. So by choosing Windows authentication, You'll notice that these two boxes are grayed out here. in order to login to my server instance. This'll give you access to settings that you probably won't need to change, Let's go ahead and collapse this again go ahead and press the connect button, and Management Studio will connect to your SQL Server instance, on the left hand side of the screen. This panel is called the object explorer window. This provides a tree view of all the contents we have security items, and so on. At the top is a line that shows what instance that we're currently looking at. Here we have the name of my computer, followed by the backslash, the name of the instance, the version of SQL Server that we're working with, and if I expand this window open just a little bit by clicking here and dragging to the right, we'll also see our current Windows login account information there. that we've been granting permissions through. multiple SQL Server instances at the same time, here inside of this window. You can even connect to the same instance At the top of the window, there's two buttons that look like electrical plugs. Click on the one on the left and that'll bring us back to the connect to server window. but I'm going to change the authentication mode from Windows authentication to SQL Server authentication. When we installed SQL Server, one of the options was to enable the system administrator account. This account's login credentials are stored on the server itself, so we'll need to provide a user name and password. when we installed SQL Server. If you've forgotten what password you chose, that's okay, we'll see how to reset it Once you've got those two pieces of information put in, go ahead and press the connect button again, and you'll see a new version of the SQL Server instance down below. So now, here, we're viewing the database through the perspective of the "S-A" account, and up above we're viewing the same server through the perspective of our current Windows account. In order to disconnect from an instance, go ahead and select the one you want to disconnect from, I'll choose the "S-A" account version, That'll remove it's details from the object explorer window. So that's how you login to SQL Server through Management Studio. If you're using Windows authentication, you'll need to supply a user name and password.
- Installing Management Studio
- Enabling features with SQL Server Configuration Monitor
- Creating a database
- Creating tables with Transact-SQL (T-SQL)
- Creating relationships between tables
- Creating views
- Creating user-defined scalar functions
- Backing up and restoring SQL Server
- Monitoring and management