failed to restore for PROXY session data on SQLServer

book

Article ID: 6771

calendar_today

Updated On:

Products

CA Virtual Privilege Manager CA Privileged Identity Management Endpoint (PIM) CA Privileged Access Manager (PAM)

Issue/Introduction

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? 

 

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.

Environment

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

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 ...