|
Posted by Tony Rogerson on 10/31/06 10:26
Could it be that you are prefixing the wrong database on the SET IDENTITY
INSERT ?
SET IDENTITY_INSERT [ database_name . [ schema_name ] . ] table { ON | OFF }
Can you post the complete script you are trying to run.
Also, the output from PRINT @@VERSION
--
Tony Rogerson
SQL Server MVP
http://sqlblogcasts.com/blogs/tonyrogerson - technical commentary from a SQL
Server Consultant
http://sqlserverfaq.com - free video tutorials
<teddysnips@hotmail.com> wrote in message
news:1162288359.739255.44180@k70g2000cwa.googlegroups.com...
>
> Tony Rogerson wrote:
>> Hi Edward,
>>
>> Just ignore celko, he's an arrogant idiot with little real industrial
>> experience; he teaches standard sql and database design and that's it,
>> but
>> that seems to have been picked up through doing a maths degree or
>> something;
>> the old self-taught problem some people have....
>>
>> Anyway, MC's answer should give you what you need.
>>
>> Tony.
>
> Thanks Tony - I'd sort of worked out that Celko had self-esteem issues!
>
> However, MC's answer doesn't give me what I need - in fact, the more I
> delve, the weirder it gets.
>
> I tried re-scripting the database without the Defaults - since it's
> going to be a read-only archive they're not important.
>
> I hadn't noticed that there was something really weird about the INSERT
> error:
>
> IDENTITY_INSERT is already ON for table
> 'BSAVA_Archive_Test_2006.dbo.GPS_CHAR'. Cannot perform SET operation
> for table 'tblAdminUsers'
>
> It references a database called "'BSAVA_Archive_Test_2006". However
> this is NOT either of the two databases that I'm operating on! In
> fact, it's an old test database so I dropped it.
>
> Now I get the following error message:
>
> "Could not find database ID 56. Database may not be activated yet or
> may be in transition."
>
> I'm completely baffled!
>
> Edward
>
Navigation:
[Reply to this message]
|