Results 1 to 5 of 5
  1. #1
    Join Date
    Jul 2004
    Posts
    76

    Unanswered: System/User view

    How can we determine which views in SQL-database is system or user, by making a query to any system tables?

    Thanks in advance,
    Jai

  2. #2
    Join Date
    Aug 2004
    Location
    Calgary, Alberta
    Posts
    106
    use objectproperty with the IsSystemTable parameter.

    Cheers,
    -Kilka

  3. #3
    Join Date
    Jul 2004
    Posts
    76

    Question

    objectproperty with the IsSystemTable parameter works to determine object is System table or not.

    The same don't work for View and I need to find that a perticular view is of System or not.

    Please...Any more input??!!

  4. #4
    Join Date
    Aug 2002
    Location
    Prague
    Posts
    77
    what about using IsMSShipped property ?

    --system
    select name from sysobjects where xtype='V'
    and objectproperty(id, 'IsMSShipped')=1
    --user
    select name from sysobjects where xtype='V'
    and objectproperty(id, 'IsMSShipped')=0


    mojza

  5. #5
    Join Date
    Jul 2004
    Posts
    76

    Lightbulb

    Yes Mojza.. its working. It also give proper result for the database which are newly created not at the time of installation.

    Ideally this property is True for "An object created during installation of Microsoft® SQL Server™ 2000. " as per given into books online. Anyway its working as per my wish.

    Thanks a lot.
    Jai

Posting Permissions

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