SQL Server Performance

Need help on view

Discussion in 'T-SQL Performance Tuning for Developers' started by jessie, Aug 20, 2007.

  1. jessie New Member

    Hi,
    I was asked to fixed the following issue, is anybody can help me to figure out what's the issue for the following error message?
    When we gererate the views and exec them we got the following message.
    Please tell me why the errors occurred.
    Msg 208, Level 16, State 1, Procedure dupserv, Line 3
    Invalid object name 'Plandata_conversion.dbo.dupserv'.
    Msg 2714, Level 16, State 5, Procedure AffiliateSpecialtyContract, Line 2
    There is already an object named 'AffiliateSpecialtyContract' in the database.
    Msg 15233, Level 16, State 1, Procedure sp_addextendedproperty, Line 48
    Property cannot be added. Property 'MS_DiagramPane1' already exists for 'dbo.v_MemberReferrals'.
    Thanks!
    Jessie
  2. satya Moderator

  3. jessie New Member

    SQL Server 2000 enterprise version.
    Thanks satya!
  4. ndinakar Member

    [quote user="jessie"]Msg 208, Level 16, State 1, Procedure dupserv, Line 3
    Invalid object name 'Plandata_conversion.dbo.dupserv'. [/quote]
    Login to DB Plandata_conversion and do a SELECT COUNT(*) FROM dupserv and see if you get any results or if you get an error. The message is saying the table/view dupserv does not exist.
    [quote user="jessie"]Msg 2714, Level 16, State 5, Procedure AffiliateSpecialtyContract, Line 2
    There is already an object named 'AffiliateSpecialtyContract' in the database. [/quote]
    Are you trying to create the proc AffiliateSpecialtyContract? Looks like the proc already exists. IF you want to over write it use IF EXISTS.
    IF EXISTS (SELECT * FROM Sysobjects WHERE NAME = 'AffiliateSpecialtyContract' And Type = 'p'
    DROP PROC AffiliateSpecialtyContract
    CREATE PROC dbo.AffiliateSpecialtyContract ....
  5. jessie New Member

    Hi ndinakar,
    It still said invaild object name 'Plandata_conversion.dbo.dupserv'. when I run select statement. But when I checked table and view on that db, I didn't find this object. That means that tableview doesn't exist right?
    And for this one,
    Msg 15233, Level 16, State 1, Procedure sp_addextendedproperty, Line 48
    Property cannot be added. Property 'MS_DiagramPane1' already exists for 'dbo.v_MemberReferrals'.
    I am not clear why would had this kind of error message, infact, dbo.v_MemberReferrals doesn't exist on the database
    Thanks!
  6. ndinakar Member

    [quote user="jessie"]
    Hi ndinakar,
    It still said invaild object name 'Plandata_conversion.dbo.dupserv'. when I run select statement. But when I checked table and view on that db, I didn't find this object. That means that tableview doesn't exist right?[/quote]
    Yes. The table/view does not exist. you can verify it as:
    SELECT * FROM Sysobjects WHERE NAME = 'dupserv'
    You can do the same with v_MemberReferrals and see if it exists. Are you running the scripts under the right database?
  7. jessie New Member

    Oh yes, I ran the scripts under the right database. I was asked to do drop all views where base tables no longer exist, but I didn't find this view exist, this mean when we exec the script and got error message, the view was not being created, right? And I was also asked why this happened.
    thanks!
    Jessie
  8. ndinakar Member

    [quote user="jessie"] this mean when we exec the script and got error message, the view was not being created, right? And I was also asked why this happened. [/quote]
    Were you trying to create the view when you got the error?
  9. satya Moderator

    If you need to get list of VIEWS in t he database then you could make use of INFORMATION_SCHEMA.VIEWS in this case.

Share This Page