schemabinding problem

From: marcmc (marcmc_at_discussions.microsoft.com)
Date: 03/07/05


Date: Mon, 7 Mar 2005 08:01:10 -0800

I want to index a view. The view was not scema bound. I copied view data to
temp table and attempted to drop the view and rebuild as like so with the
following error?
Is it possible to cross database schemabind?

CREATE VIEW GEv_lu_Lookup WITH SCHEMABINDING AS
SELECT Ge_lookup_id, Ge_source_id, Ge_lookup_code, Ge_lookup_desc
FROM DbName1.dbo.GEt_lu_Lookup
UNION
SELECT Ge_lookup_id, Ge_source_id, Ge_lookup_code, Ge_lookup_desc
FROM DbName2.dbo.GEt_lu_Lookup o
WHERE NOT EXISTS
   (SELECT Ge_lookup_id, Ge_source_id, Ge_lookup_code, Ge_lookup_desc
    FROM DbName1.dbo.GEt_lu_Lookup i
    WHERE i.Ge_lookup_id = o.Ge_lookup_id
    AND i.Ge_source_id = o.Ge_source_id
    AND i.Ge_lookup_code = i.Ge_lookup_code)

Server: Msg 4512, Level 16, State 3, Procedure GEv_lu_Lookup, Line 3
Cannot schema bind view 'GEv_lu_Lookup' because name
'DbName1..GEt_lu_Lookup' is invalid for schema binding.
Names must be in two-part format and an object cannot reference itself.



Relevant Pages

  • Re: Exchange 2003 setup error
    ... 0xc1037ae6 - Extending the schema in the Active Directory ... Please consult the error log LDIF.ERR in your TEMP directory.. ... Error code 0XC1037AE6: ...
    (microsoft.public.exchange.setup)
  • Re: Exchange 2003 setup error
    ... 0xc1037ae6 - Extending the schema in the Active Directory ... Please consult the error log LDIF.ERR in your TEMP directory.. ... Error code 0XC1037AE6: Extending the schema in the Active ...
    (microsoft.public.exchange.setup)
  • RE: Error code C1037AE6 (31462) still there after removed the spac
    ... Adjusting the TEMP and TMP env variables so they contain no spaces. ... Adjusting the reg key to allow Schema Updates and rebooting (althought we've ... >> remove the space in the TEMP directory can solve the error code "Error code ...
    (microsoft.public.exchange.setup)
  • Re: Whats wrong with this cursor?
    ... your schema are. ... conventions and formatting rules. ... Do you really keep creating temp tables to update ... What happened was that the results from running the stored procedure ...
    (microsoft.public.sqlserver.programming)
  • Re: Temporary tables in memory using PL/SQL (as a workaround for not having CREATE TABLE privs)?
    ... temp tables for re-insertion into schema tables? ... If you really want temp tables, have the DBA create some for you. ... On a particular schema, I don't have CREATE TABLE (to make my own temp ... and DELETE object privileges on the tables I need to ...
    (comp.databases.oracle.misc)