I have a strange error occuring on one of my sql servers.
When I execute a CREATE DATABASE statement without
specifying any file locations, e.g. "CREATE DATABASE
fred", I get the following error:
[Microsoft][ODBC SQL Server Driver][SQL Server]Device
activation error. The physical file name '\fred.mdf' may
be incorrect.
[Microsoft][ODBC SQL Server Driver][SQL Server]CREATE
DATABASE failed. Some file names listed could not be
created. Check previous errors.
If I specify a location for the data file the but not the
log file it works ok. I set the default database
locations in the server properties and this then allowed
the original statement to work.
However, I would like to know where the error is coming
from. I assume that the default locations where
calculated based on either master of model, but where is
the file name error being generated?
Any pointers would be great.
Thanks,
Phil.> However, I would like to know where the error is coming
> from. I assume that the default locations where
> calculated based on either master of model, but where is
> the file name error being generated?
The default database file locations are stored in the registry and are not
related to the location of the master or model databases. When you set the
default locations using EM, this updates the registry entries that SQL
Server uses for CREATE DATABASE.
Hope this helps.
Dan Guzman
SQL Server MVP
"Phil" <philip@.intex.co.uk> wrote in message
news:4f2901c48067$e34c6d00$a601280a@.phx.gbl...
> I have a strange error occuring on one of my sql servers.
> When I execute a CREATE DATABASE statement without
> specifying any file locations, e.g. "CREATE DATABASE
> fred", I get the following error:
> [Microsoft][ODBC SQL Server Driver][SQL Server]Device
> activation error. The physical file name '\fred.mdf' may
> be incorrect.
> [Microsoft][ODBC SQL Server Driver][SQL Server]CREATE
> DATABASE failed. Some file names listed could not be
> created. Check previous errors.
> If I specify a location for the data file the but not the
> log file it works ok. I set the default database
> locations in the server properties and this then allowed
> the original statement to work.
> However, I would like to know where the error is coming
> from. I assume that the default locations where
> calculated based on either master of model, but where is
> the file name error being generated?
> Any pointers would be great.
> Thanks,
> Phil.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment