Event ID 18456 in event viewer and error in application when trying to import database from .bak

PDIS
PDIS used Ask the Experts™
on
I have an application that I'm trying to import a database from backup through the application itself.  I received the following error in the application, USER must a SQL Server Administrator to use this screen.  I have tried this while logged into the computer as two different users both have the sysadmin Server Role in SQL and both have db_ddladmin and db_owner permissions in user mappings to the necessary databases.  When I looked in the event log, I have the following error.  Event ID:  18456 from source MSSQLSERVER.  This error populates in the event viewer as soon as I try to import the database from backup.  I looked in the SQL logs, I have Error 18456, Severity 14, State: 11 logged at the same time.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
lcohanDatabase Analyst

Commented:
"import a database from backup through the application itself." - what IS the actual login that the application uses to "import a database from backup". you need to figure that out first and make sure that the "application login" running the code that does the "import a database from backup " has actually sufficient rights in that particular SQL Server to do so.
Solution Manager
Commented:
There are following reasons of this error:

  • Login is not available
  • Incorrect password
  • Windows Authentication is not in mixed mode
  • Damaged logins etc

In this blog you can get useful solutions to fix this error: https://dzone.com/articles/sql-server-error-18456-best-solution-to-fix-it

Regards,
Bharat

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial