Expected output

  • Hi Team,

    I need below output

    Owner of the DB,AutoIncrementof DB,Recovery MOdel of aDB, No.of Maintaince plan,No.of SP'S,No.of UDF'S,No.OF Triggers in a DB.

    can any body plz help me.

  • Owner of the DB

    select suser_sname(owner_sid) from sys.databases

    AutoIncrementof DB

    what do you mean by this

    Recovery MOdel of aDB

    select recovery_model_desc from sys.databases

    No.of Maintaince plan

    select * from sysmaintplan_plans

    No.of SP'S,No.of UDF'S,No.OF Triggers in a DB.

    select * from sysobjects where type_desc in('SQL_STORED_PROCEDURE','SQL_TABLE_VALUED_FUNCTION',

    'SQL_TRIGGER')

    ----------
    Ashish

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply