Monday, March 12, 2012

How bad is this??

After detaching a database and deleting the logfile, I use
sp_attach_single_file_db to attach the database and get the following error:
Could not open new database 'Orders'. CREATE DATABASE is aborted.
Device activation error. The physical file name 'F:\'Orders' may be
incorrect.
Is there any way to recover without the log file now?> After detaching a database and deleting the logfile
Can I ask why you would ever do this?
--
http://www.aspfaq.com/
(Reverse address to reply.)|||You have any backups of the database or database files?
"Bryan" <bryan.charlton@.api-wi.com> wrote in message
news:%23IVTepRZEHA.3016@.tk2msftngp13.phx.gbl...
> After detaching a database and deleting the logfile, I use
> sp_attach_single_file_db to attach the database and get the following
error:
> Could not open new database 'Orders'. CREATE DATABASE is aborted.
> Device activation error. The physical file name 'F:\'Orders' may be
> incorrect.
> Is there any way to recover without the log file now?
>
>
>
>
>|||Also, is your Resume up to date?
--
Geoff N. Hiten
Microsoft SQL Server MVP
Senior Database Administrator
Careerbuilder.com
I support the Professional Association for SQL Server
www.sqlpass.org
"Joe" <JoeD777@.lycos.com> wrote in message
news:uZ7y3yRZEHA.3420@.TK2MSFTNGP12.phx.gbl...
> You have any backups of the database or database files?
>
> "Bryan" <bryan.charlton@.api-wi.com> wrote in message
> news:%23IVTepRZEHA.3016@.tk2msftngp13.phx.gbl...
> > After detaching a database and deleting the logfile, I use
> > sp_attach_single_file_db to attach the database and get the following
> error:
> >
> > Could not open new database 'Orders'. CREATE DATABASE is aborted.
> > Device activation error. The physical file name 'F:\'Orders' may be
> > incorrect.
> >
> > Is there any way to recover without the log file now?
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
>|||Yes, I have a backup that I can restore from. This is my only option I take
it?
"Joe" <JoeD777@.lycos.com> wrote in message
news:uZ7y3yRZEHA.3420@.TK2MSFTNGP12.phx.gbl...
> You have any backups of the database or database files?
>
> "Bryan" <bryan.charlton@.api-wi.com> wrote in message
> news:%23IVTepRZEHA.3016@.tk2msftngp13.phx.gbl...
>> After detaching a database and deleting the logfile, I use
>> sp_attach_single_file_db to attach the database and get the following
> error:
>> Could not open new database 'Orders'. CREATE DATABASE is aborted.
>> Device activation error. The physical file name 'F:\'Orders' may be
>> incorrect.
>> Is there any way to recover without the log file now?
>>
>>
>>
>>
>>
>|||I have actually done this more times than I can count when moving
development databases from server to server and have never had a problem
(until now).
"Aaron [SQL Server MVP]" <ten.xoc@.dnartreb.noraa> wrote in message
news:OQl33yRZEHA.716@.TK2MSFTNGP11.phx.gbl...
>> After detaching a database and deleting the logfile
> Can I ask why you would ever do this?
> --
> http://www.aspfaq.com/
> (Reverse address to reply.)
>|||> I have actually done this more times than I can count
Move the data and the log file. Or, backup and restore. What you're doing
is quite similar roulette, and you've merely been on a lucky roll until this
spin.
--
http://www.aspfaq.com/
(Reverse address to reply.)|||> Yes, I have a backup that I can restore from. This is my only option I
take
> it?
Or, you can call PSS.|||Isn't it possible that the physical file name really is incorrect, as the
error says? Are you sure it isn't 'F:\'Orders.mdf' instead of 'F:\'Orders'?
You don't need the log file to attach the DB.
-John Oakes
"Aaron [SQL Server MVP]" <ten.xoc@.dnartreb.noraa> wrote in message
news:Omp91KSZEHA.1048@.tk2msftngp13.phx.gbl...
> > I have actually done this more times than I can count
> Move the data and the log file. Or, backup and restore. What you're
doing
> is quite similar roulette, and you've merely been on a lucky roll until
this
> spin.
> --
> http://www.aspfaq.com/
> (Reverse address to reply.)
>|||theoretically he should have been alright
Inside SQL 2000 "One benefit of using the sp_detach_db procedure is that SQL
Server will know that the database was cleanly shut down, and the log file
does not have to be available to attach the database. SQL will build a new
log file for you. This can be a quick way to shrink a log file that has
become much larger than you would like, because the new log file that
sp_attach_db creates for you will be the minimum size?less than 1 MB. Note
that this trick for shrinking the log will not work if the database has more
than one log file."
But you're right he should have been a bit more careful on a production
server. P45 time!
--
Br,
Mark Broadbent
mcdba , mcse+i
============="Aaron [SQL Server MVP]" <ten.xoc@.dnartreb.noraa> wrote in message
news:Omp91KSZEHA.1048@.tk2msftngp13.phx.gbl...
> > I have actually done this more times than I can count
> Move the data and the log file. Or, backup and restore. What you're
doing
> is quite similar roulette, and you've merely been on a lucky roll until
this
> spin.
> --
> http://www.aspfaq.com/
> (Reverse address to reply.)
>|||Bryan old chap try this see if you get any joy and let me know :)
http://www.spaceprogram.com/knowledge/sqlserver_recover_from_deleted_log.html
--
Br,
Mark Broadbent
mcdba , mcse+i
============="Bryan" <bryan.charlton@.api-wi.com> wrote in message
news:%23IVTepRZEHA.3016@.tk2msftngp13.phx.gbl...
> After detaching a database and deleting the logfile, I use
> sp_attach_single_file_db to attach the database and get the following
error:
> Could not open new database 'Orders'. CREATE DATABASE is aborted.
> Device activation error. The physical file name 'F:\'Orders' may be
> incorrect.
> Is there any way to recover without the log file now?
>
>
>
>
>|||P45 time' Punt'
-- George Hester
__________________________________
"Mark Broadbent" <no-spam-please@.no-spam-please.com> wrote in message =news:etZkUVTZEHA.3304@.TK2MSFTNGP09.phx.gbl...
> theoretically he should have been alright
> Inside SQL 2000 "One benefit of using the sp_detach_db procedure is =that SQL
> Server will know that the database was cleanly shut down, and the log =file
> does not have to be available to attach the database. SQL will build a =new
> log file for you. This can be a quick way to shrink a log file that =has
> become much larger than you would like, because the new log file that
> sp_attach_db creates for you will be the minimum size-less than 1 MB. =Note
> that this trick for shrinking the log will not work if the database =has more
> than one log file."
> > But you're right he should have been a bit more careful on a =production
> server. P45 time!
> > -- > > > Br,
> Mark Broadbent
> mcdba , mcse+i
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> "Aaron [SQL Server MVP]" <ten.xoc@.dnartreb.noraa> wrote in message
> news:Omp91KSZEHA.1048@.tk2msftngp13.phx.gbl...
> > > I have actually done this more times than I can count
> >
> > Move the data and the log file. Or, backup and restore. What =you're
> doing
> > is quite similar roulette, and you've merely been on a lucky roll =until
> this
> > spin.
> >
> > -- > > http://www.aspfaq.com/
> > (Reverse address to reply.)
> >
> >
> >|||Are you sure you are providing the proper data file name?
F:\Orders ? with no extension...
If the filename or directory is inaccurate you will get the same message you
are now seeing.
--
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
"Bryan" <bryan.charlton@.api-wi.com> wrote in message
news:%23IVTepRZEHA.3016@.tk2msftngp13.phx.gbl...
> After detaching a database and deleting the logfile, I use
> sp_attach_single_file_db to attach the database and get the following
error:
> Could not open new database 'Orders'. CREATE DATABASE is aborted.
> Device activation error. The physical file name 'F:\'Orders' may be
> incorrect.
> Is there any way to recover without the log file now?
>
>
>
>
>|||"P45 time" is a common UK expression meaning it is time to get a new job.
P45 is the number on the standard UK form that states your tax details that
an emploer is obliged to give you when you leave their employment!
Mike John
"George Hester" <hesterloli@.hotmail.com> wrote in message
news:uxQ2fhUZEHA.3432@.TK2MSFTNGP10.phx.gbl...
P45 time' Punt'
--
George Hester
__________________________________
"Mark Broadbent" <no-spam-please@.no-spam-please.com> wrote in message
news:etZkUVTZEHA.3304@.TK2MSFTNGP09.phx.gbl...
> theoretically he should have been alright
> Inside SQL 2000 "One benefit of using the sp_detach_db procedure is that
SQL
> Server will know that the database was cleanly shut down, and the log file
> does not have to be available to attach the database. SQL will build a new
> log file for you. This can be a quick way to shrink a log file that has
> become much larger than you would like, because the new log file that
> sp_attach_db creates for you will be the minimum size-less than 1 MB. Note
> that this trick for shrinking the log will not work if the database has
more
> than one log file."
> But you're right he should have been a bit more careful on a production
> server. P45 time!
> --
>
> Br,
> Mark Broadbent
> mcdba , mcse+i
> =============> "Aaron [SQL Server MVP]" <ten.xoc@.dnartreb.noraa> wrote in message
> news:Omp91KSZEHA.1048@.tk2msftngp13.phx.gbl...
> > > I have actually done this more times than I can count
> >
> > Move the data and the log file. Or, backup and restore. What you're
> doing
> > is quite similar roulette, and you've merely been on a lucky roll until
> this
> > spin.
> >
> > --
> > http://www.aspfaq.com/
> > (Reverse address to reply.)
> >
> >
>

No comments:

Post a Comment