Showing posts with label ldf. Show all posts
Showing posts with label ldf. Show all posts

Tuesday, March 20, 2012

Can not attach MDF from HDS LUN

Hi..

We are trying to attach a database (MDF File without LDF File) in SQL2K SP4

MDF File is in HDS (Hitachi Data Storage) Lun or SAN Storage.

When we try attach the MDF File, we are getting an error. The error message is :

" Error 1813: Could not open new database 'Test'. CREATE DATABASE is aborted.

Device activation error. The physical file name 'F:\SQLData\Test_log.ldf' maybe incorrect "

When We try attach the MDF File, but We move the MDF File into Local Hard Drive (Drive C:), then We success to attached the MDF File and the LDF File is automaticlly generated without error.

i'm waiting for the solution

Thank's.

Brgds,

Dwiharto

How did you attach it? Try using sp_attach_single_file_db stored procedure instead.

Whether the data file resides on the SAN or not should not matter here.|||

I had try it before, but it is still doesn't working and still had same error message.

btw thanks for ur advice.

maybe u can tell me another way?

Thank's a lot Friend ...

|||Can you post the exact attach statement.|||

the statement :

sp_attach_single_file_db @.dbname = 'test',
@.physname = 'F:\SQLData\Test.mdf'

Thank's..

|||

The statement looks valid. (F:\) is a locally attached SAN, right? If this is a network attached san, you need to turn on trace flag (1807). Also, does the account used to start sqlserver service has full right to the SAN?

Saturday, February 25, 2012

Can I use .DNF file to recover my data?

I want to recover data in a table on SQL 2000 server.
This database has 10 files (.MDF, NDF, and LDF). I know which .NDF file
contains the data of the table. I made detach the database.
Can I use one old backed up .NDF file replace the current .NDF file, and
together with other current files to attach this database?
Thanks for suggestions,No, SQL Server keep track of the database files and will not allow database files from different
point in time. That would adventure database integrity.
How about doing a restore (I presume you have backups) into a new database name, up until desired
time and then copy that table from there to your production database.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Mike Torry" <MikeTorry@.discussions.microsoft.com> wrote in message
news:1DCB6F00-51AC-468B-AC0A-1C350979B47E@.microsoft.com...
>I want to recover data in a table on SQL 2000 server.
> This database has 10 files (.MDF, NDF, and LDF). I know which .NDF file
> contains the data of the table. I made detach the database.
> Can I use one old backed up .NDF file replace the current .NDF file, and
> together with other current files to attach this database?
> Thanks for suggestions,
>|||Thanks for your help!
"Tibor Karaszi" wrote:
> No, SQL Server keep track of the database files and will not allow database files from different
> point in time. That would adventure database integrity.
> How about doing a restore (I presume you have backups) into a new database name, up until desired
> time and then copy that table from there to your production database.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Mike Torry" <MikeTorry@.discussions.microsoft.com> wrote in message
> news:1DCB6F00-51AC-468B-AC0A-1C350979B47E@.microsoft.com...
> >I want to recover data in a table on SQL 2000 server.
> > This database has 10 files (.MDF, NDF, and LDF). I know which .NDF file
> > contains the data of the table. I made detach the database.
> > Can I use one old backed up .NDF file replace the current .NDF file, and
> > together with other current files to attach this database?
> >
> > Thanks for suggestions,
> >
>

Friday, February 24, 2012

Can I use .DNF file to recover my data?

I want to recover data in a table on SQL 2000 server.
This database has 10 files (.MDF, NDF, and LDF). I know which .NDF file
contains the data of the table. I made detach the database.
Can I use one old backed up .NDF file replace the current .NDF file, and
together with other current files to attach this database?
Thanks for suggestions,No, SQL Server keep track of the database files and will not allow database
files from different
point in time. That would adventure database integrity.
How about doing a restore (I presume you have backups) into a new database n
ame, up until desired
time and then copy that table from there to your production database.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Mike Torry" <MikeTorry@.discussions.microsoft.com> wrote in message
news:1DCB6F00-51AC-468B-AC0A-1C350979B47E@.microsoft.com...
>I want to recover data in a table on SQL 2000 server.
> This database has 10 files (.MDF, NDF, and LDF). I know which .NDF file
> contains the data of the table. I made detach the database.
> Can I use one old backed up .NDF file replace the current .NDF file, and
> together with other current files to attach this database?
> Thanks for suggestions,
>|||Thanks for your help!
"Tibor Karaszi" wrote:

> No, SQL Server keep track of the database files and will not allow databas
e files from different
> point in time. That would adventure database integrity.
> How about doing a restore (I presume you have backups) into a new database
name, up until desired
> time and then copy that table from there to your production database.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Mike Torry" <MikeTorry@.discussions.microsoft.com> wrote in message
> news:1DCB6F00-51AC-468B-AC0A-1C350979B47E@.microsoft.com...
>

Can I still recover this database : Only have the MDF file, no LDF file ?

Dear all,
If a database was corrupted (due to whatever reasons) and lost its LDF files
but only had its MDF files, can I still recover it ?
How ?
Please tell me, thanks.Hi,
If you have database backups then restore from these backups instead.
The problem I see with using only the mdf file is that the missing ldf files
may have information to rollback or roll forward transactions in order to
leave the database in a consistent state.
Ben Nevarez
Senior Database Administrator
AIG SunAmerica
"cpchan" wrote:
> Dear all,
> If a database was corrupted (due to whatever reasons) and lost its LDF files
> but only had its MDF files, can I still recover it ?
> How ?
> Please tell me, thanks.
>
>|||Hi
http://www.karaszi.com/SQLServer/info_corrupt_suspect_db.asp
"cpchan" <cpchaney@.netvigator.com> wrote in message
news:472d345d$1@.127.0.0.1...
> Dear all,
> If a database was corrupted (due to whatever reasons) and lost its LDF
> files
> but only had its MDF files, can I still recover it ?
> How ?
> Please tell me, thanks.
>
>

Tuesday, February 14, 2012

can i read ldf file in sql server

Is there is any way to read ldf file in sql server.
While creating database in sql server it automatically create 2 files
one is.mdf which is data file and another is .ldf which is log file.
I wann to read this .ldf filepls be more specific. what is a ldf file.

:(|||RE: Q1 Is there is any way to read ldf file in sql server?

While creating database in sql server it automatically create 2 files
one is.mdf which is data file and another is .ldf which is log file.
Q2 I want to read this .ldf file

A1 Yes.

A2 For user purposes it would be exceedingly rare to need or want to do so (or have any particular reason to). DBA troubleshooting and development efforts are the main reasons to want to read Log files directly. If you are still curious, there is a third party tool (Lumigent Log Explorer), and dbcc Log (ala ver 6.x) still works as well e.g.{dbcc Log (Pubs), or optinally use a result set type parameter, but the sybase type multiparameter form is no longer supported}.