Updated on November 25th, 2019
SQL is a domain specific language which is used for stream processing and in designing and programming for managing data in the relational data stream management system (RDSMS). MS SQL Server database provides the feasibility to access many records with a single command and also by using SQL database it is very easy for the users to migrate data from MS Access, Sybase, Oracle to MS SQL Server. Sometimes, while accessing the database, users encounter errors which hampers their way of doing work.
One such error is SQL Server Attach Database error 5120, it occurs due to when MS SQL Server database does not have the authorization to access LDF and MDF files of a database.
First, you need to create two user account like SQLAdminOne and SQLAdminTwo in order to fix error 5120 and then follow the below mentioned procedure:
Find and browse the location of MDF and LDF files & right click on the file >> Properties >> Security.
6. Reattach the Test database: Now, in this way, SQLAdminTwo is able to attach the Test database
If above-mentioned ways do not work and you are still facing error 5120, then in such case there are only two options left to do you can either restore all data from SQL Backup or fix it with the SQL Database Recovery software.
After knowing the causes, the user can avoid Microsoft SQL server error 5120. In some cases, it can be solved by adding permissions to a drive or by allocating database files to its original location. And, if things don’t work by manual ways then a user can opt for an alternative technique.
About The Author:
Pallavi is a content writer in the field of data recovery and email migration. She has a passion for creating engaging and thought-provoking content. With several years of experience in the field, she has developed a deep understanding of various writing styles and formats,
© Copyrights 2017-2023 Database File Recovery. All Rights Reserved.