• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem with SQL Server

 
Damon Combs
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When I try to connect SQL Server I get this error: database cannot be opened
I'm hoping someone here has experience in this and knows how to make sql db fix

Any help/advice would be appreciated,

Damon
 
Ron McLeod
Bartender
Pie
Posts: 1032
65
Android Eclipse IDE Java Linux MySQL Database Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How are you attempting to connect to the database - command line, Java/JDBC application, IDE such as Visual Studio, ???

Is there any more information in the error message?  If there is, can you copy the complete message here?
 
Damon Combs
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I connect  to data in a SQL Server database using the .NET Framework Data Provider for SQL Server.
 
Damon Combs
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is no info, just annoying error : Database cannot be opened
 
Devesh Sharma
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Damon,

Is the SQL Server local to your machine ?

Are you sysadmin on it (scary though) ?

If not a sysadmin, does your user exists in the Target database ?

And before all of the above, is the Database in Read/Write mode or is in Suspect state ?

You can take assistance of SQL DBA who can set you up with the necessary and sufficient privileges.
 
Knute Snortum
Bartender
Pie
Posts: 2890
62
Chrome Eclipse IDE Java Postgres Database VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch, Devesh, and thank you for your contribution.
 
Wilson Scott
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

The solution to log on is: From the Connect to Server dialog, click Options. Change value of Connect to database: to any valid database on the server. The permanent solution to fix the server is to run SQL like: ALTER LOGIN [test] WITH DEFAULT_DATABASE = master GO.  Other method to troubleshoot this is - https://www.fixtoolbox.com/sqlserverfix.html


Best Regards
 
Damon Combs
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to say thank you for taking the time to share how to go about fixing this.
 
Paul Clapham
Sheriff
Posts: 21559
33
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Damon, does that mean you've resolved the problem to your satisfaction?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic