Win a 3 month subscription to Marco Behler Videos this week in the Spring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Problem with deletion of database in java  RSS feed

 
Nidheesh Krishna
Ranch Hand
Posts: 60
Java MySQL Database Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
While trying to delete a MSSQL database thorugh java program, i got an error as follows
"Exception in thread "main" com.microsoft.sqlserver.jdbc.SQLServerException: Cannot drop the database 'AtlasDB3', because it does not exist or you do not have permission."
How can i solve this error?
 
Tim Moores
Saloon Keeper
Posts: 3758
78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does the DB account used by your code have permission to drop tables?
 
Claude Moore
Ranch Hand
Posts: 865
8
IBM DB2 Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Exception message seems to be pretty clear....Provided that database actually exists, what if you try to drop it with the same credentials you are using in your program?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!