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.
Add a comment
|
1 Answer
You can easily define both the path as well as the actual file name in the Create New Database Wizard:

5 Comments
mcu
Well, somehow I missed that bit. Thanks.
Sebastian Meine
You also need to make sure the the SQL Server Service Account has the necessary permissions to access that location.
marc_s
@SebastianMeine: yes, absolutely!
Marc.2377
This isn't very obvious because the user must scroll the view panel to the right most times.
alelom
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