It happens to me that in very complex sql queries I get a message:
Server: Msg 913, Level 16, State 8, Line 1
Could not find database ID 102. Database may not be activated yet or may be
in transition.
The query then just doesn't run. What the hack does that mean?
Example:
The following one works:
select field1, ..., field4
from
(
select field1, ..., field4 from table1
union all
select field1, ..., field4 from table2
union all
select field1, ..., field4 from view3
)
group by field1...
but when I replace view3 with its sql then I get the mentioned error. It's
not the first time it's happened to me.
Regards,
Marcin
Hi
Looks like the one DB you are trying to access is not online.
Run
SELECT [name] FROM master.dbo.sysdatabases WHERE dbid = 102
and it will tell you which DB it is. Check the status of the DB in EM.
Regards
Mike
"pexiak" wrote:
> It happens to me that in very complex sql queries I get a message:
> Server: Msg 913, Level 16, State 8, Line 1
> Could not find database ID 102. Database may not be activated yet or may be
> in transition.
> The query then just doesn't run. What the hack does that mean?
> Example:
> The following one works:
> select field1, ..., field4
> from
> (
> select field1, ..., field4 from table1
> union all
> select field1, ..., field4 from table2
> union all
> select field1, ..., field4 from view3
> )
> group by field1...
> but when I replace view3 with its sql then I get the mentioned error. It's
> not the first time it's happened to me.
> Regards,
> Marcin
>
>
|||It does not return any records. It is impossible that that database is
offline, it is being used constantly and no problems appear.
Uytkownik "Mike Epprecht (SQL MVP)" <mike@.epprecht.net> napisa w
wiadomoci news:7478A463-F2A6-4630-81BC-41E358917FB4@.microsoft.com...[vbcol=seagreen]
> Hi
> Looks like the one DB you are trying to access is not online.
> Run
> SELECT [name] FROM master.dbo.sysdatabases WHERE dbid = 102
> and it will tell you which DB it is. Check the status of the DB in EM.
> Regards
> Mike
> "pexiak" wrote:
be[vbcol=seagreen]
It's[vbcol=seagreen]
|||Can be timeout error... troubleshoot in that way
"pexiak" wrote:
> It does not return any records. It is impossible that that database is
> offline, it is being used constantly and no problems appear.
> U?ytkownik "Mike Epprecht (SQL MVP)" <mike@.epprecht.net> napisa3 w
> wiadomo?ci news:7478A463-F2A6-4630-81BC-41E358917FB4@.microsoft.com...
> be
> It's
>
>
|||Hi,
Which service pack you are using? Looks like this a bug. Check the below KB
article.
http://support.microsoft.com/kb/834688
Thanks
Hari
SQL Server MVP
"pexiak" <mpeksa@.poczta.onet.pl> wrote in message
news:d2j4t6$a9g$1@.news.onet.pl...
> It happens to me that in very complex sql queries I get a message:
> Server: Msg 913, Level 16, State 8, Line 1
> Could not find database ID 102. Database may not be activated yet or may
> be
> in transition.
> The query then just doesn't run. What the hack does that mean?
> Example:
> The following one works:
> select field1, ..., field4
> from
> (
> select field1, ..., field4 from table1
> union all
> select field1, ..., field4 from table2
> union all
> select field1, ..., field4 from view3
> )
> group by field1...
> but when I replace view3 with its sql then I get the mentioned error. It's
> not the first time it's happened to me.
> Regards,
> Marcin
>
|||This happened to me once when I had UDF in a view with derived tables
when I took the code from the UDF and pasted it in the SQL it was fine
I guess it was something to do with the levels of nesting and joining with
derived tables
"pexiak" <mpeksa@.poczta.onet.pl> wrote in message
news:d2j4t6$a9g$1@.news.onet.pl...
> It happens to me that in very complex sql queries I get a message:
> Server: Msg 913, Level 16, State 8, Line 1
> Could not find database ID 102. Database may not be activated yet or may
> be
> in transition.
> The query then just doesn't run. What the hack does that mean?
> Example:
> The following one works:
> select field1, ..., field4
> from
> (
> select field1, ..., field4 from table1
> union all
> select field1, ..., field4 from table2
> union all
> select field1, ..., field4 from view3
> )
> group by field1...
> but when I replace view3 with its sql then I get the mentioned error. It's
> not the first time it's happened to me.
> Regards,
> Marcin
>
No comments:
Post a Comment