Multiple errors of : 18456 on the SQL Server (And in the Event Viewer) - sql-server-2016

Alert Details
Host xx-x-xx-xx-0xx Application MSSQLSERVER EventID 18456 Criticality High
Time 20:29:50, Sun, May 28 2017
Message Login failed for user 'xyz'. Reason: Password did not match that for the login provided. [CLIENT: xx.xx.xxx.xxx].
I'm getting 1000+ alerts regarding the same error mentioned above.
Most importantly: I get these alerts whenever the maintenance plans (Backup) are executed.
Can anyone please explain why am I getting the error 18456 and then the maintenance plan runs successfully anway?

This is very typical SQL problem of SQL user rights. please check if you are using AD account/ service account, it happens that rights use to get revoked while some specific SQL command is being executed.Check with your IT team regarding your SQL account.

Related

Error: 18456, Severity: 14, State: 38 Reason: Failed to open the explicitly specified database 'ReportServer'. [CLIENT: <local machine>]

I'm facing a situation which every 10 seconds an error log is recorded with the following msg:
2018-07-25 09:07:09.59 Logon Error: 18456, Severity: 14, State: 38.
2018-07-25 09:07:09.59 Logon Login failed for user 'svc_sql'. Reason: Failed to open the explicitly specified database 'ReportServer'. [CLIENT: <local machine>]
In my instance I don't have a 'ReportServer' database. I know that in the past the server was migrated to a new machine and I reckon the 'ReportServer' database was created with a new name in the new server. I really don't know how the migration was done.
I've activated the SQL_Profiler with all audit options and I could see that this user also executes a procedure sometimes.
I've checked the default database for this user and it's Master.
Any ideas how can I fix this issue? My error log is flooding with this message.
Thanks a lot.
Rod
I've checked the default database for this user and it's Master.
The error doesn't tell you about default database but about explicitly specified database, that is different, it's the database that is mentioned in connection string under Initial Catalog or Database.
Do you see what application tries to open this database? The problem is in that application, it uses old connection string. If it's SSMS, it's simple, it's in the Options of connection dialog, but if it's another application, the connection string can be written in the ini file or hardcoded.
I don't know if I try to run DBCC CHECKDB master will solve this.
Of course it cannot solve this. This has nothing to do with database integrity. It's your client that uses wrong connection string.
Any ideas how can I fix this issue? My error log is flooding with this
message.
If you just want to save your errorlog from these messages just turn off failed logins audit:
Or you should find this application by its name or host or client address.
Or you can temporarily disable this login and see who will call you saying he cannot login anymore, or, if it's your local machine, some of your applications will fail, this way you'll find it.
I had the same error and doing the following resolved the error for me:
From within the SQL Server Management Studio
Security
Logins
Right Click the user ID that was failing login
Server Roles
Make sure all the checkboxes are checked. Right clicked Security and refresh.

sql server 2012 copy database failed between two instances on the same host

I am learning the sql server 2012 and got stuck when using the copy datase, trying to figure out why.
I created two instances on the same host, using administrator, windows authentication.
(the default instance:iZp0w14yqtvxcmZ, the second instance: iZp0w14yqtvxcmZ\instance2, try to copy database from the default one to the second one)
It failed at the last step: execute sql server agent job.
here is the error log from windows event viewer:
Message: Failed to connect to server iZp0w14yqtvxcmZ.
StackTrace: at Microsoft.SqlServer.Management.Common.ConnectionManager.Connect()
at Microsoft.SqlServer.Dts.Tasks.TransferObjectsTask.TransferObjectsTask.OpenConnection(Server& server, ServerProperty serverProp)
InnerException-->Login failed for user 'NT Service\SQLAgent$INSTANCE2'.
Then I tried to add the login 'NT Service\SQLAgent$INSTANCE2' in the default instance. Then tried again and got another error:
Event Name: OnError
Message: An error occurred while transferring data. See the inner exception for details.
StackTrace: at Microsoft.SqlServer.Management.Smo.Transfer.TransferData()
at Microsoft.SqlServer.Dts.Tasks.TransferObjectsTask.TransferObjectsTask.TransferExtraObjectsViaSmoTransfer()
InnerException-->Windows NT user or group 'iZp0wd5ebkvswaZ\Administrator' not found. Check the name again.
But the Adminitrator does exist in the computer management -> local user and groups -> group, so I don't know what to do now. NEED HELP !!!
Thanks a lot!
after two-day's struggling, I figured it out. The sql server agent service should use a domain-based account for a multi-server environment. Also that account should be able to log in and perform the job.
I solved the issue changing the login method to system local account.
Two instances must have the same password and open, then in this case:
insert into [EI7-PC\SQLEXPRESS2].[MYCOMPANY].[dbo].[inventory] SELECT *
FROM [EI7-PC\SQLEXPRESS1].[MYCOMPANY].[dbo].[inventory] where itemno='10-0001'
The reason for the same password is unknown, this is per my experience. With two different password you may get an error about 'sa' failed to login.

Can SQL Server refuse a connection to one specific client, but allow access to every other client?

Trying to learn SQL Server, so bear with my noobness, please.
I see the same errors repeatedly in the SQL Server log:
Error: 18456, Severity: 14, State: 38.
Login failed for user 'domain\username'. Reason: Failed to open the explicitly specified database. [CLIENT: ]
There were also many failed login attempts for the same client prior to this error starting.
I checked the connection string on the problem client and it's identical to the string used on other clients that successfully connect. Can SQL Server limit access to a specific IP/client, but continue to allow access to all other users?
This has been discussed here by Aaron Bertrand:Troubleshooting Error 18456
Error: 18456, Severity: 14, State: 38.
Login failed for user ''.
Reason: Failed to open the database specified in the login properties.
Reason:
The database specified in the connection string, or selected in the Options > Connection Properties tab of the SSMS connection dialog, is no longer valid or online (it might be set to AutoClose or the user may simply not have permission).
Note that this could also be a symptom of an orphaned login. In this situation, you will need to synchronize the login and user information
Can SQL limit access to a specific IP/client, but continue to allow access to all other users?
SQL will not and won't deny access to a specific client,it must fall into one of the above cases

oracle sql developer- ora-12514 error

im using oracle sql developer to make my database, but now i stopped to work.
it wrote this:
An error was encountered performing the requested operation:
Listener refused the connection with the following error: ORA-12514,
TNS:listener does not currently know of service requested in connect
descriptor
Vendor code 12514
i also tried to make new connection but it didnt help
pls help me,i dont know what to do, i need this to do my homework
when i tried to change connection it wrote this:
An error was encountered performing the requested operation:
ORA-01031: insufficient privileges
01031. 00000 - "insufficient privileges"
*Cause: An attempt was made to change the current username or password
without the appropriate privilege. This error also occurs if
attempting to install a database without the necessary operating
system privileges.
When Trusted Oracle is configure in DBMS MAC, this error may occur
if the user was granted the necessary privilege at a higher label
than the current login.
*Action: Ask the database administrator to perform the operation or grant
the required privileges.
For Trusted Oracle users getting this error although granted the
the appropriate privilege at a higher label, ask the database
administrator to regrant the privilege at the appropriate label. Vendor code 1031
Please check the services are running:
OracleOraDb11g_home1TNSListener and OracleServiceORCL.
You're going to have to do some troubleshooting; Here are a couple of suggestions:
ORA-12514 Tips
ORA-12514 TNS:listener does not currently know of service requested in connect descriptor
How to resolve error: ORA-12514
The service name ,you are using should be in sid column and not in service name entry box.
For example, the service name provided for you is overflow,you have to mention it in
ex:10.171.1.24:1521:overflow
Sid : overflow
Service : leave blank
Test the connection
Go to Services
check whether the "ORACLEServiceORCL" is running or not.
if not running then right-click on it and click start.
Your problem may solve this.
Happy coding :D
This worked for me- Close your SQL Developer and launch again.
I had the same issue after restarting my PC and could not access my local database. This fixed it.
Go to Run > services.msc > Services (Local) > OracleService
Right-click on OracleService > Properties > Log On
Make sure Local System Account is checked then press OK.
Stop the OracleService and restart it. It should be working now.
Mine was working fine till last night but this morning I found the said problem. I checked OracleOraDb11g_home1TNSListener and OracleServiceORCL was running and in "Started" status but still issue was there.
Just restarting both the services solved my issue. I suggest just try this once to save your time before exploring other solutions.

Error when trying to create subscriptions in reporting services

I am trying to set up reporting emailing SQL Server 2005 Reporting Services. When I click to save a subscription I recieve the following error:
An internal error occurred on the report server. See the error log for more details. (rsInternalError) Get Online Help The SELECT permission was denied on the object 'sysservers', database 'mssqlsystemresource', schema 'sys'.
I was under the impression Reporting Services uses the role RSExecRole which is created during installation. Isn't mssqlsystemresources something that is not supposed to, and not easily touched?
This is most because the user doesn't have permissions setup correctly. Can you check if RSEXECROLE doesn't have any DENY permissions and has correct permissions on the reportserver db.
http://www.sqlservercentral.com/blogs/brian_kelley/archive/2007/11/6/3195.aspx
Based on the code in the above url, RSEXECROLE should have 323 rows on SQL Server 2005 SP3. Yours should match that.
Let me know what you find.