Connect to sql server from MS-Access without creating DSN - sql-server

I am using Access as a front end database to connect to SQL Server data. On my computer, it works just fine. On a user computer, it doesn't work. Has anyone successfully done this without creating a DSN on each computer?
Thanks,
Jeff

You will need to make sure what ever user is trying to connect to the DB has rights in SQL Server to view it. Access won't just remove the security needed to view it. You could create a DB role then put everyone needing to get into that DB into the role and grant that role access. You could also get an AD group created for anyone that needs to view the table and get people added to that group then grant that group access.

You can connect using an ODBC connection with saved credentials to trick the sql server into thinking the user is someone else. However, i would only do this and provide read only access. Then, you can revoke access to that username whenever and the whole system stops. Easy to do., just build an ODBC connection and save the username and password in it.

Related

Password protected database SQL Server with SSMS

we launched new SQL Server on AWS. Everything looks great, I can access the server via SSMS. However, I can't set up new credentials for one specific database.
This database should be accessible via MS Access. It works in MS Access, when admin login and password, but I would like to give the users access only to the specific database.
I read this article and I guess I should created SQL user with password:
https://learn.microsoft.com/en-us/sql/relational-databases/security/authentication-access/create-a-database-user?view=sql-server-2017
Unfortunately, I do not see this option in SSMS.
Don't you have any idea please, why it is so?
So my comprehensive requirement:
1. I need to set up password protected database.
2. This database will serve linked tables for MS Access.
Thank you very much for help,
Vaclav
I have already found a solution. My login didn't have an appropriate server rights. To create a new user and define his permissions you have to "Server role" - securityadmin assigned to your login.
It is described here:
https://learn.microsoft.com/en-us/sql/relational-databases/security/authentication-access/server-level-roles?view=sql-server-2017
Best regards,
Vaclav

How do I copy permissions from one database to another?

I have two databases on the same SQL server. One for an ERP database that I am able to read tables and one I created in MS Access. A store procedure on the MSAccess database is updating some tables from the ERP DB. The MS Access DB from here on is independently running.
When I installed on other computers, the Access Database is giving me a connection error when I am logged in as another user than myself.
- Are permissions from the ERP database affecting me in my Access Database? Should I worry about them?
- Is Windows Authentication enough to make the connection happen?
- Do I need to Map the users over from the ERP database?? if so, how do I do it?
- Can I grant every user on the Server permission to access my tables using Windows Authentication? do I need to go down this road? How do I do it?
I am just not too sure what to do from here on. Here is some more information about the issue.
-In my database I have a ODBC stringconnection that looks like this:
Driver={SQL Server Native Client 11.0};Server=SERVER;Database=DATABASENAME;Trusted_Connection=yes;
-I am packaging an exe file using SSESETUP which is awesome.
-I am installing on the new computer and able to launch when I am logged on as myself however, I am getting a connection error when I am logged in as another user on the same computer. (Note: I am not able to debug from here on and see the vba because I am running under Access runtime 2013 only.)
I would appreciate if someone can assist me in narrowing my search for a solution.
Bottom line, it sounds like you need to set up database permissions on your SQL Server for each Windows account that will be using your Access db.
Here are specific answers to your questions:
Are permissions from the ERP database affecting me in my Access
Database
Yes, of course they are. Regardless of how you connect to the database the permissions will always be in effect.
Should I worry about them?
Yes, of course you should. Otherwise you won't be able to work with the data.
Is Windows Authentication enough to make the connection happen?
To make the connection, yes. SQL Server supports Windows authentication in both security modes (Windows only and mixed mode). But, this is just the connection. You also need to take the database permissions into consideration. Your Windows login needs to be granted the appropriate permissions within the specific database in order to do anything.
Do I need to Map the users over from the ERP database?
Map to what? Access? Based on the connection string in your question you're using Windows authentication to connect Access to SQL Server, so Access will connect to SQL Server under the security context of whoever is running Access. So the SQL Server permissions will need to be configured for each user who will be running your Access db.
Can I grant every user on the Server permission to access my tables
using Windows Authentication?
Access to the SQL Server tables? Sure, you could. But you should limit it to only the necessary permissions. Granting access for everyone is likely overkill and not best practice.

All actions denied on MS SQL Server on Go Daddy Hosting

i have a website hosted on GoDaddy and I need to create a database for it. So headed to the Databases section and created a MS SQL Database then on my local pc I tried to access the database via SQL Server Management studio, I was able to login to the database but I cannot make any operations. I get it does not exist or you do not have permission. So deciced to go the Security tab, then Login and tried to change my username that I'm using to systemadmin role but I also got Cannot alter the server role 'sysadmin', because it does not exist or you do not have permission. What could be the problem? There are no other accounts on it. The default sa account is disbaled and I can't enable it coz it will prompt no permissions etc.
I don't understand it. Why GoDaddy allows me to create a database but with no permissions or rather I cannot alter it. Anyone facing the same issue? Thanks
Well it's quite clear. You cannot set yourself as an SA. This would be a great security breach!
You need to add a Login in your database for your account. I think you headed to the server logins. The server login seem to be ok, as you already said. You can connect to the server itself. You need to add a login or a loginmapping to your server login inside your database.
I don't know the backend of goDaddy, but I'm pretty sure that you have some credentials provided after creating your database.

Error while creating database in master

I am using Sql server 2008-r2 and connect it using windows authentication.
when i create database then i am getting error
Create database permission denied in database Master
What may be the reason of it and how can it be resolved?
I even forgot the sql server authentication password also to connect it.
Go into the master security settings and try to give your user SA permissions.
It may be that your Windows Authentication has security rights, but not create rights.
If that doesn't work, you might have to install a new instance of SSMS and create a linked server to the data that you need.
PS: This should be a comment, but I can't make comments for another 7 reputation.

Sql Server Protect Instance

Is there anyway to protect access to SQL server installation ?
I mean I want that only a single user will be able to access the database and no one else , not even by Windows Authentication.
I want to do this because I dont want anyone to look into the database and see the details of the database.
What I did was install it normally and delete all logins in security except the user sa.

Resources