Forum Discussion

OldEmployee's avatar
8 years ago
Solved

Archived Items waiting to be indexed count from SQL

I am trying to retrieve the number of archived items pending to be indexed by referring to the following article:

https://www.veritas.com/support/en_US/article.HOWTO59167

 

However, our directory database is on a different server so I am replacing the following part of query:

INNER JOIN EnterpriseVaultDirectory.dbo.ArchiveView ON ArchiveView.VaultEntryId = SQ.ArchivePointId

 

Like this:

INNER JOIN Server-name.EnterpriseVaultDirectory.dbo.ArchiveView ON ArchiveView.VaultEntryId = SQ.ArchivePointId

 

However, because of the hyphen (-), the query doesn't working.

How do I specify the server name with hyphen in the name for this query?

 

  • Antoine's on the right track with the brackets, but each element in the fully-qualified name should get its own set of brackets. I think this is the format you want:

    [Server-name].[EnterpriseVaultDirectory].[dbo].[ArchiveView]

    Although only the hyphenated server name requires them in your case, so this should also work:

    [Server-name].EnterpriseVaultDirectory.dbo.ArchiveView

     

    --Chris

     

3 Replies

  • Hi,

    HAve you try something like this :

    INNER JOIN [Server-name.EnterpriseVaultDirectory.dbo.ArchiveView] ON ArchiveView.VaultEntryId = SQ.ArchivePointId

     

    Antoine

    • OldEmployee's avatar
      OldEmployee
      Level 5

      Yes, just did.

      But query doesnt work:

      Msg 208, Level 16, State 1, Line 1
      Invalid object name 'server-name.EnterpriseVaultDirectory.dbo.ArchiveView'.

       

      Also tried with single quotes, but no luck.

      • ChrisLangevin's avatar
        ChrisLangevin
        Level 6

        Antoine's on the right track with the brackets, but each element in the fully-qualified name should get its own set of brackets. I think this is the format you want:

        [Server-name].[EnterpriseVaultDirectory].[dbo].[ArchiveView]

        Although only the hyphenated server name requires them in your case, so this should also work:

        [Server-name].EnterpriseVaultDirectory.dbo.ArchiveView

         

        --Chris