Drop Down MenusCSS Drop Down MenuPure CSS Dropdown Menu

Sunday, 14 August 2016

Error while connecting to SQL Server


This blog is all about the problem that we faced after entering the correct credential and still we are not going to login/connect to our database.

In this blog, we are actually going to see what the error message says and possible solution for the network-related or instance-specific error.
 
Figure-1 Cannot connect to Server


But first we’ll go through what the error says-

You will find detailed information of error on the error window itself. Once you click the Copy message text button. I have copied mine database error to provide you some help. Try read it out.


Figure-2 Copy Error Information


TITLE: Connect to Server
------------------------------

Cannot connect to LENOVO-PC.

------------------------------
ADDITIONAL INFORMATION:

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 2)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&EvtSrc=MSSQLServer&EvtID=2&LinkId=20476

------------------------------

The system cannot find the file specified

------------------------------
BUTTONS:

OK
------------------------------


Solution

There are multiple reasons to get "network-related or instance-specific error", we have marked solution for every possible reason. Now, it’s you to find out which reason is responsible for your error window:

A) Reason 1: Make sure that you are providing correct credential.


Figure-3 Incorrect Login Credential


Just cross check, whether you are selecting/entering correct input
(i) Server Type like Database Engine/Analysis Services/Reporting Services/Integration Services.
(ii) Server Name like LENOVO-PC(mine) or some IP like xxx.xxx.xxx.xxx
(iii) Authentication mode like Windows/SQL Server.
(iv) Correct Login and Password. Also, check the Caps Lock Key and Num Lock Key of your keyword because it is CASE-SENSITIVE.


For any query, comment us below.

Previous - Top 10 Run Commands - #3
 
Next - Error while connecting to SQL Server #2

Related Questions: -


Q-1 Which of the following services does a MSSQLSERVER process have for Microsoft window service console?
I) Start Service
II) Stop Service
III) Pause Service
IV) Restart Service
V) Resume Service

Choose the correct option from below given alternatives:
A) I, II
B) I, II, IV
C) I, II, III, IV
D) I, II, III, IV, V
Ans- Option (C).
 



Click imagination hunt to read latest blogs.

Posted By - +Manish Kumar Gautam +LIVE VIAR +ASP.NET SOLUTIONS

Keep learning and sharing...
Read More »

Friday, 12 August 2016

Most commonly used SQL Server Data Types


In our previous blog, we have discussed about Flat Files. Giving a precise definition about Flat files:
Flat files are data files which give the table data. (Only Table Data Not Schema).

In this blog, we are going to discuss about the SQL Server Data Types.

Data Type: The term ‘Data Type’ describes what type of data a variable can hold. The type of data that a variable contains is called Data Type.

Note: In SQL Server, every variable and object must have a type.

Based on the variables storage characteristics in SQL Server, data types are categorized into 7 following types:
SQL Server Data Type
 
I. Exact Numeric Data Types: - are those that use integer data. An integer is a number with no fractional part; it can be positive, negative or zero.

II. Approximate Numeric Data Types: - are those that use floating point numeric data.

III. Date and Time Data Types: - are those that accept date and time values.

IV. Character Strings Data Type: - are string non-Unicode data type of either fixed length or variable length.

V. Unicode Character Strings Data Type: - are string Unicode data type of either fixed length or variable length.

VI. Binary Data Types: - are binary data type of either fixed length or variable length.

VII. Other Data Types: - remaining data type is counted in this category.


Note: You will find out how to use the data type while creating tables.

We are going to discuss every category in detail in our upcoming blogs. And how to use them with some real time practical examples.


Related Questions: -


Q-1 Which category does ‘nvarchar’ data type belongs to?
I) Character Strings Data Types
II) Unicode Character Strings Data Types
III) Binary Data Types
IV) Date and Time Data Types

Choose the correct option from below given alternatives:
A) Only I
B) Only II
C) II and III Both
D) I, III and IV
Ans- Option (B).
Explanation: ‘nvarchar’ belongs to Unicode Character Strings Data Types. It Unicode data and use the UNICODE UCS-2 character set.

Q-2 Which one of the following is invalid Date and Time Data Types?
A) getdate()
B) datetime
C) date
D) smalldatetime
Ans- Option(A).
Explanation: GETDATE() or getdate() is a non-deterministic function, which retrieves the current date and time based on the clock settings on the local system on which the instance of SQL Server is running.




Click imagination hunt to read latest blogs.

Posted By - +Manish Kumar Gautam +LIVE VIAR +ASP.NET SOLUTIONS

Keep learning and sharing...
Read More »

Featured post

Think that makes you rich and richer

 Napolean said: “You can think and grow rich, but if you can be brought up like most people with work and you won't starve, this wil...