1

I am trying to create a database using SQL server Management Studio 2012. But on clicking the create database,i am getting an error:

A file activation error occurred. The physical file name 'ToDoList.mdf' may be incorrect. Diagnose and correct additional errors, and retry the operation. CREATE DATABASE failed. Some file names listed could not be created. Check related errors. (.Net SqlClient Data Provider)

Prisoner
  • 1,839
  • 2
  • 22
  • 38
reeversedev
  • 382
  • 1
  • 3
  • 18
  • Are you going to create a database named **ToDoList**? If yes, have you checked your path for **ToDoList.mdf**? – Prisoner Oct 31 '16 at 08:27
  • Moreover, I have remove tag c#, asp.net and ado.net, as they are not relevant to the question. Please [edit] the question and add them back they related to the question, thanks. – Prisoner Oct 31 '16 at 08:30

1 Answers1

0

This problem usually occurs if the user that is trying to create the database  doesn't have the necessary permissions in SQL Server. Maybe you have read_only on.

Try using a Administrator's account to create the database or set new permission on the user that you're already using.

Heres how to grant permission to the user that you're logged in to. https://msdn.microsoft.com/en-us/library/ms186717(v=sql.105).aspx

därko
  • 19
  • 9