Can't connect to sql server from lan computer using windows authentication - sql

This is the thing, I have a server working perfectly allowing LAN connections, now im setting up a second one for maintenance purposes, but for some reasons I can't connect to him using windows authenticacion, but I still can to the first one, or using sql server login but I dont what to, I want to use Windows Authenticacion... I keep getting error message:
login failed for user "the user is not associated with a trusted SQL connection. (microsoft sql server, error:18452)
UPDATE: Both servers are running under Windows 7 (they are not for buissness use) they both are configure exactly equal.
UPDATE 2: I can connect from the same computer but not from a network one.

After few time, I realize the problem was at the layer eight (me), the best way to use windows authentication for SQL server is configuring a domain server, then add those domains users to sql and give them the desired privileges to connect to a database, and that' all it's that simple (at least for me it was) so after that, I created a System DSN Connection using windows authentication.

Related

ODBC Connection from Domain Win 7 Client to Server 2012

Trying to setup an ODBC connection for UPS to access our SQL server, from our shipping client computer.
I have scoured as much as I can an ran across:
runas /netonly /user:domain\account "c:\windows\system32\odbcad32.exe"
Now, using this method, on my current client computer, I was able to setup an odbc connection successfully using SQL Native Client 11 (5058). I am using Win 10. Our shipping computer, with multiple manifest systems on it, is still using Win 7, but otherwise is setup the same on the domain.
Using the same process as above, the connection ultimately times out, and states that the server is not online/not available/not allowing remote connections.
Is there a step I'm missing? Both clients have same rules for firewall, both are using the same user/password in the runas cmd. The only difference between the two clients is Win 10 vs. Win 7, and the current logged in user is different (but that shouldn't matter with the runas cmd?)
Thanks!
So after several days/hours of trying various solutions and suggestions from all over the interwebs, I came across this solution/tips.
In SQL Server Configuration, checking the network configuration protocols/clients/aliases. In my case, there was an aliases established for 32-bit, and not 64-bit. I disabled the 32-bit one.
I then found suggestions to us the ip (which I had tried in the past, with no success), but this time, after ensuring all the tcp/ip protocols were enabled and the 32-bit aliases was disabled, I was able to connect the 32-bit to the 64-bit SQL server, using the xxx.xxx.xxx.xxx address of the server.
Test came back successful!

Windows Service not connecting to SQL Anywhere DB

I had built an application to connect to MySQL DB and SyBase - SQL Anywhere DB using VB.NET and appropriate ODBC connections. This was working fine until we had to make this application a service which keeps running in the background irrespective of any users logged in.
I built the application into a service and after installation, the service was able to successfully connect to MySQL DB, but I am getting the following error when connecting to SyBase (please note the connection string is exactly same as used in the application)
ERROR [08001] [Sybase][ODBC Driver][SQL Anywhere]Database server not found
The project installer - service process installer 1 is configured as localsystem.
The creepiest thing here is, mysql connection is successful, when the same application was not a service, connecting to sybase was successful. Once it was made into a service it started failing. I have a Windows 7 64-bit workstation and VS 2010.
I have been trying to do every single thing for the last one week to fix it but nothing seems to be working. Any advice would be highly appreciated.
Looks like you are using a DSN to connect to SQL Anywhere.
First, make sure that you have configured it as a System DSN. Then, verify that you are using a TCP/IP connection protocol (ODBC Admin -> Select System DSN tab -> Select DSN in list -> Click Configure -> Goto Network tab) and NOT Shared Memory.
Using Shared Memory will NOT work from a Win Service that tries to connect to a SQL Anywhere DB Server.
I suspect that is the issue since you are able to connect from a desktop app using the same connection string.
One way to make this work is to start your SQL Anywhere db as a network server (Start -> All Programs -> Sql Anywhere 12 (or 11, depending on your setup) -> SQL Anywhere -> Network Server.
That should run the dbsvr12.exe, which will start listening for connections on a TCP port.
Then, add a Links=tcpip, or a Host=localhost to your Win Service connection string and give that a try!
Take notice that simple win app is running with credentials from logged user, while windows service is running on system account (in your case). You have two options, change connection string to connect with specific user (if you are now using trusted connection) or change windows service logon user to your user.

Remote connection to SQL Server

I am new to SQL server, I want to connect my SQL Server(Management Studio) to a network SQL Server, How can I do that??
Enter your server, username, and password.
You can use windows authentication etc. What in particular are you finding hard about connecting to your particular server?
When you open the management studio, it should have a spot to specify the hostname and credentials you want to connect with. Just enter the remote server name and credentials to connect with and that should be it (assuming the remote server allows remote connections).
Since you want use the Network Server, You need to check 2 things for Windows Authentication you need to have the access to the remote machine means you should be able to connect remotely using mstsc command. And the second if you are using SQL server authentication then check the functional id which you are using is correct or not. If this 2 things satisfy you can connect any remote server from your machine.

SQL Server fails to connect to database on client

I have installed SQL Server 2008 R2 Express on a Windows Server 2008 R2 machine, and now when I want to open that database using SQL Server Management Studio on the client machine it fails to open.
But the database opens normally on the server.
The owner of the database is sa and on client I am logged in with windows authentication.
How to resolve this error??
the server priciple smtech/prabhu is not able to access the database
the user is of client under the server domain
I suggest making sure that the account you are trying to connect with actually has access.
Log onto the server, open up management studio, look in object explorer. There should be a Security folder icon in the treeview, Expand that and the Logins folder.
If the user you are trying to connect with isnt present you may need to add it.
Other than this instead of connecting with windows authentication maybe try connect with SQL Server Authentication as the SA user?
Is both Client and DB sever are on SAME domain ?? If not, then I think Windows Authentication will not work for you.
(As already suggested in above answer) create a SQL Login try with to connect DB from Client using that Login.
If both machine are on same domain and still you are not able to connect server, then few things you can check,
Can your client actually "see" this server over network ??
Most common reason is firewall. By default SQL Server communicates from port 1433 and 1434. Try to see if this MSDN link helps
Make sure that your SQL Server instance is configured to communicate using TCP/IP. This can be configured from SQL Server Configuration Manager.

Using MS Access 2003 to connect to SQL Server 2005

My dad built an MS Access Database to do property management. Now he wants to share it with other users over the internet. So I got a hosted SQL Server account at Network Solutions. Now I'm trying to connect the Access 2003 client to a test SQL database using these guidelines from MS:
http://office.microsoft.com/en-us/access/HP052745861033.aspx
However, the error message I get is "Connection Failed because of an error initializing the provider. Server does not exist or access is denied".
I've run the MSComponentChecker to make sure I have MDAC 2.7 or above. Mine is 2.8 SP1 on XP.
It sounds like either:
(1) your workstation is unable to connect to the SQL server instance because
(a) the hostname isn't resolving correctly
or
(b) a firewall in your network or on your workstation is preventing the outbound connection on the needed port
or
(2) you can connect and have the correct username and password but don't have sufficient privileges to get to the database you're attempting to use. Access gives a different error than what you received if you have a bad username or password ("Login failed for user 'xxxx').
You can check the networking by running "telnet example.com 1433" (whatever hostname and port you were given to use; if you weren't given a port, use 1433) and making sure you can connect (the command window will go to a blank screen). If that works, you can then confirm with your provider that the account you're using has been granted the needed permissions. If you can't telnet to the address you need, check you have the right hostname and the existence of any firewalls.
After a little more research, I figured it out.
In MS Access 2003, you have to enter the server name in this format:
serverName\instanceName,portNumber
This is a BackSlash, not a ForwardSlash. Thank you MS.
Not sure why I had to specify the port number when it's the default.
Special thanks to this post:
http://dbaspot.com/forums/sqlserver-server/251219-error-connecting-remote-server.html
It should be noted that you can't do much design work in Access 2003 once you are connected. So I needed to upgrade to 2007 to change the SQL schema. Hopefully, 2003 users will still be able to connect and use the app.