very basic question. sql server 2008, created new login and gave it sql authentication mode. checked status is enabled. Tried to connect to same server instance, login failed. What is going wrong? thanks for help in advance
Did you give that new login any access to any of the databases??
Just the login alone is not worth much and it's only half the story. That user can log in to SQL Server - big deal. You will also need to create users in database based on that login! Or check some boxes in the Login's "User Mappings" page to give it access to specific databases.
Related
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
I've been working to try and connect an ASP.NET application to an IIS Site running in an App Pool using Integrated Security. I was eventually unsuccessful in that attempt until I made the Login I'd created to represent the App Pool a Sysadmin, which I understand is not a good thing to leave in there. It's on localhost, but it still makes me uneasy.
So I decided to try to use a Login/Password combo instead of Integrated Security. To that end, I created a new Login in my SQL Server Management Studio:
And told it to use a password, making sure that I know what the password and username are.
My Default database is master
Server Roles is only 'public'
In User Mapping I added db_owner to one of my databases, and all the others are only 'public'
In Securables, 'Connect SQL' is Granted to the SQLEXPRESS server
I then disconnected from SSMS and tried to reconnect using my newly-created Login.
It didn't allow me to log in:
According to:
https://learn.microsoft.com/en-us/sql/relational-databases/security/authentication-access/create-a-login
After creating a login, the login can connect to SQL Server, but does not necessarily have sufficient permission to perform any useful work.
However, that appears to not be the case in this instance. What am I doing wrong?
I did make sure that my Server Authentication was set correctly, per SQL Server 2008 can't login with newly created user
Another data point: when I try (and fail) to log in 10 times in rapid succession and then go back in with Windows authentication, the 'Login is locked out' notification in the Status tab is not checked.
The thing I was missing was going to Windows Services, and restarting SQLEXPRESS to get the change to 'SQL Server and Windows Authentication Mode' to take effect.
After I did that, I was able to log in with my testuser.
I have refreshed the development database manually from production database backup. After refreshing the database, the Dev team is unable to login and access to that database. Please let me know your thoughts to troubleshoot systematically to resolve this issue.
Thanks and regards
Unable to login coz:
1. users are don't have a permission to access your database.
2. Check Sql service if running on you system Services.
3. if on server or another pc, Check server ip if you'd be able to ping it.(Network Connectivity).
Hope it helps.
First thing First.
Do Check the Server Name and Authentication
If you have updated your DB in your local machine. Then the Server Name must be like:
SystemName\SQLEXPRESS
Do Also check out the Login with the permission
After refreshing the database, all the data level user access will be lost. Only SysAdmin users will be able to access the database. For any database level users need to be granted access again.
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.
I've moved a database from sql 2000 to a new 2005 server. Everything was fine until I logged into Sql Server Management studio with one particular user. It looks like i logged in successfully but when I try to expand the database I get 'The database is not accessible'. I can log in with windows authentication and with other sql users with no problem and can see everything.
I checked and made sure the DB is not in single user mode. I also checked for orphaned logins (exec sp_change_users_login 'report') and none were found.
Any help in pointing me in the right direction would be greatly appreciated.
check if the user has proper permissions to access the db.