Showing posts with label aborted. Show all posts
Showing posts with label aborted. Show all posts

Sunday, February 19, 2012

Attaching without ldf file

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?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 although I was trying to
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 although I was trying to
> 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:
>

Sunday, February 12, 2012

Attaching 2000 dbs to 2005

I installed ss2005 on a new machine. I try to attach a 2000 db and it found
an error (something in a view that it didn't like) and aborted the import.
I think it aborted on finding the first error but I'm not sure.
So, am I dead in the water? Do I have to take my db back to ss2000, deal
with the error and try a ss2005 atach again? If there are a thousand errors
would I have to do this a thousand times?
What If I just tried a restore' What's the best way to approach this
problem?
Many thanks, Tinn ManTinn
If I remember well , there is na upgrade advisor to make sure that sql
server 2005 'likes' everything
Also, I'd recommend you to backup database first and then restore it on sql
server 2005
"Tinn Man" <tm@.nospammeexcite.com> wrote in message
news:Oao7332hGHA.4404@.TK2MSFTNGP05.phx.gbl...
>I installed ss2005 on a new machine. I try to attach a 2000 db and it
>found an error (something in a view that it didn't like) and aborted the
>import. I think it aborted on finding the first error but I'm not sure.
> So, am I dead in the water? Do I have to take my db back to ss2000, deal
> with the error and try a ss2005 atach again? If there are a thousand
> errors would I have to do this a thousand times?
> What If I just tried a restore' What's the best way to approach this
> problem?
> Many thanks, Tinn Man
>

Attaching 2000 dbs to 2005

I installed ss2005 on a new machine. I try to attach a 2000 db and it found
an error (something in a view that it didn't like) and aborted the import.
I think it aborted on finding the first error but I'm not sure.
So, am I dead in the water? Do I have to take my db back to ss2000, deal
with the error and try a ss2005 atach again? If there are a thousand errors
would I have to do this a thousand times?
What If I just tried a restore' What's the best way to approach this
problem?
Many thanks, Tinn ManTinn
If I remember well , there is na upgrade advisor to make sure that sql
server 2005 'likes' everything
Also, I'd recommend you to backup database first and then restore it on sql
server 2005
"Tinn Man" <tm@.nospammeexcite.com> wrote in message
news:Oao7332hGHA.4404@.TK2MSFTNGP05.phx.gbl...
>I installed ss2005 on a new machine. I try to attach a 2000 db and it
>found an error (something in a view that it didn't like) and aborted the
>import. I think it aborted on finding the first error but I'm not sure.
> So, am I dead in the water? Do I have to take my db back to ss2000, deal
> with the error and try a ss2005 atach again? If there are a thousand
> errors would I have to do this a thousand times?
> What If I just tried a restore' What's the best way to approach this
> problem?
> Many thanks, Tinn Man
>