Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
abhishek20c
Starting Member
4 Posts |
Posted - 2010-11-26 : 03:54:11
|
Hi, I am trying to create a new database in MS SQL server 2008 using Management studio, but when I am trying to create a new database I am getting the error An exception occurred while executing a Transact-SQL statement or batch. Directory lookup for the file "I:\SQL Server\DATA\aa.mdf" failed with the operating system error 3 There is no I drive in my system.Please help... |
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2010-11-26 : 04:15:59
|
When creating a database then you have to specify the path for mdf and ldf file.So where the I: Drive is coming from when you haven't typed in that path? No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
nigelrivett
Master Smack Fu Yak Hacker
3385 Posts |
Posted - 2010-11-26 : 04:17:41
|
How are you trying to create it?Sounds like the server doesn't have permission on that directory.Try using a create database command in a query window instead.oopsMaybe the default path is set to the I drive and it doesn't exist. You'll have to change the file location (or the defaults)==========================================Cursors are useful if you don't know sql.SSIS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
abhishek20c
Starting Member
4 Posts |
Posted - 2010-11-26 : 04:43:48
|
How to change the default path locations??Is it possible to change through management studioquote: Originally posted by nigelrivett How are you trying to create it?Sounds like the server doesn't have permission on that directory.Try using a create database command in a query window instead.oopsMaybe the default path is set to the I drive and it doesn't exist. You'll have to change the file location (or the defaults)==========================================Cursors are useful if you don't know sql.SSIS can be used in a similar way.Beer is not cold and it isn't fizzy.
|
 |
|
abhishek20c
Starting Member
4 Posts |
Posted - 2010-11-26 : 04:56:13
|
I am creating the database through management studio and it is not asking for mdf or any file.I used to do same steps in MS SQL 2005 also.Right click on databases and select new database to create a new database |
 |
|
nigelrivett
Master Smack Fu Yak Hacker
3385 Posts |
Posted - 2010-11-26 : 05:09:17
|
If you scroll along the large pane you should see a path field with the path for the .mdf and .ldf. create database statement is easier.Also right click on the server and look at database settings - check the default file location.==========================================Cursors are useful if you don't know sql.SSIS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
abhishek20c
Starting Member
4 Posts |
Posted - 2010-11-26 : 05:43:17
|
Thanks it worked, I changed the location in default database settings , it was pointing to wrong location earlier.Thanks for the help |
 |
|
|
|
|