0

I have a question about SQL Server 2008.

I can't connect to SQL Server with Visual Studio 2010. When I try to connect, there are only default templates like tempdb, master etc. The database which I made it, isn't there.

How can I solve this..?

Thank you..

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
jakobiyem
  • 107
  • 1
  • 5
  • 15
  • 1
    Can you connect using the SSMS? If so, are you sure you are using the exact same credentials in VS you use when connecting using SSMS? If you can connect using SSMS you should have no problems creating a connection in VS using the new connection wizard. Otherwise you need to make sure you have access to the database in question with the credentials you are trying to use... – Dean Kuga Mar 15 '11 at 18:29
  • i can connect using SSMS. you are right, when i try to attach database i had this error message--> "you dont have permission to open file contact the file owner or an administrator to abtain permission" – jakobiyem Mar 15 '11 at 18:50
  • If it is a permissions issue you could mark the answer below as correct... – Dean Kuga Mar 15 '11 at 19:28

1 Answers1

0

Looks like a permissions issue. Make sure credentials you are using have appropriate permissions to connect to your database.

Dean Kuga
  • 11,878
  • 8
  • 54
  • 108
  • i try to solve this permission issue but i couldnt.. i dont know how can i do this – jakobiyem Mar 16 '11 at 18:37
  • Just expand your database in SSMS, in the Security section right click on the Users and select "New User". Add the SQL server user you are trying to connect with using the "New User" dialog. If the Login does not already exist you'll have to expand the Security branch in the root of your SQL server and create the Login first... – Dean Kuga Mar 17 '11 at 00:00