cancel
Showing results for 
Search instead for 
Did you mean: 

command-line tool for MSSQL 2017

Michal_Mikulik1
Moderator
Moderator
Partner    VIP    Accredited Certified

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

4 REPLIES 4

Michal_Mikulik1
Moderator
Moderator
Partner    VIP    Accredited Certified

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
Moderator
Moderator
Partner    VIP    Accredited Certified

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}"

Regards. Gertjan

Michal_Mikulik1
Moderator
Moderator
Partner    VIP    Accredited Certified

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

GertjanA
Moderator
Moderator
Partner    VIP    Accredited Certified

Hello Michal,

That would be the idea yes. You can schedule the set/clear backup mode for EV, and in SQL you should be able to schedule a backup of the databases. You might want to do the SQL backup to a specific location on disk, then backup those files using your backup software, remove the backup files from that location (to allow room for the next).

It might take a few attempts, to make sure you stay in backup mode (EV) as long as necessary, but that should be no issue.

Good luck!

Regards. Gertjan