How to connect Sql Database with Sql Server Management Studio ?

Introduction:

In this article, we going to learn about, How to connect Sql Database Server? using SSMS (Sql Server Management Studio.) and How you can select or change database in SSMS using t-Sql.

Sql Server Management Studio:


Microsoft provides an application software called Sql Server Management Studio (SSMS), Which is an interface to connect Sql Server Database and execute t-sql commands and Queries to manage and manipulate data in database with in Sql Server.

To connect Sql Server with Database on any server on local host or local network or other network globally. you must have installed Sql Server Management Studio on your computer. You must have Server Name for local Host or Local Network or IP Address for LAN OR WAN (Remote Server) with user Credentials like Username and password.

Find Microsoft Management Studio Under Programs List in computer. or Open run by Window+R key combination and Type SSMS, press OK.

It will display dialogue box and prompt for following six inputs.

1). Server Type : Select Database Engine.

2). Server Name : Type Server Name or IP Address in case of Server location on LAN or Internet.

3). Authentication : You can only select Windows Authentication in case of, if you local computer computer serve as SQL Server itself. Select SQL Server Authentication for any case if you have server credentials.

4). Username : Type Username here provided by Sql Server Authorized person. Most common user name is sa (system administrator) by default.

5). Password : Type Password here proceeded by Sql Server Administrator.

6). Remember Password: Check Remember Password if you want to get rid off typing credentials every time for make connection.

Click on Connect.

Tips: By default four System databases i.e. master, Model, msdb and tempdb created already and master database will be connected automatically. You must need to change or select working database.

Sql USE Statement:

You can change or select database after connection by USE Statement of Sql Server.

Syntax:

USE database_name

Arguments:

database_name: database_name identified as database with in the SQL Server.

Sql USE Example:

Following example will select default database Master SWCDB

--selecting SWCDB as a working database
USE SWCDB
Go

If you have any query or question or topic on which, we might have to write an article for your interest or any kind of suggestion regarding this post, Just feel free to write us, by hit add comment button below or contact via Contact Us form.


Your feedback and suggestions will be highly appreciated. Also try to leave comments from your valid verified email account, so that we can respond you quickly.

 
 

{{c.Content}}

Comment By: {{c.Author}}  On:   {{c.CreatedDate|date:'dd/MM/yyyy'}} / Reply


Categories