Skip to content

Export-DMVInformation halts at Query 40 when specifying -excludedb parameter on a 2008 R2 instance #5

@wsuhoey

Description

@wsuhoey

When I run Export-DMVInformation -instance 'my2008R2server', it gets to Query 42 (IO Stats By File), and then runs into an error after about a dozen databases Incorrect syntax near ')', which I could re-pro manually doing Glenn Berry's script in SSMS on the last database it hits, which told me it's not an issue with PowerShell but with Glenn's script. I realized that this particular database is at a lower compatibility level (SQL 2000, compat level 80) so Glenn's script throws an error since it's not for a SQL 2000 database.

So I then tried doing Export-DMVInformation -instance 'my2008R2server' -excludedb 'mycompat80db', and the PowerShell script stops at Query 40 (Ad hoc Queries), and doesn't go to Query 41 and above.

Hence, the bug seems to be when using -excludedb, it does not go beyond Query 40.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions