I created a user in SQLPlus and granted all privileges to it. I can connect this user in SQLPlus but cannot connect in SQL Developer. I can connect hr and system in SQL Developer but not this user. It shows this error -> Status : Failure -Test failed: ORA-01017: invalid username/password; logon denied.
I have checked the username, password and it is correct.
I have checked the tnsnames.ora file and the SID and Port No are correct too.
I have Oracle 11g installed.
Related
This had been working fine in our prior server Windows 2012. New server is 2019.
IIS Setup:
DefaultAppPool using ApplicationPoolIdentity as its identity.
Anonymous and Windows Authentication enabled.
Both prior and current server hitting same SQL Server.
When we try launching the ASP Page, we get this error:
SqlException (0x80131904): Login failed for user 'DOMAIN\MACHINENAME$'.
In other posts I've read that it could be the connection string Trusted Connection setting that is incorrect, but the connection string is built inside the page code and it's never changed.
We've also read that since ApplicationPoolIdentity uses NT AUTHORITY\NETWORK SERVICE as its user, then we'd need to add that service account to the SQL Server.
Again, it had been fine without it in the prior server. But just to try it, we added it to the User list as DB_OWNER in SQL Server.
But still get same error.
Connecting to the SQL server outside of this scenario is no an issue, we can get to it in SSMS and otherwise.
Any ideas and help appreciated!
Thanks
If you see a failure like this: Login failed for user 'DOMAIN\MACHINENAME$'. It means that a process running as NETWORK SERVICE or LocalSystem accessed a remote resource, authenticated itself as a machine account and was denied authorization. When access to the machine account is denied, the machine account must be granted access. If the server denies login to 'DOMAIN\MACHINE$', then you must grant login permission to 'DOMAIN\MACHINE$' instead of NETWORK SERVICE.
Database Version : 10.2.14
Maxscale Version : 2.4.6
Application is using jdbc driver to connect to database
userid1 & userid2 is allowed to connect from anywhere i.e.
If we connect to database directly from application server we are not receiving any issues, and connection establishes successfully, but when we connect to database via maxscale we receive intermittent Access Denied error
Note : USERID and PASSWORD are same and NEVER CHANGE FROM DAY 1
Scenario's
userid1 : Connect to database via Maxscale with ID/Password throws Access Denied Error intermittently, sometimes connects successfully
Userid1 : Connect to database directly from application, works fine no issues
userid2 : Connect to database via Maxscale with ID/Password throws Access Denied Error intermittently, sometimes connects successfully
Userid2 : Connect to database directly from application, works fine no issues
Earlier Maxscale Version was 2.2.19 and we never faced issues.
From both (application & Maxscale) logs we can see only ACCESS DENIED errors for those id's.
What am unable to understand is
1) Userid and Password never changed, so why we are receiving ACCESS DENIED when using Maxscale that too intermittently and no issue if we connect directly database.
2) IF Userid/Password passes wrongly then it should be always access denied, but in this case it's intermittently
Similar behavior is reported as MXS-2891 in the MariaDB Jira. I'd recommend reporting these problems on that Jira issue.
I opened "ASP.NET SQL Server Setup Wizard" using the command apsnet_regsql from visual studio 10 command propmpt(Run as Administrator).
In that wizard I selected Windows Authentication instead of Sql Authentication. When I tries to connect to Master Database I am getting the following exception
An error occurred during the execution of the SQL file 'InstallCommon.sql'. The SQL error number is 262 and the SqlException message is: CREATE DATABASE permission denied in database 'master'. Creating the TestDB database
and the SqlException is:
create database permission denied in database 'master' in windows authenticAtion.
By the exception I understand that I don't have permission to create database. But how and where can I get permission to do that.
i have SQL Server 2008 in my system which comes as default with Visual Studio 2008 only.
So please help me and give a solution for my problem.Thanks
Obviously the reason why this is happening is because the user does not have the permission in sql sever to do any modification one of the ways to solve it would be to go to security folder chose user select properties might be permissions and make this user a dbadministrator or other advanced role than login with this user and try to create the database
here are couple of articles
http://msdn.microsoft.com/en-us/library/dd568727.aspx
http://msdn.microsoft.com/en-us/library/ms178630(v=sql.90).aspx
http://www.blackwasp.co.uk/SQLChangeOwner.aspx
I opened "ASP.NET SQL Server Setup Wizard" using the command apsnet_regsql from visual studio 10 command propmpt(Run as Administrator).
In that wizard I selected Windows Authentication instead of Sql Authentication. When I tries to connect to Master Database I am getting the following exception
An error occurred during the execution of the SQL file 'InstallCommon.sql'. The SQL error number is 262 and the SqlException message is: CREATE DATABASE permission denied in database 'master'.
Creating the TestDB database
and the SqlException is:
create database permission denied in database 'master' in windows authenticAtion.
I understand that I don't have permission to create database. But how and where can I give permission to do that.
So please help me and give a solution for my problem.Thanks.
You need to login as a user who is a member of the sysadmin or dbcreator roles.
I'm able to execute a stored procedure which queries a Linked Server directly, but when I call the same sproc though ASP.NET then I get the following error:
Access to the remote server is denied
because no login-mapping exists.
When I execute it through SSMS, I am connected through my Windows domain account.
The site is ASP.NET with Forms Authentication on IIS 7 and SQL 2008 on my local machine.
The Linked Server is set up to "Be made using this security context" for all logins.
The login that you connect with to your initial database does not have access to the linked database. Why don't you use the account that the application impersonates to connect to the database in Management Studio, and diagnose the issue that way? If you know the login, just create it in the linked database as well with the required permissions.
If creating a new login on the linked server is not an option, create a mapping. If you read the fine print on the wizard, it says "for logins not defined in the list above, connections will be made" using the current security context. Which means that if you don't define a mapping, it will use the current credentials for the link.
There are two login/password pairs required. One is for the SQL server that has the linked server on it. The 2nd is for the 'thing' the linked server is connecting to.
E.g.
There is an ODBC connection on the same machine SQL server is on.
This ODBC connection connects to an ORACLE db. During the ODBC setup a user name and a password were required: UN "XYZ", PWD "123".
When creating the linked server to this ODBC connection its necessary to add the user name "XYZ" and password "123". This is done on the security page of the linked server properties. Click "ADD" and in the 'Local Login' box enter the SQL server user name that the app uses to connect to SQL server. In the 'Remote User' box enter 'XYZ' and in the 'Remote Password' enter '123'. Finally select 'Be made using the login's current security context'.