Link to home
Start Free TrialLog in
Avatar of chokka
chokkaFlag for United States of America

asked on

SQL 2005 Express Database is Readonly


alter database [enrollmentdb] set read_write

I am getting these errors
Msg 5011, Level 14, State 5, Line 1
User does not have permission to alter database 'enrollmentdb' or the database does not exist.
Msg 5069, Level 16, State 1, Line 1
ALTER DATABASE statement failed.


Becuase of this issue, i am not able to modify the design of table.
ASKER CERTIFIED SOLUTION
Avatar of epochasset
epochasset
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of chokka

ASKER



1) This is an attached database. This database will used locally for all our client machines.

2) I am not able to find Username ( i.e sa ), under Login.

I have attached the screen shot of this issue.


untitled.bmp
Avatar of 60Cal
60Cal

Do you have the S.A password? As I suspect the tables are locked by that
Avatar of chokka

ASKER

yes

username : sa
password : chokka123

But in .net connection string, i mentioned as follows ..

"Data Source=CHOKKA\SQLExpress;Integrated Security=true; AttachDbFilename=C:\Enrollment Form\EnrollmentDB.mdf;User Instance=true;"
Avatar of chokka

ASKER

Earlier, i was logged on sa / chokka123..


NOW,

I have logged on Windows Authentication.

What i have to do?
Avatar of chokka

ASKER



On trying to provide

dbo setting for the username sa

i am facing these issues
TITLE: Microsoft SQL Server Management Studio
------------------------------

Alter failed for Login 'sa'.  (Microsoft.SqlServer.Smo)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.0.1600.22+((SQL_PreRelease).080709-1414+)&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Alter+Login&LinkId=20476

------------------------------
ADDITIONAL INFORMATION:

An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)

------------------------------

Cannot set a credential for principal 'sa'. (Microsoft SQL Server, Error: 15535)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00.1399&EvtSrc=MSSQLServer&EvtID=15535&LinkId=20476

------------------------------
BUTTONS:

OK
------------------------------

Open in new window

Avatar of chokka

ASKER



Either using Windows Authentication or SA user authentication, I am not able to login to the database