3

Using SQL Server Management Studio (SQL Server 2008 R2 Express), how do I create a database with files at an arbitrary location, say "K:\SQL_DATA"? I have been able to create it at default location, detach it, move the files, attach it. But it sounds like a lot of unnecessary steps. I would like to use GUI if possible.

1 Answer 1

10

You can easily define both the path as well as the actual file name in the Create New Database Wizard:

enter image description here

Sign up to request clarification or add additional context in comments.

5 Comments

Well, somehow I missed that bit. Thanks.
You also need to make sure the the SQL Server Service Account has the necessary permissions to access that location.
@SebastianMeine: yes, absolutely!
This isn't very obvious because the user must scroll the view panel to the right most times.
Note that you may need to add write permission to the database instance in order to have it write at that location; see stackoverflow.com/q/21663874/3873799#comment117383454_21665509

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.