Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

problem attaching a sql server database

Status
Not open for further replies.

cbrown777

Programmer
Aug 18, 2007
17
US
I have visual studio 2005 and sql server 2005 developer edition. I believe I have the latest sp's for both installed. I can access the database I created directly from sql server management studio but cannot attach it to visual studio. I have tried to run is as administrator but still I cannot get it to work.
The error message depends on how I run it.

Run it normally:
Error: Do not have permission, check with the database owner or administrator

Run it as administrator:
enter a new name or close the file that's open in another program.

any suggestions
 
You need to have a valid login to the db server that has access to the db. How are you authenticating? SQL or NT?

- Paul
- If at first you don't succeed, find out if the loser gets anything.
 
my authenication is windows. I am not using the sql server login. Any suggestions?
 
does your domain login or a domain group you are a member of have access to the database?

- Paul
- If at first you don't succeed, find out if the loser gets anything.
 
Open the database in SSMS.
Drill down to the security folder and look at the users.

If you don't have access to the db in SSMS then ask your admin to check it.

- Paul
- If at first you don't succeed, find out if the loser gets anything.
 
Thanks for spending the time with me. I have gone everywhere that has anything to do with security, permissions, etc., and I cannot for the life of me figure out where this security is hanging up. I am using a laptop with sql server developer edition and running sql server on same machine, no admin people involved. I did go to where you said about security and logins and noticed that all logins are using windows authentication, and have master as default database. I tried different things here and to no avail. I also tried going to windows firewall and did not see anything I haven't already tried before.
 
You say you have master as the default, but if you go to User Mapping are any databases checked? If so, single click (highlight) the database and see what permissions that login has.

-SQLBill

The following is part of my signature block and is only intended to be informational.
Posting advice: FAQ481-4875
 
I checked user mapping and my database is just like northwind and others having owner and public checked. I can get connected in ssms but not visual studio 2005. It appears that visual studio 2005 is the roadblock. I don't understand yet why I can get in using ssms but not vs 2005.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top