Showing posts with label mdf. Show all posts
Showing posts with label mdf. Show all posts

Monday, March 12, 2012

Issue with size

Dear gurus,
How could I figure out the size of one database in 2004?
Linking 2004 information(mdf) with the current one I will obtain how many
points in % has grow up that database, but how' Is that information lost?
I unfortunately think so.
Thanks in advance and regards,
Enricexamnotes (Enric@.discussions.microsoft.com) writes:
> How could I figure out the size of one database in 2004?
> Linking 2004 information(mdf) with the current one I will obtain how many
> points in % has grow up that database, but how' Is that information lost?
> I unfortunately think so.
I'm not sure I understand the question, but if the question is "how can I
find out how which size the database had as some point in year 2004?", then
I'm afraid that the only way to find out is to dig up a backup from
that time and restore it.
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||Exactly, you perfectly understood it. I am afraid that such solution would
jeopardise the system. If I have to restore each database (to tell the truth
are more than 40 databases) and then compare these data with the current one
.
The next one I'll try be more explicit. English is not my mother tongue.
Thanks in advance,
"Erland Sommarskog" wrote:

> examnotes (Enric@.discussions.microsoft.com) writes:
> I'm not sure I understand the question, but if the question is "how can I
> find out how which size the database had as some point in year 2004?", the
n
> I'm afraid that the only way to find out is to dig up a backup from
> that time and restore it.
>
> --
> Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
> Books Online for SQL Server SP3 at
> http://www.microsoft.com/sql/techin.../2000/books.asp
>|||> jeopardise the system. If I have to restore each database (to tell the
> truth
> are more than 40 databases) and then compare these data with the current
> one.
Then one thing you could do is log to an external system the results of,
say, sp_spaceused for each database, and do so periodically (e.g. daily,
wly, monthly). Then you will have a running history going forward at
least (given that it won't help you for historic data).|||Thanks Aaron,
"Aaron Bertrand [SQL Server MVP]" wrote:

> Then one thing you could do is log to an external system the results of,
> say, sp_spaceused for each database, and do so periodically (e.g. daily,
> wly, monthly). Then you will have a running history going forward at
> least (given that it won't help you for historic data).
>
>

Wednesday, March 7, 2012

Issue with Attaching database (MS SQL Server 2000)

Attach a database as MYDB_X using Enterprise manager. (File names:
MYDB_X.MDF & MYDB_X_LOG.LDF)
Detach this database,
Rename the files as MYDB_X11.MDF & MYDB_X11_LOG.LDF
Select this MDF file in Attach Database Dlg of Enterprise manager.
"Attach As" gets populated as MYDB_X (Name as last attached)
Attach DB as MYDB_X11.
Detach this database,
Rename the files as MYDB_X.MDF & MYDB_X_LOG.LDF
Select this MDF file in Attach Database Dlg of Enterprise manager.
"Attach As" gets populated as MYDB_X11 (Name as last attached)
Attach DB as MYDB_X.
Detach this database,
Select this MDF file in Attach Database Dlg of Enterprise manager,
"Attach As" gets populated as MYDB_X11
When MDF file is selected shouldnt it get populated with MYDB_X? Or how to
make sql server remember the last "Attach As"'
It seems that, "Database Name" property doesnt get updated everytime in Db
attach process... If database name length is more then only its updating.
DhirenHi
I think this is a known issue http://tinyurl.com/jk8fr, the workaround would
be to use sp_renamedb and attach it as the original name. If you are
attaching using sp_attach_db then it would not be an issue.
John
"Tinu" wrote:
> Attach a database as MYDB_X using Enterprise manager. (File names:
> MYDB_X.MDF & MYDB_X_LOG.LDF)
> Detach this database,
> Rename the files as MYDB_X11.MDF & MYDB_X11_LOG.LDF
> Select this MDF file in Attach Database Dlg of Enterprise manager.
> "Attach As" gets populated as MYDB_X (Name as last attached)
> Attach DB as MYDB_X11.
> Detach this database,
> Rename the files as MYDB_X.MDF & MYDB_X_LOG.LDF
> Select this MDF file in Attach Database Dlg of Enterprise manager.
> "Attach As" gets populated as MYDB_X11 (Name as last attached)
> Attach DB as MYDB_X.
> Detach this database,
> Select this MDF file in Attach Database Dlg of Enterprise manager,
> "Attach As" gets populated as MYDB_X11
> When MDF file is selected shouldnt it get populated with MYDB_X? Or how to
> make sql server remember the last "Attach As"'
> It seems that, "Database Name" property doesnt get updated everytime in Db
> attach process... If database name length is more then only its updating.
> Dhiren
>
>

Issue with Attaching database (MS SQL Server 2000)

Attach a database as MYDB_X using Enterprise manager. (File names:
MYDB_X.MDF & MYDB_X_LOG.LDF)
Detach this database,
Rename the files as MYDB_X11.MDF & MYDB_X11_LOG.LDF
Select this MDF file in Attach Database Dlg of Enterprise manager.
"Attach As" gets populated as MYDB_X (Name as last attached)
Attach DB as MYDB_X11.
Detach this database,
Rename the files as MYDB_X.MDF & MYDB_X_LOG.LDF
Select this MDF file in Attach Database Dlg of Enterprise manager.
"Attach As" gets populated as MYDB_X11 (Name as last attached)
Attach DB as MYDB_X.
Detach this database,
Select this MDF file in Attach Database Dlg of Enterprise manager,
"Attach As" gets populated as MYDB_X11
When MDF file is selected shouldnt it get populated with MYDB_X? Or how to
make sql server remember the last "Attach As"'
It seems that, "Database Name" property doesnt get updated everytime in Db
attach process... If database name length is more then only its updating.
DhirenHi
I think this is a known issue http://tinyurl.com/jk8fr, the workaround would
be to use sp_renamedb and attach it as the original name. If you are
attaching using sp_attach_db then it would not be an issue.
John
"Tinu" wrote:

> Attach a database as MYDB_X using Enterprise manager. (File names:
> MYDB_X.MDF & MYDB_X_LOG.LDF)
> Detach this database,
> Rename the files as MYDB_X11.MDF & MYDB_X11_LOG.LDF
> Select this MDF file in Attach Database Dlg of Enterprise manager.
> "Attach As" gets populated as MYDB_X (Name as last attached)
> Attach DB as MYDB_X11.
> Detach this database,
> Rename the files as MYDB_X.MDF & MYDB_X_LOG.LDF
> Select this MDF file in Attach Database Dlg of Enterprise manager.
> "Attach As" gets populated as MYDB_X11 (Name as last attached)
> Attach DB as MYDB_X.
> Detach this database,
> Select this MDF file in Attach Database Dlg of Enterprise manager,
> "Attach As" gets populated as MYDB_X11
> When MDF file is selected shouldnt it get populated with MYDB_X? Or how to
> make sql server remember the last "Attach As"'
> It seems that, "Database Name" property doesnt get updated everytime in Db
> attach process... If database name length is more then only its updating.
> Dhiren
>
>