"Error 1813: Could not open new database 'GJIRB'. CREATE DATABASE is aborted
.
Device activation error. The physical file name 'C:\ ...\db_name.LDF' may be
incorrect."
Then:
"Attaching database has failed."
If one has not have ldf file is it possible to use mdf file?Hi
sp_attach_single_file_db may help! Make sure that the LDF does not exist
already and the location that is being used is correct.
John
"Alur" wrote:
> I tried to attach mdf file without ldf file. However:
> "Error 1813: Could not open new database 'GJIRB'. CREATE DATABASE is abort
ed.
> Device activation error. The physical file name 'C:\ ...\db_name.LDF' may
be
> incorrect."
> Then:
> "Attaching database has failed."
> If one has not have ldf file is it possible to use mdf file?|||After sp_attach_single_file_db
the message:
"Server: Msg 911, Level 16, State 1
[Microsoft][ODBC SQL Server Driver][SQL Server]Could not locate entry in
sysdatabses for database 'db_name'.
No entry fount with that name. Make sure that the name is entered correctly.
"
appeared.
"John Bell" wrote:
> Hi
> sp_attach_single_file_db may help! Make sure that the LDF does not exist
> already and the location that is being used is correct.
> John
>
> "Alur" wrote:
>|||You can use exec sp_attach_db and only specify the database name and teh MDB
file path - and leave the remaining parameters blank (i.e., do not specify a
path to the non existant .LDF file).
Your database will get attached and a NEW log file (.ldf) will be created.
-HTH
"Alur" <Alur@.discussions.microsoft.com> wrote in message
news:115A77E2-4DDF-4A4E-8582-7B11A77CF90D@.microsoft.com...
>I tried to attach mdf file without ldf file. However:
> "Error 1813: Could not open new database 'GJIRB'. CREATE DATABASE is
> aborted.
> Device activation error. The physical file name 'C:\ ...\db_name.LDF' may
> be
> incorrect."
> Then:
> "Attaching database has failed."
> If one has not have ldf file is it possible to use mdf file?|||Excuse me
After
sp_attach_single_file_db
@.dbname = 'db_name',
@.physname = 'c:\db_name_Data.MDF'
the message
"Server: Msg 1813, Level 16, State 2, Line 1
Could not open new database 'db_name'. CREATE DATABASE is aborted.
Device activation error. The physical file name 'C:\Program Files\Microsoft
SQL Server\MSSQL\Data\db_name_Log.LDF' may be incorrect."
appeared.
"John Bell" wrote:
> Hi
> sp_attach_single_file_db may help! Make sure that the LDF does not exist
> already and the location that is being used is correct.
> John
>
> "Alur" wrote:
>|||Thank you.
"Jeffrey Todd" wrote:
> You can use exec sp_attach_db and only specify the database name and teh M
DB
> file path - and leave the remaining parameters blank (i.e., do not specify
a
> path to the non existant .LDF file).
> Your database will get attached and a NEW log file (.ldf) will be created.
> -HTH
>
> "Alur" <Alur@.discussions.microsoft.com> wrote in message
> news:115A77E2-4DDF-4A4E-8582-7B11A77CF90D@.microsoft.com...
>
>|||I ran into this very same issue this w

attach the db via vbscript from an msi. Also got the same error when
trying to attach the db from Query Analyser.
Turned out that the mdf had been set to read only because someone had
not checked the shippable copy out of SourceSafe before building the
msi.
As soon as I set the file back to read\write... the problem dissappeared
instantly.
Seems that SQLDMO tries to update the mdf with the new file name and
instead of reporting an access error just continues and uses the ldf
location that is already in the mdf.
Maybe this will provide usefull for others.
Best wishes
Lee Cottrell
Chief Technical Officer
Paymentshield Limited
*** Sent via Developersdex http://www.examnotes.net ***|||Thank you.
"Lee Cottrell" wrote:
> I ran into this very same issue this w

> attach the db via vbscript from an msi. Also got the same error when
> trying to attach the db from Query Analyser.
> Turned out that the mdf had been set to read only because someone had
> not checked the shippable copy out of SourceSafe before building the
> msi.
> As soon as I set the file back to read\write... the problem dissappeared
> instantly.
> Seems that SQLDMO tries to update the mdf with the new file name and
> instead of reporting an access error just continues and uses the ldf
> location that is already in the mdf.
> Maybe this will provide usefull for others.
> Best wishes
> Lee Cottrell
> Chief Technical Officer
> Paymentshield Limited
> *** Sent via Developersdex http://www.examnotes.net ***
>|||And could you tell me is it possible to solve this in SQL Server versions,
which newer than 2000 ?
"Alur" wrote:
> Thank you.
> "Lee Cottrell" wrote:
>|||Hi
I don't think attaching a mdf file that has not been detached properly is
going to work in any version as your database will be in an inconsistent
state. But you may want to post to try posting to the beta news group
http://communities.microsoft.com/ne...lcid=us
to see if anyone has tried this.
John
"Alur" <Alur@.discussions.microsoft.com> wrote in message
news:B22347AC-D039-4842-9595-AF4CBF9D1E57@.microsoft.com...
> And could you tell me is it possible to solve this in SQL Server versions,
> which newer than 2000 ?
> "Alur" wrote:
>
No comments:
Post a Comment