Tuesday, March 27, 2012

Error 9004 attaching a database

I've been given a database backup in the form of an .mdf file, a bunch
of .ndf files, and a .log file. When I try to attach the .mdf file in
Server Management Studio, I get error 9004, An error occurred while
processing the log.
Any suggestions?
Phil Hibbs.Phil,
Kevin Farlee's answer has helped a couple of people with your problem.
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=598396&SiteID=1
RLF
"PhilHibbs" <snarks@.gmail.com> wrote in message
news:1193140510.353843.250240@.y27g2000pre.googlegroups.com...
> I've been given a database backup in the form of an .mdf file, a bunch
> of .ndf files, and a .log file. When I try to attach the .mdf file in
> Server Management Studio, I get error 9004, An error occurred while
> processing the log.
> Any suggestions?
> Phil Hibbs.
>|||On 23 Oct, 13:31, "Russell Fields" <russellfie...@.nomail.com> wrote:
> Kevin Farlee's answer has helped a couple of people with your problem.
> http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=598396&SiteID=1
Hm, looked promising, but when I try to "bring online" the database
with the files replaced, I get a load of errors in this form:
E:\data\data_file_09.ndf is not a primary database file
I have a .mdf file and 26 .ndf files, it looks like the creation of
the empty database is creating these files in a different way to the
original database.
Phil Hibbs.|||Phil,
Did you first create the 26 ndf files in your database to be replaced before
trying to copy the files into place?
RLF
"PhilHibbs" <snarks@.gmail.com> wrote in message
news:1193148065.531336.193770@.e34g2000pro.googlegroups.com...
> On 23 Oct, 13:31, "Russell Fields" <russellfie...@.nomail.com> wrote:
>> Kevin Farlee's answer has helped a couple of people with your problem.
>> http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=598396&SiteID=1
> Hm, looked promising, but when I try to "bring online" the database
> with the files replaced, I get a load of errors in this form:
> E:\data\data_file_09.ndf is not a primary database file
> I have a .mdf file and 26 .ndf files, it looks like the creation of
> the empty database is creating these files in a different way to the
> original database.
> Phil Hibbs.
>|||On 23 Oct, 20:15, "Russell Fields" <russellfie...@.nomail.com> wrote:
> Did you first create the 26 ndf files in your database to be replaced before
> trying to copy the files into place?
Yep. I made a big CREATE DATABASE statement with the .mdf and all
the .ndf files specified in it.
Phil Hibbs.|||On 23 Oct, 20:15, "Russell Fields" <russellfie...@.nomail.com> wrote:
> Did you first create the 26 ndf files in your database to be replaced before
> trying to copy the files into place?
Yep. I made a big CREATE DATABASE statement with the .mdf and all
the .ndf files specified in it.
Phil Hibbs.|||Phil,
I understand that you are using SQL Server 2005, since you mention
Management Studio. I have tested and not been able to duplicate your
problem. When you use SSMS to do the attach, have you pressed the Script
command at the top of the panel. This will provide an exact script of the
commands to be run. If you do that, perhaps you will see something helpful.
Or, you can post it here for review.
Obviously something is different between our setups. I am running SQL
Server 2005 SP2. Are you also running SP2? I ask because SP2 fixed some
Management Studio problems and you should update to it (plus some hotfixes)
if you have not done so.
This describe my patch level:
http://blogs.msdn.com/psssql/archive/2007/04/06/post-sql-server-2005-service-pack-2-sp2-fixes-explained.aspx
For more recent fixes, see also: http://support.microsoft.com/kb/937137/LN/
RLF
"PhilHibbs" <snarks@.gmail.com> wrote in message
news:1193222031.764752.35650@.v29g2000prd.googlegroups.com...
> On 23 Oct, 20:15, "Russell Fields" <russellfie...@.nomail.com> wrote:
>> Did you first create the 26 ndf files in your database to be replaced
>> before
>> trying to copy the files into place?
> Yep. I made a big CREATE DATABASE statement with the .mdf and all
> the .ndf files specified in it.
> Phil Hibbs.
>|||On 25 Oct, 17:34, "Russell Fields" <russellfie...@.nomail.com> wrote:
> I have tested and not been able to duplicate your
> problem.
I suspect that is because you don't have the same .mdf and .ndf
and .log files that I have.
Phil Hibbs.|||Phil, No doubt about that. Sorry this did not help. - RLF
"PhilHibbs" <snarks@.gmail.com> wrote in message
news:1193761341.010344.78000@.k79g2000hse.googlegroups.com...
> On 25 Oct, 17:34, "Russell Fields" <russellfie...@.nomail.com> wrote:
>> I have tested and not been able to duplicate your
>> problem.
> I suspect that is because you don't have the same .mdf and .ndf
> and .log files that I have.
> Phil Hibbs.
>

No comments:

Post a Comment