Friday, February 24, 2012

"Ldf" file lose, and "Mdf" file is ok, can I still Attach database?

"Ldf" file lose, and "Mdf" file is ok, can I still Attach database?Colin
Have you last backup of your database?
sp_attach_single_file_db [ @.dbname = ] 'dbname'
, [ @.physname = ] 'physical_name'
"Colin Chen" <colin08@.21cn.com> wrote in message
news:#B206UYvDHA.1876@.TK2MSFTNGP09.phx.gbl...
> Help!!!
>|||Use sp_attach_single_file_db
It will create a new log...
In the future, start doing some database backups as well...You'll be better
off..
--
Wayne Snyder, MCDBA, SQL Server MVP
Computer Education Services Corporation (CESC), Charlotte, NC
www.computeredservices.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
"Colin Chen" <colin08@.21cn.com> wrote in message
news:#B206UYvDHA.1876@.TK2MSFTNGP09.phx.gbl...
> Help!!!
>|||Just to add to the other posts:
SQL Server documentation states that you should be able to use
sp_attach_single_file_db and only attach the mdf file if the database
consists of only one data and one log file. And if you also really did
detach he database first. So, assuming that you didn't actually detached the
database first, there's a risk that you won't be able to attach it. In that
case, be prepared to open a case with Microsoft Support or do a restore from
the latest clean backup.
--
Tibor Karaszi, SQL Server MVP
Archive at:
http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
"Colin Chen" <colin08@.21cn.com> wrote in message
news:%23B206UYvDHA.1876@.TK2MSFTNGP09.phx.gbl...
> Help!!!
>

No comments:

Post a Comment