Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 201
  • Last Modified:

problem in attaching ms sql database

why I get problem when I am trying to attach new database ( copied from another computer ) ??

I get the database attached as read-only !!

I took some snapshots of the problem

note, I am working in sql 2005 express
0
Ameerh24
Asked:
Ameerh24
  • 6
  • 3
  • 2
  • +1
3 Solutions
 
Aneesh RetnakaranDatabase AdministratorCommented:
was that database read-only when you originally took the backup ?
0
 
JakeBushnellCommented:
Check to make sure you have administrative rights to the folder where your new database resides...
0
 
Ameerh24Author Commented:
Sorry, I forgot to upload the snapshots
1.JPG
2.bmp
3.JPG
0
Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

 
Ameerh24Author Commented:
aneeshattingal, the database was not read only

JakeBushnell, yes I do have administrative rights
0
 
JakeBushnellCommented:
Your folder where the MDF file is is under the "Program Files" folder... Maybe its conflicting with what ever "program" that folder its in is associated with... Try making a new folder user your C drive and putting the MDF file there.

Then Right click the file and choose properties... On the general tab on the bottom right there is an Advanced button... There MAY be a button below that that says "Unblock".. If there is then click it.

Now try to attach the database again from there.

Hope that helps,
Jacob
0
 
Ameerh24Author Commented:
No Button called "Unblock"
0
 
Ameerh24Author Commented:
and its still read-only database !!!!
0
 
Aneesh RetnakaranDatabase AdministratorCommented:
right click on the database -> properties -> options ->
 change database read-only to "false;
0
 
JakeBushnellCommented:
Seems someone else here had a similar problem as well. http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SQL-Server-2005/Q_23417316.html

aneeshattingal's idea is a good one... also try renaming the database file.

Jacob
0
 
sureshchsahuCommented:
U can remove the readonly option for DB in sql

USE master
EXEC sp_dboption 'DBNAME', 'read only', 'FALSE'
0
 
Ameerh24Author Commented:
right click on the database -> properties -> options ->
 change database read-only to "false;

it givrsd me error
0
 
Ameerh24Author Commented:
*gives
0
 
sureshchsahuCommented:
Did u try the option I have mentioned above.
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

  • 6
  • 3
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now