How to display the database property

  • What command displays the list of databases with the properties

  • select * from sys.databases

    ]

  • You should use the sp_helpdb Stored Procedure

    you can pass parameters if you want a specific databases.

    i.e. sp_helpdb 'master'

    QUIGROUP- Need a Certified experienced DBA for a project or troubleshooting? Need help with programming, database recovery, performance tuning, ETL, SSRS or developing new databases? Contact us.. 1-786-273-9809

  • and yet another option:

    SELECT

    DATABASEPROPERTYEX(db_name(),'Collation') AS Collation,

    DATABASEPROPERTYEX(db_name(),'ComparisonStyle') AS ComparisonStyle,

    DATABASEPROPERTYEX(db_name(),'IsAnsiNullDefault') AS IsAnsiNullDefault,

    DATABASEPROPERTYEX(db_name(),'IsAnsiNullsEnabled') AS IsAnsiNullsEnabled,

    DATABASEPROPERTYEX(db_name(),'IsAnsiPaddingEnabled') AS IsAnsiPaddingEnabled,

    DATABASEPROPERTYEX(db_name(),'IsAnsiWarningsEnabled') AS IsAnsiWarningsEnabled,

    DATABASEPROPERTYEX(db_name(),'IsArithmeticAbortEnabled') AS IsArithmeticAbortEnabled,

    DATABASEPROPERTYEX(db_name(),'IsAutoClose') AS IsAutoClose,

    DATABASEPROPERTYEX(db_name(),'IsAutoCreateStatistics') AS IsAutoCreateStatistics,

    DATABASEPROPERTYEX(db_name(),'IsAutoShrink') AS IsAutoShrink,

    DATABASEPROPERTYEX(db_name(),'IsAutoUpdateStatistics') AS IsAutoUpdateStatistics,

    DATABASEPROPERTYEX(db_name(),'IsCloseCursorsOnCommitEnabled') AS IsCloseCursorsOnCommitEnabled,

    DATABASEPROPERTYEX(db_name(),'IsFulltextEnabled') AS IsFulltextEnabled,

    DATABASEPROPERTYEX(db_name(),'IsInStandBy') AS IsInStandBy,

    DATABASEPROPERTYEX(db_name(),'IsLocalCursorsDefault') AS IsLocalCursorsDefault,

    DATABASEPROPERTYEX(db_name(),'IsMergePublished') AS IsMergePublished,

    DATABASEPROPERTYEX(db_name(),'IsNullConcat') AS IsNullConcat,

    DATABASEPROPERTYEX(db_name(),'IsNumericRoundAbortEnabled') AS IsNumericRoundAbortEnabled,

    DATABASEPROPERTYEX(db_name(),'IsParameterizationForced') AS IsParameterizationForced,

    DATABASEPROPERTYEX(db_name(),'IsQuotedIdentifiersEnabled') AS IsQuotedIdentifiersEnabled,

    DATABASEPROPERTYEX(db_name(),'IsPublished') AS IsPublished,

    DATABASEPROPERTYEX(db_name(),'IsRecursiveTriggersEnabled') AS IsRecursiveTriggersEnabled,

    DATABASEPROPERTYEX(db_name(),'IsSubscribed') AS IsSubscribed,

    DATABASEPROPERTYEX(db_name(),'IsSyncWithBackup') AS IsSyncWithBackup,

    DATABASEPROPERTYEX(db_name(),'IsTornPageDetectionEnabled') AS IsTornPageDetectionEnabled,

    DATABASEPROPERTYEX(db_name(),'LCID') AS LCID,

    DATABASEPROPERTYEX(db_name(),'Recovery') AS Recovery,

    DATABASEPROPERTYEX(db_name(),'SQLSortOrder') AS SQLSortOrder,

    DATABASEPROPERTYEX(db_name(),'Status') AS Status,

    DATABASEPROPERTYEX(db_name(),'Updateability') AS Updateability,

    DATABASEPROPERTYEX(db_name(),'UserAccess ') AS UserAccess ,

    DATABASEPROPERTYEX(db_name(),'Version') AS Version

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

Viewing 4 posts - 1 through 3 (of 3 total)

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