Phantom Online Judge Configuration error: CREATE database permission was denied in the db ' master '.

Source: Internet
Author: User
Tags microsoft sql server mssql stack trace create database management studio sql server management sql server management studio
Error code:
The CREATE database permission was denied in the database ' master '.
Attempt to x:onlinejudgewebapp_dataojdb.mdf a file
An automatically named database was attached, but failed. A database with the same name already exists, or the specified file cannot be opened or located in a UNC share directory.
Note: An unhandled exception occurred during the execution of the current WEB request. Check the stack trace for more information about the error and where the error occurred in the code.

Exception Details: System.Data.SqlClient.SqlException: CREATE is rejected in database ' master '
DATABASE permissions.
Attempt to x:onlinejudgewebapp_dataojdb.mdf a file
An automatically named database was attached, but failed. A database with the same name already exists, or the specified file cannot be opened or located in a UNC share directory.


1. You need to reboot after you have completed SQL Server 2005, which may be the problem

2. Please add the/complier and/web/app_data folder-> properties-> security entries to your IIS username and make it writable

3. If you cannot find the IIS user name, add a everyone user under the folder-> Properties-> Security tab, and set the permissions to writable.

4. If not, you can change the corresponding file under X:/program Files/microsoft SQL server/mssql.1/mssql/data to everyone writable

5. The final recruit, the maintenance, install SQL Server 2005 Enterprise Edition, or find an Taian has SQL Server 2005 Enterprise Edition of the machine, to manage this user.
Start SQL Server Management Studio.
Log on to the appropriate database user.
Object Explorer to open the server, select the database node.
Right-click the attached database to select the/web/app_data/odbj.mdf file for the Phantom online Judge.
When attached, if the database file is yellow, it turns out to be a normal read-write and, if it is gray, the following methods:

The database right-"properties-" option-"database is read-only-" flase

If there is a hint that the database is not set, first case 3rd setting.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.