Monday, March 19, 2012

Bug when changing the default data and log directories

We have seen this problem on several SQL 2000 Standard Servers and was wonde
ring if anyone else had encountered it:
We started having problems restoring databases. We were receving errors tha
t the physical files paths were incorrect. When we looked at the file paths
for the databases we noticed that they looked like this "e:\mssql\data\\fil
e.mdf" and "F:\mssql\logs\\
logfile.ldf"" Note the double slashes.
What we found that is we changed the default data and log paths through ente
rprise manager. When we did it, we went to EM, clicked the browse button an
d then selected the target directories. This left the settings looking like
this:
"E:\mssql\data\"
"F:\mssql\logs\"
When you create a database through EM, everything works fine. When you crea
te a database using the create database command, it gets created with the do
uble backslashes in the file path for the data and log files.
We have been able to re-create this on several servers. If you take out the
trailing backslashes and stop and start the MSSQL Service (it appears chang
es to this setting only takes affect after a service stop and start even tho
ugh the running value would
indicate otherwise) then the 'create database' function work fine and only i
nserts single slashes from then on.
We are running SQL 2000 SP3 and we haven't been able to find any other docum
ented instance of this. If anyone else can re-create this issue we would be
very grateful to hear that it isn't something we are doing wrong.
ThanksThis is a known issue but I don't think there is a KB article. As you have
found, the default data and log directory strings should not have a trailing
backslash or you get the \\ in the filepath. Whilst it may be fixed in a
future service pack, it seems unlikely as it has been round for a while, is
fairly benign and has a simple workaround.
HTH
Jasper Smith (SQL Server MVP)
I support PASS - the definitive, global
community for SQL Server professionals -
http://www.sqlpass.org
"Mike Holleran" <mholleran@.infodir.com> wrote in message
news:ED046519-1519-4579-A6FE-F5EE63C18B05@.microsoft.com...
> We have seen this problem on several SQL 2000 Standard Servers and was
wondering if anyone else had encountered it:
> We started having problems restoring databases. We were receving errors
that the physical files paths were incorrect. When we looked at the file
paths for the databases we noticed that they looked like this
"e:\mssql\data\\file.mdf" and "F:\mssql\logs\\logfile.ldf"" Note the double
slashes.
> What we found that is we changed the default data and log paths through
enterprise manager. When we did it, we went to EM, clicked the browse
button and then selected the target directories. This left the settings
looking like this:
> "E:\mssql\data\"
> "F:\mssql\logs\"
> When you create a database through EM, everything works fine. When you
create a database using the create database command, it gets created with
the double backslashes in the file path for the data and log files.
> We have been able to re-create this on several servers. If you take out
the trailing backslashes and stop and start the MSSQL Service (it appears
changes to this setting only takes affect after a service stop and start
even though the running value would indicate otherwise) then the 'create
database' function work fine and only inserts single slashes from then on.
> We are running SQL 2000 SP3 and we haven't been able to find any other
documented instance of this. If anyone else can re-create this issue we
would be very grateful to hear that it isn't something we are doing wrong.
> Thanks
>
>
>

No comments:

Post a Comment