Problem:
Contractor migrated Great Plains databases to new server (Win2000, SQL2000).
Databases are set up in reverse. Data is stored in .ldf, and log files are
stored in .mdf. Log file(.mdf) out of control and needs to be shrunk. (Kno
w
how to do this)
Can I shrink the logs even though they're in .mdf named files?
Is it ok to leave them alone in the reversed naming convention state?
Can I detach the databases, create a new .mdf, restore the database(.ldf)
from backup to the new .mdf file? If so, do I need to restore the log file
also, or can I start a new one from scratch?
Thanks for the help.Name is totally irrelevant to SQL Server, as well as extension. If you feel
it is OK, you can keep
the names. One option is to backup, detach (for safety - keep the files some
where else), and with
restore use the MOVE option to specify new file names. Or possibly only deta
ch, rename files and
attach specifying new correct file names (do this from QA not EM - QA gives
you full control over
the parameters used to sp_attach_db procedure).
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Rick A" <Rick A@.discussions.microsoft.com> wrote in message
news:326AE016-3AAE-47B0-B216-E8EA16549B6A@.microsoft.com...
> Problem:
> Contractor migrated Great Plains databases to new server (Win2000, SQL2000
).
> Databases are set up in reverse. Data is stored in .ldf, and log files ar
e
> stored in .mdf. Log file(.mdf) out of control and needs to be shrunk. (K
now
> how to do this)
> Can I shrink the logs even though they're in .mdf named files?
> Is it ok to leave them alone in the reversed naming convention state?
> Can I detach the databases, create a new .mdf, restore the database(.ldf)
> from backup to the new .mdf file? If so, do I need to restore the log fil
e
> also, or can I start a new one from scratch?
> Thanks for the help.
>
>
>
>sql
Showing posts with label ldf. Show all posts
Showing posts with label ldf. Show all posts
Thursday, March 29, 2012
Database stored in .ldf file
Problem:
Contractor migrated Great Plains databases to new server (Win2000, SQL2000).
Databases are set up in reverse. Data is stored in .ldf, and log files are
stored in .mdf. Log file(.mdf) out of control and needs to be shrunk. (Know
how to do this)
Can I shrink the logs even though they're in .mdf named files?
Is it ok to leave them alone in the reversed naming convention state?
Can I detach the databases, create a new .mdf, restore the database(.ldf)
from backup to the new .mdf file? If so, do I need to restore the log file
also, or can I start a new one from scratch?
Thanks for the help.
Name is totally irrelevant to SQL Server, as well as extension. If you feel it is OK, you can keep
the names. One option is to backup, detach (for safety - keep the files somewhere else), and with
restore use the MOVE option to specify new file names. Or possibly only detach, rename files and
attach specifying new correct file names (do this from QA not EM - QA gives you full control over
the parameters used to sp_attach_db procedure).
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Rick A" <Rick A@.discussions.microsoft.com> wrote in message
news:326AE016-3AAE-47B0-B216-E8EA16549B6A@.microsoft.com...
> Problem:
> Contractor migrated Great Plains databases to new server (Win2000, SQL2000).
> Databases are set up in reverse. Data is stored in .ldf, and log files are
> stored in .mdf. Log file(.mdf) out of control and needs to be shrunk. (Know
> how to do this)
> Can I shrink the logs even though they're in .mdf named files?
> Is it ok to leave them alone in the reversed naming convention state?
> Can I detach the databases, create a new .mdf, restore the database(.ldf)
> from backup to the new .mdf file? If so, do I need to restore the log file
> also, or can I start a new one from scratch?
> Thanks for the help.
>
>
>
>
Contractor migrated Great Plains databases to new server (Win2000, SQL2000).
Databases are set up in reverse. Data is stored in .ldf, and log files are
stored in .mdf. Log file(.mdf) out of control and needs to be shrunk. (Know
how to do this)
Can I shrink the logs even though they're in .mdf named files?
Is it ok to leave them alone in the reversed naming convention state?
Can I detach the databases, create a new .mdf, restore the database(.ldf)
from backup to the new .mdf file? If so, do I need to restore the log file
also, or can I start a new one from scratch?
Thanks for the help.
Name is totally irrelevant to SQL Server, as well as extension. If you feel it is OK, you can keep
the names. One option is to backup, detach (for safety - keep the files somewhere else), and with
restore use the MOVE option to specify new file names. Or possibly only detach, rename files and
attach specifying new correct file names (do this from QA not EM - QA gives you full control over
the parameters used to sp_attach_db procedure).
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Rick A" <Rick A@.discussions.microsoft.com> wrote in message
news:326AE016-3AAE-47B0-B216-E8EA16549B6A@.microsoft.com...
> Problem:
> Contractor migrated Great Plains databases to new server (Win2000, SQL2000).
> Databases are set up in reverse. Data is stored in .ldf, and log files are
> stored in .mdf. Log file(.mdf) out of control and needs to be shrunk. (Know
> how to do this)
> Can I shrink the logs even though they're in .mdf named files?
> Is it ok to leave them alone in the reversed naming convention state?
> Can I detach the databases, create a new .mdf, restore the database(.ldf)
> from backup to the new .mdf file? If so, do I need to restore the log file
> also, or can I start a new one from scratch?
> Thanks for the help.
>
>
>
>
Database stored in .ldf file
Problem:
Contractor migrated Great Plains databases to new server (Win2000, SQL2000).
Databases are set up in reverse. Data is stored in .ldf, and log files are
stored in .mdf. Log file(.mdf) out of control and needs to be shrunk. (Know
how to do this)
Can I shrink the logs even though they're in .mdf named files?
Is it ok to leave them alone in the reversed naming convention state?
Can I detach the databases, create a new .mdf, restore the database(.ldf)
from backup to the new .mdf file? If so, do I need to restore the log file
also, or can I start a new one from scratch?
Thanks for the help.Name is totally irrelevant to SQL Server, as well as extension. If you feel it is OK, you can keep
the names. One option is to backup, detach (for safety - keep the files somewhere else), and with
restore use the MOVE option to specify new file names. Or possibly only detach, rename files and
attach specifying new correct file names (do this from QA not EM - QA gives you full control over
the parameters used to sp_attach_db procedure).
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Rick A" <Rick A@.discussions.microsoft.com> wrote in message
news:326AE016-3AAE-47B0-B216-E8EA16549B6A@.microsoft.com...
> Problem:
> Contractor migrated Great Plains databases to new server (Win2000, SQL2000).
> Databases are set up in reverse. Data is stored in .ldf, and log files are
> stored in .mdf. Log file(.mdf) out of control and needs to be shrunk. (Know
> how to do this)
> Can I shrink the logs even though they're in .mdf named files?
> Is it ok to leave them alone in the reversed naming convention state?
> Can I detach the databases, create a new .mdf, restore the database(.ldf)
> from backup to the new .mdf file? If so, do I need to restore the log file
> also, or can I start a new one from scratch?
> Thanks for the help.
>
>
>
>
Contractor migrated Great Plains databases to new server (Win2000, SQL2000).
Databases are set up in reverse. Data is stored in .ldf, and log files are
stored in .mdf. Log file(.mdf) out of control and needs to be shrunk. (Know
how to do this)
Can I shrink the logs even though they're in .mdf named files?
Is it ok to leave them alone in the reversed naming convention state?
Can I detach the databases, create a new .mdf, restore the database(.ldf)
from backup to the new .mdf file? If so, do I need to restore the log file
also, or can I start a new one from scratch?
Thanks for the help.Name is totally irrelevant to SQL Server, as well as extension. If you feel it is OK, you can keep
the names. One option is to backup, detach (for safety - keep the files somewhere else), and with
restore use the MOVE option to specify new file names. Or possibly only detach, rename files and
attach specifying new correct file names (do this from QA not EM - QA gives you full control over
the parameters used to sp_attach_db procedure).
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Rick A" <Rick A@.discussions.microsoft.com> wrote in message
news:326AE016-3AAE-47B0-B216-E8EA16549B6A@.microsoft.com...
> Problem:
> Contractor migrated Great Plains databases to new server (Win2000, SQL2000).
> Databases are set up in reverse. Data is stored in .ldf, and log files are
> stored in .mdf. Log file(.mdf) out of control and needs to be shrunk. (Know
> how to do this)
> Can I shrink the logs even though they're in .mdf named files?
> Is it ok to leave them alone in the reversed naming convention state?
> Can I detach the databases, create a new .mdf, restore the database(.ldf)
> from backup to the new .mdf file? If so, do I need to restore the log file
> also, or can I start a new one from scratch?
> Thanks for the help.
>
>
>
>
Thursday, March 22, 2012
Database Size
Hi,
I have create Database with size 200 md and 40 mb for mdf and ldf
respectively (Fixed Size - not go grow or shrink) while creating database,
using wizard, little later i checked database size it became with default
size automatically.
How can I create database with Fixed size
Thanks
Mothi KannanIn sql Enterprise Manager right click your database and use the data and log
tabs to set the sizes. be sure to uncheck the autogrow stuff..
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Mothi" <Mothi@.discussions.microsoft.com> wrote in message
news:2AAF530A-5462-4E60-8D28-D76D7429DFC4@.microsoft.com...
> Hi,
> I have create Database with size 200 md and 40 mb for mdf and ldf
> respectively (Fixed Size - not go grow or shrink) while creating database,
> using wizard, little later i checked database size it became with default
> size automatically.
> How can I create database with Fixed size
> Thanks
> Mothi Kannan
I have create Database with size 200 md and 40 mb for mdf and ldf
respectively (Fixed Size - not go grow or shrink) while creating database,
using wizard, little later i checked database size it became with default
size automatically.
How can I create database with Fixed size
Thanks
Mothi KannanIn sql Enterprise Manager right click your database and use the data and log
tabs to set the sizes. be sure to uncheck the autogrow stuff..
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Mothi" <Mothi@.discussions.microsoft.com> wrote in message
news:2AAF530A-5462-4E60-8D28-D76D7429DFC4@.microsoft.com...
> Hi,
> I have create Database with size 200 md and 40 mb for mdf and ldf
> respectively (Fixed Size - not go grow or shrink) while creating database,
> using wizard, little later i checked database size it became with default
> size automatically.
> How can I create database with Fixed size
> Thanks
> Mothi Kannan
Saturday, February 25, 2012
Database Renaming
Can anyone suggest a quick and easy way to rename a database AND .MDF/.LDF file in SQL Server?
I can not, for the life of me, figure out a way to do this.
Help?You could try to backup database and restore it with another name like this (before restoring you may delete old database).
Old db name is rDB, new will be rrDB.
RESTORE DATABASE rrDB
FROM DISK = 'w:\rdb.bak'
WITH MOVE 'rDB_Data' TO 'w:\rrDB.mdf',
MOVE 'rDB_Log' TO 'w:\rrDB.ldf'|||Originally posted by JBoyce
Can anyone suggest a quick and easy way to rename a database AND .MDF/.LDF file in SQL Server?
I can not, for the life of me, figure out a way to do this.
Help?
You can also use sp_renamedb|||Originally posted by smasanam
You can also use sp_renamedb
But file names will be the same...|||"Alter database" has a way to rename logical files, but the physical files will remain the same. If the DB name and the filenames all have to change, then Snail has the right way to go.
I can not, for the life of me, figure out a way to do this.
Help?You could try to backup database and restore it with another name like this (before restoring you may delete old database).
Old db name is rDB, new will be rrDB.
RESTORE DATABASE rrDB
FROM DISK = 'w:\rdb.bak'
WITH MOVE 'rDB_Data' TO 'w:\rrDB.mdf',
MOVE 'rDB_Log' TO 'w:\rrDB.ldf'|||Originally posted by JBoyce
Can anyone suggest a quick and easy way to rename a database AND .MDF/.LDF file in SQL Server?
I can not, for the life of me, figure out a way to do this.
Help?
You can also use sp_renamedb|||Originally posted by smasanam
You can also use sp_renamedb
But file names will be the same...|||"Alter database" has a way to rename logical files, but the physical files will remain the same. If the DB name and the filenames all have to change, then Snail has the right way to go.
Friday, February 24, 2012
Database Recovery Issue
We had a hard drive crash on one of our servers. There are no backups of the
database available but we were able to recover the MDF and LDf for the only
database that was on the server. The server had to be rebuilt and SQL
reinstalled. The question I have, is there a way to recover this database
using the MDF and LDF files. I tried using the sp_attach_db command but
without much success (don't know if I used the wrong parameters or what). Any
suggestions would be greatly appreciated.There are several possibilities depending on the state of the database and
files involved. Your best bet is to contact PSS
(http://support.microsoft.com) who will be able to help you get up and
running again (and fix your backup process, of course :-)
Regards.
--
Paul Randal
Dev Lead, Microsoft SQL Server Storage Engine
This posting is provided "AS IS" with no warranties, and confers no rights.
"MACason" <MACason@.discussions.microsoft.com> wrote in message
news:987BCD70-4AD9-42A6-AF66-CBB37EECB647@.microsoft.com...
> We had a hard drive crash on one of our servers. There are no backups of
the
> database available but we were able to recover the MDF and LDf for the
only
> database that was on the server. The server had to be rebuilt and SQL
> reinstalled. The question I have, is there a way to recover this database
> using the MDF and LDF files. I tried using the sp_attach_db command but
> without much success (don't know if I used the wrong parameters or what).
Any
> suggestions would be greatly appreciated.
database available but we were able to recover the MDF and LDf for the only
database that was on the server. The server had to be rebuilt and SQL
reinstalled. The question I have, is there a way to recover this database
using the MDF and LDF files. I tried using the sp_attach_db command but
without much success (don't know if I used the wrong parameters or what). Any
suggestions would be greatly appreciated.There are several possibilities depending on the state of the database and
files involved. Your best bet is to contact PSS
(http://support.microsoft.com) who will be able to help you get up and
running again (and fix your backup process, of course :-)
Regards.
--
Paul Randal
Dev Lead, Microsoft SQL Server Storage Engine
This posting is provided "AS IS" with no warranties, and confers no rights.
"MACason" <MACason@.discussions.microsoft.com> wrote in message
news:987BCD70-4AD9-42A6-AF66-CBB37EECB647@.microsoft.com...
> We had a hard drive crash on one of our servers. There are no backups of
the
> database available but we were able to recover the MDF and LDf for the
only
> database that was on the server. The server had to be rebuilt and SQL
> reinstalled. The question I have, is there a way to recover this database
> using the MDF and LDF files. I tried using the sp_attach_db command but
> without much success (don't know if I used the wrong parameters or what).
Any
> suggestions would be greatly appreciated.
Database Recovery Issue
We had a hard drive crash on one of our servers. There are no backups of the
database available but we were able to recover the MDF and LDf for the only
database that was on the server. The server had to be rebuilt and SQL
reinstalled. The question I have, is there a way to recover this database
using the MDF and LDF files. I tried using the sp_attach_db command but
without much success (don't know if I used the wrong parameters or what). Any
suggestions would be greatly appreciated.
There are several possibilities depending on the state of the database and
files involved. Your best bet is to contact PSS
(http://support.microsoft.com) who will be able to help you get up and
running again (and fix your backup process, of course :-)
Regards.
Paul Randal
Dev Lead, Microsoft SQL Server Storage Engine
This posting is provided "AS IS" with no warranties, and confers no rights.
"MACason" <MACason@.discussions.microsoft.com> wrote in message
news:987BCD70-4AD9-42A6-AF66-CBB37EECB647@.microsoft.com...
> We had a hard drive crash on one of our servers. There are no backups of
the
> database available but we were able to recover the MDF and LDf for the
only
> database that was on the server. The server had to be rebuilt and SQL
> reinstalled. The question I have, is there a way to recover this database
> using the MDF and LDF files. I tried using the sp_attach_db command but
> without much success (don't know if I used the wrong parameters or what).
Any
> suggestions would be greatly appreciated.
database available but we were able to recover the MDF and LDf for the only
database that was on the server. The server had to be rebuilt and SQL
reinstalled. The question I have, is there a way to recover this database
using the MDF and LDF files. I tried using the sp_attach_db command but
without much success (don't know if I used the wrong parameters or what). Any
suggestions would be greatly appreciated.
There are several possibilities depending on the state of the database and
files involved. Your best bet is to contact PSS
(http://support.microsoft.com) who will be able to help you get up and
running again (and fix your backup process, of course :-)
Regards.
Paul Randal
Dev Lead, Microsoft SQL Server Storage Engine
This posting is provided "AS IS" with no warranties, and confers no rights.
"MACason" <MACason@.discussions.microsoft.com> wrote in message
news:987BCD70-4AD9-42A6-AF66-CBB37EECB647@.microsoft.com...
> We had a hard drive crash on one of our servers. There are no backups of
the
> database available but we were able to recover the MDF and LDf for the
only
> database that was on the server. The server had to be rebuilt and SQL
> reinstalled. The question I have, is there a way to recover this database
> using the MDF and LDF files. I tried using the sp_attach_db command but
> without much success (don't know if I used the wrong parameters or what).
Any
> suggestions would be greatly appreciated.
Database Recovery Issue
We had a hard drive crash on one of our servers. There are no backups of the
database available but we were able to recover the MDF and LDf for the only
database that was on the server. The server had to be rebuilt and SQL
reinstalled. The question I have, is there a way to recover this database
using the MDF and LDF files. I tried using the sp_attach_db command but
without much success (don't know if I used the wrong parameters or what). An
y
suggestions would be greatly appreciated.There are several possibilities depending on the state of the database and
files involved. Your best bet is to contact PSS
(http://support.microsoft.com) who will be able to help you get up and
running again (and fix your backup process, of course :-)
Regards.
Paul Randal
Dev Lead, Microsoft SQL Server Storage Engine
This posting is provided "AS IS" with no warranties, and confers no rights.
"MACason" <MACason@.discussions.microsoft.com> wrote in message
news:987BCD70-4AD9-42A6-AF66-CBB37EECB647@.microsoft.com...
> We had a hard drive crash on one of our servers. There are no backups of
the
> database available but we were able to recover the MDF and LDf for the
only
> database that was on the server. The server had to be rebuilt and SQL
> reinstalled. The question I have, is there a way to recover this database
> using the MDF and LDF files. I tried using the sp_attach_db command but
> without much success (don't know if I used the wrong parameters or what).
Any
> suggestions would be greatly appreciated.
database available but we were able to recover the MDF and LDf for the only
database that was on the server. The server had to be rebuilt and SQL
reinstalled. The question I have, is there a way to recover this database
using the MDF and LDF files. I tried using the sp_attach_db command but
without much success (don't know if I used the wrong parameters or what). An
y
suggestions would be greatly appreciated.There are several possibilities depending on the state of the database and
files involved. Your best bet is to contact PSS
(http://support.microsoft.com) who will be able to help you get up and
running again (and fix your backup process, of course :-)
Regards.
Paul Randal
Dev Lead, Microsoft SQL Server Storage Engine
This posting is provided "AS IS" with no warranties, and confers no rights.
"MACason" <MACason@.discussions.microsoft.com> wrote in message
news:987BCD70-4AD9-42A6-AF66-CBB37EECB647@.microsoft.com...
> We had a hard drive crash on one of our servers. There are no backups of
the
> database available but we were able to recover the MDF and LDf for the
only
> database that was on the server. The server had to be rebuilt and SQL
> reinstalled. The question I have, is there a way to recover this database
> using the MDF and LDF files. I tried using the sp_attach_db command but
> without much success (don't know if I used the wrong parameters or what).
Any
> suggestions would be greatly appreciated.
Subscribe to:
Posts (Atom)