Results 1 to 5 of 5
  1. #1
    Join Date
    Oct 2007
    Posts
    35

    Unanswered: Error: already an object named 'SOME_NAME' in the database.

    Is there a query I can run in a DB where I can search for object names that will tell me where or what it is? Trigger Name? Table Name? Constraint Name? Index NAme? or whatever?

    Thanks

  2. #2
    Join Date
    Nov 2004
    Location
    on the wrong server
    Posts
    8,835
    Provided Answers: 6
    what version of sql?
    “If one brings so much courage to this world the world has to kill them or break them, so of course it kills them. The world breaks every one and afterward many are strong at the broken places. But those that will not break it kills. It kills the very good and the very gentle and the very brave impartially. If you are none of these you can be sure it will kill you too but there will be no special hurry.” Earnest Hemingway, A Farewell To Arms.

  3. #3
    Join Date
    Nov 2004
    Location
    on the wrong server
    Posts
    8,835
    Provided Answers: 6
    you can google information schema views and sql server. or if it is sql2K you couls look at sysobjects and in sql 2005 i think it might be sys.sysobjects.
    “If one brings so much courage to this world the world has to kill them or break them, so of course it kills them. The world breaks every one and afterward many are strong at the broken places. But those that will not break it kills. It kills the very good and the very gentle and the very brave impartially. If you are none of these you can be sure it will kill you too but there will be no special hurry.” Earnest Hemingway, A Farewell To Arms.

  4. #4
    Join Date
    May 2004
    Location
    Seattle
    Posts
    1,313
    this will give you most, but not all types of objects:

    select name, type from sys.objects

    not everything is in here though. more obscure things like assemblies, certificates, etc are in their own special views (like sys.assemblies)

  5. #5
    Join Date
    Oct 2007
    Posts
    35
    select * type from sys.objects worked. It gives me the parent_id and it was a constraint.

    Thanks jezemine!!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •