dbTalk Databases Forums  

Sql Database Files

microsoft.public.sqlserver.setup microsoft.public.sqlserver.setup


Discuss Sql Database Files in the microsoft.public.sqlserver.setup forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Scott
 
Posts: n/a

Default Sql Database Files - 08-11-2009 , 12:09 PM






Hello,
I'm hoping someone here can shed some light on this situation that has
me a little bewildered. My company has inherited a SQL 2000 server with a
number of databases on it. The drive these databases are on is slowly
running out of space so I decided to inspect the drive a little more closely
to see if there was any space that could be freed. What I have discovered
has
me a little confused. See, the SQL server has been installed on the D:\
with all the databases pointing to "D:\Databases". However, there also
seems to be a copy of the database file in "D:\Program Files\Microsoft SQL
Server\MSSQL\Data". I figured that perhaps the old DBA had just copied the
"D:\Databases" from "D:\Program Files\Microsoft SQL Server\MSSQL\Data" in a
schema change or something but when I tried to delete one of the files I
found that both sets of files in both directories were in use.

Can someone explain how this is possible and perhaps the reasoning
behind
it. It seems like a waste of space to me.

Thanks,
Scott

Reply With Quote
  #2  
Old   
Aaron Bertrand [SQL Server MVP]
 
Posts: n/a

Default Re: Sql Database Files - 08-11-2009 , 12:25 PM






You should see which files are in use by using

SELECT * FROM master.dbo.sysaltfiles;

You should also check to see if you have more than one instance of SQL
Server running.

Just blindly clicking on a file and deleting it may not be the smartest
thing to do, whether it is currently in use or not.



On 8/11/09 1:09 PM, in article gBhgm.130268$qx1.24625 (AT) newsfe04 (DOT) iad, "Scott"
<Scott (AT) Verifpoint (DOT) com> wrote:

Quote:
Hello,
I'm hoping someone here can shed some light on this situation that has
me a little bewildered. My company has inherited a SQL 2000 server with a
number of databases on it. The drive these databases are on is slowly
running out of space so I decided to inspect the drive a little more closely
to see if there was any space that could be freed. What I have discovered
has
me a little confused. See, the SQL server has been installed on the D:\
with all the databases pointing to "D:\Databases". However, there also
seems to be a copy of the database file in "D:\Program Files\Microsoft SQL
Server\MSSQL\Data". I figured that perhaps the old DBA had just copied the
"D:\Databases" from "D:\Program Files\Microsoft SQL Server\MSSQL\Data" in a
schema change or something but when I tried to delete one of the files I
found that both sets of files in both directories were in use.

Can someone explain how this is possible and perhaps the reasoning
behind
it. It seems like a waste of space to me.

Thanks,
Scott


Reply With Quote
  #3  
Old   
Scott
 
Posts: n/a

Default Re: Sql Database Files - 08-11-2009 , 12:58 PM



Yes, I have looked at this to see which file is "in use". However, both
sets of files seem to be current and in use despite what SQL says. It is
almost as if the database files are being mirrored between the two
directories. They match in every way...size, creation date, modifie date
and even growth rate. Even if I create a new database and specifiy the file
to go in "D:\Databases" it ends up in both. I'm confused about how this
even got set up this way and if there was a special thought behind it.

-Scott

"Aaron Bertrand [SQL Server MVP]" <ten.xoc (AT) dnartreb (DOT) noraa> wrote

Quote:
You should see which files are in use by using

SELECT * FROM master.dbo.sysaltfiles;

You should also check to see if you have more than one instance of SQL
Server running.

Just blindly clicking on a file and deleting it may not be the smartest
thing to do, whether it is currently in use or not.



On 8/11/09 1:09 PM, in article gBhgm.130268$qx1.24625 (AT) newsfe04 (DOT) iad,
"Scott"
Scott (AT) Verifpoint (DOT) com> wrote:

Hello,
I'm hoping someone here can shed some light on this situation that
has
me a little bewildered. My company has inherited a SQL 2000 server with
a
number of databases on it. The drive these databases are on is slowly
running out of space so I decided to inspect the drive a little more
closely
to see if there was any space that could be freed. What I have
discovered
has
me a little confused. See, the SQL server has been installed on the D:\
with all the databases pointing to "D:\Databases". However, there also
seems to be a copy of the database file in "D:\Program Files\Microsoft
SQL
Server\MSSQL\Data". I figured that perhaps the old DBA had just copied
the
"D:\Databases" from "D:\Program Files\Microsoft SQL Server\MSSQL\Data" in
a
schema change or something but when I tried to delete one of the files I
found that both sets of files in both directories were in use.

Can someone explain how this is possible and perhaps the reasoning
behind
it. It seems like a waste of space to me.

Thanks,
Scott



Reply With Quote
  #4  
Old   
Andrew J. Kelly
 
Posts: n/a

Default Re: Sql Database Files - 08-11-2009 , 01:17 PM



It sounds like someone created a mount point that points to the original
location. If that is the case it is not duplicate data or using extra space.

--
Andrew J. Kelly SQL MVP
Solid Quality Mentors


"Scott" <Scott (AT) Verifpoint (DOT) com> wrote

Quote:
Yes, I have looked at this to see which file is "in use". However, both
sets of files seem to be current and in use despite what SQL says. It is
almost as if the database files are being mirrored between the two
directories. They match in every way...size, creation date, modifie date
and even growth rate. Even if I create a new database and specifiy the
file to go in "D:\Databases" it ends up in both. I'm confused about how
this even got set up this way and if there was a special thought behind
it.

-Scott

"Aaron Bertrand [SQL Server MVP]" <ten.xoc (AT) dnartreb (DOT) noraa> wrote in
message news:C6A721C3.2209B%ten.xoc (AT) dnartreb (DOT) noraa...
You should see which files are in use by using

SELECT * FROM master.dbo.sysaltfiles;

You should also check to see if you have more than one instance of SQL
Server running.

Just blindly clicking on a file and deleting it may not be the smartest
thing to do, whether it is currently in use or not.



On 8/11/09 1:09 PM, in article gBhgm.130268$qx1.24625 (AT) newsfe04 (DOT) iad,
"Scott"
Scott (AT) Verifpoint (DOT) com> wrote:

Hello,
I'm hoping someone here can shed some light on this situation that
has
me a little bewildered. My company has inherited a SQL 2000 server with
a
number of databases on it. The drive these databases are on is slowly
running out of space so I decided to inspect the drive a little more
closely
to see if there was any space that could be freed. What I have
discovered
has
me a little confused. See, the SQL server has been installed on the D:\
with all the databases pointing to "D:\Databases". However, there also
seems to be a copy of the database file in "D:\Program Files\Microsoft
SQL
Server\MSSQL\Data". I figured that perhaps the old DBA had just copied
the
"D:\Databases" from "D:\Program Files\Microsoft SQL Server\MSSQL\Data"
in a
schema change or something but when I tried to delete one of the files I
found that both sets of files in both directories were in use.

Can someone explain how this is possible and perhaps the reasoning
behind
it. It seems like a waste of space to me.

Thanks,
Scott





Reply With Quote
  #5  
Old   
Scott
 
Posts: n/a

Default Re: Sql Database Files - 08-11-2009 , 01:31 PM



I thought that might be the case aswell but I do not see any mountpoints in
the system. There is just one hard disk with two partitions, C and D.

"Andrew J. Kelly" <sqlmvpnooospam (AT) shadhawk (DOT) com> wrote

Quote:
It sounds like someone created a mount point that points to the original
location. If that is the case it is not duplicate data or using extra
space.

--
Andrew J. Kelly SQL MVP
Solid Quality Mentors


"Scott" <Scott (AT) Verifpoint (DOT) com> wrote in message
news:fjigm.111398$9P.16044 (AT) newsfe08 (DOT) iad...
Yes, I have looked at this to see which file is "in use". However, both
sets of files seem to be current and in use despite what SQL says. It is
almost as if the database files are being mirrored between the two
directories. They match in every way...size, creation date, modifie date
and even growth rate. Even if I create a new database and specifiy the
file to go in "D:\Databases" it ends up in both. I'm confused about how
this even got set up this way and if there was a special thought behind
it.

-Scott

"Aaron Bertrand [SQL Server MVP]" <ten.xoc (AT) dnartreb (DOT) noraa> wrote in
message news:C6A721C3.2209B%ten.xoc (AT) dnartreb (DOT) noraa...
You should see which files are in use by using

SELECT * FROM master.dbo.sysaltfiles;

You should also check to see if you have more than one instance of SQL
Server running.

Just blindly clicking on a file and deleting it may not be the smartest
thing to do, whether it is currently in use or not.



On 8/11/09 1:09 PM, in article gBhgm.130268$qx1.24625 (AT) newsfe04 (DOT) iad,
"Scott"
Scott (AT) Verifpoint (DOT) com> wrote:

Hello,
I'm hoping someone here can shed some light on this situation that
has
me a little bewildered. My company has inherited a SQL 2000 server
with a
number of databases on it. The drive these databases are on is slowly
running out of space so I decided to inspect the drive a little more
closely
to see if there was any space that could be freed. What I have
discovered
has
me a little confused. See, the SQL server has been installed on the
D:\
with all the databases pointing to "D:\Databases". However, there also
seems to be a copy of the database file in "D:\Program Files\Microsoft
SQL
Server\MSSQL\Data". I figured that perhaps the old DBA had just copied
the
"D:\Databases" from "D:\Program Files\Microsoft SQL Server\MSSQL\Data"
in a
schema change or something but when I tried to delete one of the files
I
found that both sets of files in both directories were in use.

Can someone explain how this is possible and perhaps the reasoning
behind
it. It seems like a waste of space to me.

Thanks,
Scott






Reply With Quote
  #6  
Old   
Erland Sommarskog
 
Posts: n/a

Default Re: Sql Database Files - 08-11-2009 , 05:14 PM



Scott (Scott (AT) Verifpoint (DOT) com) writes:
Quote:
I thought that might be the case aswell but I do not see any mountpoints
in the system. There is just one hard disk with two partitions, C and
D.
I think Andy used the incorrect teminology. They are not mountpoints, they
are just muliple links to the same directory. And as Andy says, save the
extra node for the link, there is no duplicate space wasted.

--
Erland Sommarskog, SQL Server MVP, esquel (AT) sommarskog (DOT) se

Links for SQL Server Books Online:
SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
SQL 2000: http://www.microsoft.com/sql/prodinf...ons/books.mspx

Reply With Quote
  #7  
Old   
Scott
 
Posts: n/a

Default Re: Sql Database Files - 08-11-2009 , 05:39 PM



How can I check for these? I do not think this is the case because the
amount of space used on the drive doesn't add up if it were but I'd like to
check just to make sure.

"Erland Sommarskog" <esquel (AT) sommarskog (DOT) se> wrote

Quote:
Scott (Scott (AT) Verifpoint (DOT) com) writes:
I thought that might be the case aswell but I do not see any mountpoints
in the system. There is just one hard disk with two partitions, C and
D.

I think Andy used the incorrect teminology. They are not mountpoints, they
are just muliple links to the same directory. And as Andy says, save the
extra node for the link, there is no duplicate space wasted.

--
Erland Sommarskog, SQL Server MVP, esquel (AT) sommarskog (DOT) se

Links for SQL Server Books Online:
SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
SQL 2000:
http://www.microsoft.com/sql/prodinf...ons/books.mspx

Reply With Quote
  #8  
Old   
Rick Byham, MSFT
 
Posts: n/a

Default Re: Sql Database Files - 08-12-2009 , 11:42 AM



What happens if you create a text file in that location using Notepad. Does
it show up in both places?
--
Rick Byham, MSFT
(Implies no warranty or rights)


"Scott" <Scott (AT) Verifpoint (DOT) com> wrote

Quote:
How can I check for these? I do not think this is the case because the
amount of space used on the drive doesn't add up if it were but I'd like
to check just to make sure.

"Erland Sommarskog" <esquel (AT) sommarskog (DOT) se> wrote in message
news:Xns9C651320BB39Yazorman (AT) 127 (DOT) 0.0.1...
Scott (Scott (AT) Verifpoint (DOT) com) writes:
I thought that might be the case aswell but I do not see any mountpoints
in the system. There is just one hard disk with two partitions, C and
D.

I think Andy used the incorrect teminology. They are not mountpoints,
they
are just muliple links to the same directory. And as Andy says, save the
extra node for the link, there is no duplicate space wasted.

--
Erland Sommarskog, SQL Server MVP, esquel (AT) sommarskog (DOT) se

Links for SQL Server Books Online:
SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
SQL 2000:
http://www.microsoft.com/sql/prodinf...ons/books.mspx



Reply With Quote
  #9  
Old   
Scott
 
Posts: n/a

Default Re: Sql Database Files - 08-12-2009 , 12:10 PM



Why yes, yes it does. So I guess this isn't something that has been set up
in SQL but something set up in the OS. I took a second look through the
installe dprograms and I didn't see anything that would mirror the two
directories. Any thoughts on what could be doing this?


"Rick Byham, MSFT" <rickbyh (AT) microsoft (DOT) com> wrote

Quote:
What happens if you create a text file in that location using Notepad.
Does it show up in both places?
--
Rick Byham, MSFT
(Implies no warranty or rights)


"Scott" <Scott (AT) Verifpoint (DOT) com> wrote in message
news:uqmgm.53982$sC1.18217 (AT) newsfe17 (DOT) iad...
How can I check for these? I do not think this is the case because the
amount of space used on the drive doesn't add up if it were but I'd like
to check just to make sure.

"Erland Sommarskog" <esquel (AT) sommarskog (DOT) se> wrote in message
news:Xns9C651320BB39Yazorman (AT) 127 (DOT) 0.0.1...
Scott (Scott (AT) Verifpoint (DOT) com) writes:
I thought that might be the case aswell but I do not see any
mountpoints
in the system. There is just one hard disk with two partitions, C and
D.

I think Andy used the incorrect teminology. They are not mountpoints,
they
are just muliple links to the same directory. And as Andy says, save the
extra node for the link, there is no duplicate space wasted.

--
Erland Sommarskog, SQL Server MVP, esquel (AT) sommarskog (DOT) se

Links for SQL Server Books Online:
SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
SQL 2000:
http://www.microsoft.com/sql/prodinf...ons/books.mspx





Reply With Quote
  #10  
Old   
Andrew J. Kelly
 
Posts: n/a

Default Re: Sql Database Files - 08-12-2009 , 12:10 PM



Yes that would have been my next suggestion as well and should answer that
question. But the bottom line is that sql server does not have the
capability to have duplicate data files so there has to be a more simple
explanation.

--
Andrew J. Kelly SQL MVP
Solid Quality Mentors


"Rick Byham, MSFT" <rickbyh (AT) microsoft (DOT) com> wrote

Quote:
What happens if you create a text file in that location using Notepad.
Does it show up in both places?
--
Rick Byham, MSFT
(Implies no warranty or rights)


"Scott" <Scott (AT) Verifpoint (DOT) com> wrote in message
news:uqmgm.53982$sC1.18217 (AT) newsfe17 (DOT) iad...
How can I check for these? I do not think this is the case because the
amount of space used on the drive doesn't add up if it were but I'd like
to check just to make sure.

"Erland Sommarskog" <esquel (AT) sommarskog (DOT) se> wrote in message
news:Xns9C651320BB39Yazorman (AT) 127 (DOT) 0.0.1...
Scott (Scott (AT) Verifpoint (DOT) com) writes:
I thought that might be the case aswell but I do not see any
mountpoints
in the system. There is just one hard disk with two partitions, C and
D.

I think Andy used the incorrect teminology. They are not mountpoints,
they
are just muliple links to the same directory. And as Andy says, save the
extra node for the link, there is no duplicate space wasted.

--
Erland Sommarskog, SQL Server MVP, esquel (AT) sommarskog (DOT) se

Links for SQL Server Books Online:
SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
SQL 2000:
http://www.microsoft.com/sql/prodinf...ons/books.mspx





Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.