sp_attach_db on Vista causes read only problems
- From: tony@xxxxxxxxxxxxx
- Date: Tue, 12 Jun 2007 06:31:24 -0000
I am trying to distribute my application on Vista. I have been using
SQL 2000 and it has been working fine on XP and older for a while now.
The first thing I ran into was that SQL 2000 would not install on
Vista so I have changed to a command line install of SQL Express.
The method I use to attach my database to the SQL instance once it has
been installed is to call sp_attach_db with the path to the .MDF
and .LDF files once the install is complete. On XP I also create a new
user using sp_addlogin and then sp_changedbowner. This works on XP
just fine.
When I try to execute any SQL statement on Vista, however, I get an
SQL error saying that the database is read only. I use ODBC for all
database access and pass in the user sa and the password I have set
for it since I can't seem to get the statements to add my own user to
work.
If I open the ODBC entry in control panel and log in using sa and the
password it allows me to open the ODBC entry and attach to the
database and hit the Test Connection button and all works fine.
The problem I have is when I try to do any SQL statement on the
database I have attached.
Any ideas?
.
- Follow-Ups:
- RE: sp_attach_db on Vista causes read only problems
- From: "Peter YangMSFT]"
- RE: sp_attach_db on Vista causes read only problems
- Prev by Date: Re: Yet another SQL Express SP2 on Vista Problem...
- Next by Date: RE: sp_attach_db on Vista causes read only problems
- Previous by thread: Re: ?? SQL Server 2005 Express SP2 Install Fails on Native Client ??
- Next by thread: RE: sp_attach_db on Vista causes read only problems
- Index(es):