failed to restore for PROXY session data on SQLServer

Document ID : KB000006771
Last Modified Date : 14/02/2018
Show Technical Document Details
Issue:

Customer tried restore along with document as related contents. 

 

 

Administrating

  + Enterprise Administration

    + Proxy Connection

      + Manage the Recorded Proxy Session Data

  https://docops.ca.com/ca-privileged-identity-manager/12-9-02/EN/administrating/enterprise-administration/proxy-connection/manage-the-recorded-proxy-session-data#ManagetheRecordedProxySessionData-RestoretheArchivedProxySessionsDataonMicrosoftSQLServer 

 

But she got error as following: 

 

 

SQLState = S1000, NativeError = 0, 

Error = [Microsoft][ODBC Driver 11 for SQL Server] invalid EOF in BCP datafile. 

 

what doe it happen? 

 

Environment:
OS: Windows 2012 R2 Product: CA Privileged Identity Manager for SAM r12.9 SP1 Central DB: MS SQLServer 2014 Userstore: Embedded
Cause:

The error message is caused by SQLServer. 

It seems to be meaning restore file is invalid. 

The problem is caused appeared separator character, ',' , as binary data in backed up file.

So, SQLServer recognizes invalid field and got error.

Resolution:

please change option "-n -t," to "-c -t'\t'"

 

For Example:

Backup:

before: bcp QUERYSTR queryout ARCHIVEFILE -n -t, ...

after : bcp QUERYSTR queryout ARCHIVEFILE -c -t\t ...

 

 

Restore:

before: bcp TableOnDatabase STR in ARCHIVEFILE -n -t, ...

after : bcp TableOnDatabase STR in ARCHIVEFILE -c -t\t ...