Sunday, September 15, 2024

A network-related or instance-specefic error occured in sql server

Tags

 While trying to connect to SQL Server many of us must have faced an error "A network-related or instance-specific error occurred". So, we will be learning how to solve this problem in this article.





This issue is seen when SQL server running in background (service) is stopped.



See red circle, there is nothing in status. It means the service is stopped.

In above figure, see red mark at left side, you can see start the service. Just click that start and the service starts running and the problem will be solved.

Alternatively, you can right click on highlighted line (SQL Server) and then click start.

Depending on the version you installed, displayed option might be different.

How to create database in SQL server?

 In this article, we will discuss two ways of creating database in SQL Server.

1) from GUI (graphical user interface)

2) from query 


1) GUI method

First of all, right click on databases as shown in figure and then option pops up. Click on "New Database" as shown below.


A new window is seen now as shown below:


Provide Name of database and then click OK. 

Now, your new database is created.


2) Using query



Click in "New Query". A new query analyzer will be displayed.

Type the following query in query analyzer

CREATE DATABASE YourDatabaseName;






Click Execute (or press F5) to run the query. Database will be created.




























Create Table in Sql using Select Statement

In SQL Server, one can create a table using SELECT statement. Let's learn how we do it. Let's take a scenario where you are ordering...