• RVO (11/4/2013)


    ScottPletcher,

    We don't have authority to alter table definitions.

    This is Financial Application database by third party.

    We don't own the database.

    We even create all our custom code in a separate (Diff_Data) database

    that has views with the same names as table names in the main database.

    And in our stored procedures we point to those views.

    I tried to create an index on a view

    but I get an error

    "Cannot schema bind view 'prj_detail' because name 'proddb6..prj_detail' is invalid for schema binding."

    Here is my syntax to create a view WITH SCHEMABINDING:

    CREATE VIEW prj_detail WITH SCHEMABINDING

    AS

    select

    [prj_code]

    ,[accounting_period]

    ,[co_code]

    FROM

    Proddb6.dbo.prj_detail

    Ouch! If you can't change the clustered or non-clustered indexes, it will be extremely difficult to tune queries.

    SQL DBA,SQL Server MVP(07, 08, 09) A socialist is someone who will give you the shirt off *someone else's* back.