cancel
Showing results for 
Search instead for 
Did you mean: 

How to move EV Database (SQL 2012 to SQL 2019) of EV 12

MON_AB
Level 4

Hey guys,

I want to move my EV12 database from SQL 2012 to SQL 2019.

I already did this migration in the earlier version with this link:

How to move the Enterprise Vault SQL databases (veritas.com)

I also found the script EVSQLServerMove on my current SQL Server.

It is 2 years ago when I did the migration, so I can't remember excactly which steps I did.

But I am pretty sure, that I used this guide in the link.

Now in this guide there is a reference, that for EV12 or above, this guide should not be used.

Instead there is a reference to Get-EVDatabaseDetail and Set-EVDatabaseDetail.

But now I am confused what are now the right steps.

Can somebody help me out?

The first steps are pretty clear to me.

1. Find out the name of the current SQL server.

2. Find out the name of the directory service somputer.

3. Stop all Enterprise Vault services.

4. Check that the vsa user has the db creator role on the new SQL server and that tcp and pipe is actived.

5. Backup databases and check the file locations of the DBs.

6. Detach the databases.

7. Copy databases to new SQL server.

8. Attach databases in SQL Management Studio.

I have standard database names and a default instance on both SQL servers. (new and old SQL server)

I have 3 DBs on my SQL Server.

EnterpriseVaultDirectory

EVVSExpressVaultStore_1

EVVSGExpressVaultStoreGroup_1_1

So the question is, what are the excact steps on the SQL server and on the EV server, after the databases have been attached in the SQL management Studio on the new SQL server?

greetings Nino

1 ACCEPTED SOLUTION

Accepted Solutions

GertjanA
Moderator
Moderator
Partner    VIP    Accredited Certified

Hello 

What I would first do is run Deployment Scanner against the new SQL server. That should show if it is ok to put the databases on. One important thing to note is that you need to make sure that the collation of both is identical. Check, and then check again. If you use an instance, make sure to also define the instance on the new server. I would personally also disable the site-schedule, set the archiving tasks in report-mode, set backup on both indexes and vaultstores, then shutdown EV, make a full backup of the databases, then execute the steps.

Are you by any chance using DNSAlias for your SQL server? If so, the ONLY thing you need to do after moving the databases is update that DNSAlias. Check the registry (..kvs\directory\directoryservice, see if the SQL entry has the alias)

If you don't use an alias, you might want to follow the powershell commands, or use the 'move sql' tool

If you use the powershell commands, first run get-evdatabasedetail. pipe to a txt file, so you see what the current state is. 

You'll get info as below

IsCollationOK : True
IsInAG : False
IsAccessible : True
DBName : EnterpriseVaultAudit
SQLInstanceName : SERVER\EVAULT
SQLServerVersion : 14.0.3281.6
Type : Audit
SQLServerName : sql hostname
IsClustered : True

The Set-evdatabase detail is described a bit complicated imho, but should be done as below:

Get-EVDatabaseDetail | where {$_.SQLInstanceName -eq 'SERVER\EVAULT' } | Set-EVDatabaseDetail -ServerName NEWSQLHOSTNAME

When that worked, you need to run Get-EVDatabaseDetail | where {$_.type -eq 'directory'} |
Set-EVDatabaseDetail -ServerName NEWSQLHOSTNAME

This will update the registry entry.

I would use the EV SQL Server Move Tool, or perform the manual steps as documented. They'll work for EV12 too.

Regards. Gertjan

View solution in original post

6 REPLIES 6

GertjanA
Moderator
Moderator
Partner    VIP    Accredited Certified

Hello 

What I would first do is run Deployment Scanner against the new SQL server. That should show if it is ok to put the databases on. One important thing to note is that you need to make sure that the collation of both is identical. Check, and then check again. If you use an instance, make sure to also define the instance on the new server. I would personally also disable the site-schedule, set the archiving tasks in report-mode, set backup on both indexes and vaultstores, then shutdown EV, make a full backup of the databases, then execute the steps.

Are you by any chance using DNSAlias for your SQL server? If so, the ONLY thing you need to do after moving the databases is update that DNSAlias. Check the registry (..kvs\directory\directoryservice, see if the SQL entry has the alias)

If you don't use an alias, you might want to follow the powershell commands, or use the 'move sql' tool

If you use the powershell commands, first run get-evdatabasedetail. pipe to a txt file, so you see what the current state is. 

You'll get info as below

IsCollationOK : True
IsInAG : False
IsAccessible : True
DBName : EnterpriseVaultAudit
SQLInstanceName : SERVER\EVAULT
SQLServerVersion : 14.0.3281.6
Type : Audit
SQLServerName : sql hostname
IsClustered : True

The Set-evdatabase detail is described a bit complicated imho, but should be done as below:

Get-EVDatabaseDetail | where {$_.SQLInstanceName -eq 'SERVER\EVAULT' } | Set-EVDatabaseDetail -ServerName NEWSQLHOSTNAME

When that worked, you need to run Get-EVDatabaseDetail | where {$_.type -eq 'directory'} |
Set-EVDatabaseDetail -ServerName NEWSQLHOSTNAME

This will update the registry entry.

I would use the EV SQL Server Move Tool, or perform the manual steps as documented. They'll work for EV12 too.

Regards. Gertjan

CConsult
Moderator
Moderator
Partner    VIP   

Like Gertjan said,

the SQL Migration tool works pretty good, if you want to move all databases and have the standard EV names.

Remember to set the compatibility level of the databases after moving them to the new sql server version 2019.

regards

Hi Gertjan,

thanks a lot for your detailed reply.

Sadly I have no alias set for the SQL Server.

The server has it's real name in the registry. Checked in the registry on my EV server:

def.PNG

When I use the Get-EVDatabaseDetails command on my EV server, the output looks like that:

abc.PNG

So, if I am not mistaken, when I moved and attached the databases to the new SQL server, the only thing to do is to run the "sql move tool". Right?

Execute this command on my EV server:

.\EVSQLServerMove.ps1 -SourceSQLServerName server1.domain.local -DestinationSQLServerName server2.domain.local

Is this correct?

Nothing else to do with Fingerprint Database Updates, or registry modifications?

I ran the Deployment Scanner on my EV server and removed the current sql server name from the listbox and entered the new sql server name.

The result of the Deployment Scanner is the following:

ghi.PNG

But I get the same warnings on my current SQL server and there is everything running properly.

So I think I can ignore the warnings.

Anything else I need to check?

Thanks a lot for your help.

GertjanA
Moderator
Moderator
Partner    VIP    Accredited Certified

You should be ok. 

Make sure to make a full database backup before performing the move

Regards. Gertjan

CConsult
Moderator
Moderator
Partner    VIP   

also check the permissions of the service account within server2.

you can see a warning with MSDB permissions so double check if everything is set right.

You can rollback at anytime with using the script the other way arround, so it really isn't to critical.

The script will change the registry too and all EV related references.

Thanks a lot for your support.

I did now the move of the database and it works like charm.

No errors and everything is working properly.

greetings Nino