Forum Discussion

Michal_Mikulik1's avatar
6 years ago

command-line tool for MSSQL 2017

Hello,

I have two EV server 12.4.1 with remote SQL 2017 instance.

I want to prepare backup scripts including "remote" sql dumps of EV databases (third-party backup not possible to use here). Earlier I was using isql/osql CLI utilities with came with SQL Management Tools installations installed on EV servers. In todays versions of SQL Management /18.2) they are no longer included. After some googling, I have found this: https://www.quackit.com/sql_server/sql_server_2017/tutorial/sql_server_2017_management_tools.cfm

Can anybody share experience of CLI tools for todays SQL versions?

regards

Michal

  • Hello all,

    Can anybody share experience of CLI tools for todays SQL versions?

    In testing environment, I have installed sqlcmd utilities (link below). It looks ok after installation, however it wanted to update some files used by EV processes during installation and their stop was required. So I am a bit reluctant to install these in a production environment, I guess this could led to an unsupported configuration.

    https://docs.microsoft.com/en-us/sql/tools/sqlcmd-utility?view=sql-server-2017

    Regards

    Michal

    • GertjanA's avatar
      GertjanA
      Moderator

      Hello Michal,

      I cannot assist on if you can use, and how to use what you want. One thing I do know is that you need to set backup mode on Enterprise Vault to make sure the databases are in a consistent state.

      You can schedule that using a batchfile on the EV servers. Example below. Set/clear backup mode per Vault Store. I believe you can also do Vault Store Group. EVINSTALLFOLDER is folder where EV is installed, SERVERNAME is EV servername where you run the command.

      SET BACKUP MODE
      c:\WINDOWS\SysWow64\windowspowershell\v1.0\powershell -psconsolefile "EVINSTALLFOLDER\EVShell.psc1" -command "& {Set-VaultStoreBackupMode -Name 'Vault Store 01' -EVServerName SERVERNAME -EVObjectType VaultStore}"

      CLEAR BACKUP MODE
      c:\WINDOWS\SysWow64\windowspowershell\v1.0\powershell -psconsolefile "EVINSTALLFOLDER\EVShell.psc1" -command "& {Clear-VaultStoreBackupMode -Name 'Vault Store 01' -EVServerName SERVERNAME -EVObjectType VaultStore}"

      • Michal_Mikulik1's avatar
        Michal_Mikulik1
        Moderator

        Hello Gertjan,

        thanks - yes, I see.. and the next step in SET BACKUP MODE script should be VSG and VS databases backup. So when you dont have native EV backup agent (provided via NetBackup or Backup Exec), do you solve this by similar timing? Like 18:00 Set backup Mode, 18:05 DB backup, 20h Clear Backup Mode?

        Regards

        Michal