How can I use an Active Directory login in Microsoft Access linked to SQL Server? - sql-server

We have a client who uses MS Access to manipulate data in their SQL Server DB. I know that we can set up SQL Server to authenticate using Active Directory. If we set this up, can they use their AD logins to connect to SQL Server through Access? How?
I tried Googling this, but to no avail. Any links or direction would be much appreciated. Thank you.
Also, please direct me to the correct place, if I should ask this question elsewhere.

Yes this should be pretty straight forward. You can use Windows Authentication to connect to sql server.
When establishing ODBC connection from your Client, The Wizard for connection configuration to SQL Server takes you to a page which gives you options to choose how you want to connect to SQL SERVER. There you can choose to use Windows Authentication or SQL Server Authentication. You can choose the Windows Authentication Option.
Now when a client tries to connect to the SQL Server their windows credentials will be used to authenticate the user. And obviously if they are on a network their AD Account will Authenticate them.
See below a snapshot from ODBC Data Source Administrator wizard when configuring connection to sql server.

Related

Connection issues when trying to connect to a SQL Server database

I'm trying to connect to a remote SQL Server database. It's being hosted on another server within the network at my workplace, but I keep getting an error when trying to connect while being logged in under a specific Windows (AD) account.
I'm using SQL Server Management Studio from my local server. I tried logging in with account "x". When specifying the connection string I'm using a SQL Server authenticated user. This is when I get the error below:
I logged in with a different account "y" to the server and attempted the database connection again (with the same SQL Server authenticated user), and it worked.
Why would I be able to connect under one Windows account and not the other (from the same server) when I'm trying to connect with a SQL Server authenticated user?
Could this be that the Windows account is not part of the correct administrator group?
Any thoughts or insights are appreciated.
Thank you,

Problems with connecting to SQL Server instance on multiinstance computer

I have a computer with several SQL Server instances installed - 2008, 2012 and 2016. From this computer there is no problem to connect to any of them using Windows Authentication.
Now I try to connect to the SQL Server 2016 instance from another computer. On the server computer I've created the appropriate Windows user and SQL Server login. But when I try to connect to this instance from the different computer, the login fails.
Finally I've managed to connect to SQL Server 2016 database engine using following server name:
TCP:ALEXMWIN81,49602
But when I try to connect to the SQL Server 2016 Analysis Services, the login again fails.
Can anybody give some advice on how to connect? All instances are very important and re-installation is a problem.
Thanks in advance. Alexander Mitchenko
When you say
On the server computer I've created the appropriate Windows user and SQL Server login.
This makes it sound like you are creating a local windows login on the server machine. It should be noted that in order to use Windows authentication both your connecting machine and the server need to be on the same domain.
Creating a SQL login is a separate authentication process called "SQL Server Authentication". When you use this methodology you connect with a username and password only. For this process you would connect by putting the login credentials into a connection string.
Do you have multiple domains? This can cause problems.
Cross Domain SQL Server Logins Using Windows Authentication
Does the SQL instance expose all the required ports to the internal network?
https://msdn.microsoft.com/en-us/library/cc646023.aspx
Is the server running a Windows Firewall?
What software are you connecting from?

SQL Server 2008 Linked Server Security

From server1, I've created a connection to a remote server (server2) with the Linked Server facilities. Both servers are on the same domain. When I log to server1 I can successfully execute my stored procedures from SQL Server Management Studio but when I execute my stored procedures from my browser application I get the following error on server 2.
Error: 18456, Severity: 14, State: 58.
Login failed for user 'sa'. An attempt to login using SQL authentication failed.
Server is configured for Windows authentication only.
I've searched the Internet and Stackoverflow for solutions but I'm not sure what's the best way to solve this issue. I'm sure it involves adding/changing database security settings but I'm unsure where to make these changes.
Thanks in advance.
Right-click the server in Enterprise Manager, select properties, goto Security, and change to SQL Server and Windows Authentication mode.
Mixed mode is required if you want to use sa or any other sql-account for authentication. However i believe that the recommended way is to keep the server at Windows authentication mode, and use domain accounts for authentication. The sa-account is the quick and dirty way.
If you have the exact same security setup on both servers, the link between them should work if you select "Be made using the login's current security context" in the linked server properties. That way, the account will be "inherited" in the connection to the linked server.
Check under Security - Logins on each of the server so that the same account is added to both servers. Also check the properties of both entries, under Server Roles you can try to add the sysadmin-role to make sure the accounts will have access to all databases on the server. You should however limit this access in live environments :)

Microsoft SQL Data Sync Agent: Server and Database

I'm struggling with Microsoft SQL Data Sync Agent, which I need to setup the windows Azure platform.
In the ms sql data sync agent preview, the "Ping Sync Service" is successfully executed.
My windows firewall is allowing ingoing via port 1433.
The problem is, when I want to "Register":
First, I'm not sure that I enter the correct "Server" and "Database" names.
Second, I'm not sure whether I should use "SQL" or "Windows" Authentication
Third, how do I ensure that the Client Sync Agent has appropriate rights to the database?
Among alot of other trials, my best guess is:
Server " .\SQLEXPRESS"
Database "SiteSqlServer"
but still I get the following 2 error messages:
1) Unable to connect to the Database. PLease check if service account has connectivity, credentials and permissions to connect. Server: "XXX\SQLEXPRESS". Database: "SiteSqlServer".
2) Connection faild. Please check database credentials along with permissions for Microsoft SQL Data Sync Windows service logon account to connect to database with specified credentials.
Other reasons for failure:
Windows Azure SQL databases have to be added on the SQL Data Sync portal.
SQL Server databases lower than SQL Server 2005 SP2 are not supported on the SQL Data Sync.
I'm using: dotnetnuke CMS system and Microsoft webmatrix.
Any idea on how to proceed from here is warmly welcomed!
Thanks!
It seems you are trying to sync SQL Azure with SQL Express which is not supported and not tested. That's why when you try as described above you get that error. Based on my experiences there are issues using with SQL Express and SQL DataSync and SQL Express is not listed helow:
http://msdn.microsoft.com/en-us/library/windowsazure/hh456371.aspx
There are a few articles on internet where a few folks who went ahead and hacked the system to work with some vers'on of SQL Express so you are your own if you wish to try further. An article I found is here:

Connecting to remote SQL Server

I have installed SQL Server 2005, the SQL Server instance name is SOSO, the machine name is HERO, I tried to connect from another computer using SQL Server Management Studio:
Server name: HERO\SOSO
Authentication: Windows Authentication
But I didn't succeed.
SQL Server is enabled to be connected remotely.
So what is the problem?
Windows Authentication uses the Active directory user from the connecting machine to authenticate with the database. Does it have the right permissions to access the database? Maybe try authenticating with a SQL Server database user first. Maybe you've created a SA user on installation, try connecting with that.
But as the other replies also tell, first check network / firewall connection and please provide us with the error message.

Resources