SQLServer Error: 18546 - SQLState 28000 - sql-server

I have a 3-level application running. WebServer IIS7.5 and SQLServer 2008 R2 Express Database and OS WinServer 2008 WebEdition.
When I try to connect via ODBC from a PC on the network have this error.
Remote connections with MSSM (Microsoft SqlServer Managemet Studio) work properly.
I want to use this ODBC to connect Hyperion to SQLServer
Can you help me?

I resolve to enable TCP/IP service in SQL Server Configuration Manager.
After this , if problem persist disable firewall on private/domestic net and try again.

Related

How to connect to Microsoft SQL Server on a local VM?

I have a Windows 10 VM with SQL Server installed on it. I made sure, that in the Sql Server Configuration Manager the SQL Server Browser is running and the TCP/IP protocol is enabled.
I'm trying to connect to the server with Entity Framework (although I'm not sure if it's relevant) and I'm getting this error:
Cannot connect to SQL Server Browser. Ensure SQL Server Browser has been started.
That's the connection string that I'm using:
Integrated Security=SSPI; Persist Security Info=False; Initial Catalog=<database name>; Data Source=<server name>

SQL Server always Stopped

While connecting to SQL Server 2012, I am getting the following error.
An error has occurred while establishing a connection to the server. When connecting to SQL Server 2012, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (Provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 2)
Here is what I did:
I installed SQL Server Management Studio normally but I can't get the server running. How do I set SQL Server correctly the first time?
I want to be able to install this server in my desktop locally and connect to it using Microsoft SQL Server. Any help would be appreciated. Thank you.
Screenshot of my server status as of now
SQLServer start - Log on as LocalSystem
You can try to replace the system databases with you system databases from somewhere else. If not, you can control the firewall.
If you are connecting from the remote server, you check this are.
From the section SQL Server Network Configuration;
TCP/IP Port : 1433 , Named Pipes : Enabled and restart SQLServer

Cannot connect to SQL Server via TCP/IP from SQL Server Management Studio

Software:
Windows 2012 server R2
SQL Server express (64 bit), installed by choosing all defaults
SQL Server 2014 Management Studio, installed on the same machine
When I connect from SQL Server Management Studio to SQL Server, it works fine as long as I have "Network protocol" on the connection tab set to <default>.
When I set the protocol to TCP/IP, the connection fails:
A network related error ... The server was not found or was not accessible...
I checked with the SQL Server Configuration Manager that TCP/IP is enabled on the server as well as on the client. I can't find help from Google.
One observation: after the installation, the SQL Server Configuration Manager would not come up (Configuration Manager Cannot Connect To WMI Provider). I followed this advise (https://www.youtube.com/watch?v=igl-CB0qP_c) and got it to work.
I am unable to post a comment due to reputation score so I had to post an answer.
Some things to try/check:
Start the SQL Browser Service if it is not running
Check the SQL Error Log to ensure it is running on port 1433
Are you connecting to servername\SQLEXPRESS in the connection dialog
Try telnet to connect telnet servername port
if it goes to a blank screen instead of giving you a failure to connect then it is communicating. Ctrl + ] to cancel the connection.

Setting up/troubleshooting ODBC connection for SQL Server 2014

I've set up ODBC connections to databases before, but I'm currently having problems and can't seem to figure out what I'm missing. This isn't my area of expertise, and the Microsoft help/documentation is less than 'user friendly'. Appreciate any pointers.
I have a locally running instance of SQL Server 2014, with a couple of test databases I'm using to develop another application. Here's the info on the setup:
SELECT HOST_NAME() AS 'host_name()',
##servername AS 'ServerName\InstanceName',
SERVERPROPERTY('servername') AS 'ServerName',
SERVERPROPERTY('machinename') AS 'Windows_Name',
SERVERPROPERTY('ComputerNamePhysicalNetBIOS') AS 'NetBIOS_Name',
SERVERPROPERTY('instanceName') AS 'InstanceName',
SERVERPROPERTY('IsClustered') AS 'IsClustered'
query returns:
host_name() ServerName\InstanceName ServerName Windows_Name NetBIOS_Name InstanceName IsClustered
DECATHLETE DECATHLETE\SQLEXPRESS DECATHLETE\SQLEXPRESS DECATHLETE DECATHLETE SQLEXPRESS 0
In the Windows ODBC Data Source Administrator (64-bit) - I'm running W10 in a VMWare VM on Mac, btw - the server shows up as available when I try to configure a new System DSN. Following is the setup info:
Microsoft ODBC Driver for SQL Server Version 12.00.2000
Data Source Name: TEST
Data Source Description:
Server: DECATHLETE
Use Integrated Security: Yes
Database: (Default)
Language: (Default)
Data Encryption: No
Trust Server Certificate: No
Multiple Active Result Sets(MARS): No
Translate Character Data: Yes
Log Long Running Queries: No
Log Driver Statistics: No
Use Regional Settings: No
Use ANSI Quoted Identifiers: Yes
Use ANSI Null, Paddings and Warnings: Yes
Testing connectivity generates the following error message:
Microsoft ODBC Driver for SQL Server Version 12.00.2000
Running connectivity tests...
Attempting connection
[Microsoft][ODBC Driver 11 for SQL Server]Named Pipes Provider: Could not open a connection to SQL Server [2].
[Microsoft][ODBC Driver 11 for SQL Server]Login timeout expired
[Microsoft][ODBC Driver 11 for SQL Server]A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online.
TESTS FAILED!
I've confirmed access to the databases from SQL Server Management Studio. The login uses windows authentication with no password. I can get in, play with databases, run queries, etc. (See picture below).
I'm at a loss. I'd previously created ODBC connections with no problems. This seems to have cropped up as an issue since upgrading the virtual machine from W7 to W10. Hoping someone can point out an obvious oversight.
* Update *
Adding a screenshot of the ODBC configuration wizard below. Note that the SQL Server is showing up in the list of available servers on the wizard. So it seems to be seeing the server but failing to connect to it.
In the "Create a New Data Source to SQL Server" dialog/window, the incorrect "Server name:" is specified. Since you have a named instance of SQL Server, type in the name of the SQL Server host, a backslash, and the instance name. Here is the format: SQLHostName\SQLInstanceName.
Please check, whether you're allowing remote connections to the SQL Server using the 'Microsoft Sql Server 2014\Configuration Tools\Sql Server Configuration Tool' utility.
Go to Sql Server Network Configuration and make sure you allow TCP/IP for remote connections.
Also I'd try to play with Windows Firewall on the Sql Server PC.
I've been searching for a solution to this issue for a while now. I am trying to link SQL tables on another server to a Microsoft Access front end to make use of the Forms for data entry etc.
The comments here solved the issue and I thought I would provide a consolidated solution for clarity:
From the SQL Server Connection Manager:
Enable SQL Server Browser
From 'SQL Server Services', modify the Properties of the 'SQL Server Browser' and set the 'Start Mode' to 'Automatic'. Apply the changes and exit.
Start the 'SQL Server Browser'.
Enable TCP/IP
From 'SQL Server Network Configuration' -> 'Protocols for [your server name]', then enable TCP/IP.
Then create an ODBC connection from your local computer. From there I used the named ODBC connection in access to link the tables I needed.

Can connect to SQL Server 2012 but not 2008 r2

I'm not a full-stacker, so forgive me in advance.
I'm trying to connect to a SQL Server 2008 R2 database from a Linux based server (via PHP mssql_connect). I am unable to do so.
The Error we get is: Connection timed out.
We are able to successfully connect to the SQL Server 2008 r2 from a Windows based server using sqlrv.
I'm able to successfully connect to a SQL Server 2012 database (hosted on Arvixe).
We have FreeTDS installed on our server. The mssql module installed and the database credentials added to our freetds.conf -- but still unable to connect.
We've also been whitelisted to access the database.
Is there anything we are missing? Your help is greatly appreciated.
There was a missing IP address from the whitelist. The IP address of the server AND the website needed to be whitelisted.
Also, these IP addresses needed to be allowed to make a remote connection over port 1433 to the database we were attempting to connect to.

Resources