匯出資料

設定移轉公用程式之後,請從 AppScan® 來源 匯出資料。

匯出資料會分兩部分進行:
  • 過濾器、使用者資料、自訂規則、掃描配置。
    註: 使用者資料僅供匯出作為參考之用。
  • 評量
  1. 如果您要將資料從 AppScan® 來源 匯出至非預設位置(亦即,不是 C:\temp\Ounce/tmp/ounce),請建立該位置,然後定義環境變數 transfer_staging_dir 以指向非預設位置。
    • Windows:
      set transfer_staging_dir="<export data location>"
    • Linux:
      export transfer_staging_dir="<export data location>"
      註: 如需其他資訊,請參閱下方的「匯出資料位置」。
  2. 從指令行中,導覽至移轉公用程式的位置。
  3. 使用適當的參數來執行公用程式,以匯出過濾器、使用者資料、自訂規則和掃描配置:
    • Windows:
      DBManager.exe 
          --export 
          [
          -Dsource-db-user=<username> 
          -Dsource-db-pass=<password> 
          -Dsource-db-host=<host IP> 
          -Dsource-db-connection-info=<tcp <IP> <PORT>> 
          -Dsource-db-connection-string=<LocalNetServiceName> 
          -Dsource-db-client=<1-solidDB, 2-Oracle> 
          -Dsource-tns-admin-path=<<path>\tnsnames.ora>
          ]
    • Linux:
      ./dbmanager 
          --export 
          [
          -Dsource-db-user <username> 
          -Dsource-db-pass=<password> 
          -Dsource-db-host=<host IP> 
          -Dsource-db-connection-info=<tcp <IP> <PORT>> 
          -Dsource-db-connection-string=<LocalNetServiceName> 
          -Dsource-db-client=<1-solidDB, 2-Oracle> 
          -Dsource-tns-admin-path=<<path>/tnsnames.ora>
          ]
  4. 請利用評量參數來執行公用程式,只匯出評量:
    • Windows:
      DBManager.exe 
          --export 
          --asmt 
          [
          --start-date <dd-MMM-yyyy > [--end-date <dd-MMM-yyyy >]
          ] 
          [
          -Dsource-db-user=<username> 
          -Dsource-db-pass=<password> 
          -Dsource-db-host=<host IP> 
          -Dsource-db-connection-info=<tcp <IP> <PORT>> 
          -Dsource-db-connection-string=<LocalNetServiceName> 
          -Dsource-db-client=<1-solidDB, 2-Oracle> 
          -Dsource-tns-admin-path=<<path>\tnsnames.ora>
          ]
    • Linux:
      ./dbmanager 
          --export 
          --asmt 
          [
          --start-date <dd-MMM-yyyy > [--end-date <dd-MMM-yyyy >]
          ] 
          [
          -Dsource-db-user=<username> 
          -Dsource-db-pass=<password> 
          -Dsource-db-host<host IP> 
          -Dsource-db-connection-info=<tcp <IP> <PORT>> 
          -Dsource-db-connection-string=<LocalNetServiceName> 
          -Dsource-db-client=<1-solidDB, 2-Oracle> 
          -Dsource-tns-admin-path=<<path>/tnsnames.ora>
          ]
    註: 當使用 --asmt 選項時,移轉公用程式不會匯出過濾器、使用者資料、自訂規則或掃描配置。僅供匯出評量。
    註: 如需使用 export 指令的說明,請執行:
    • Windows:
      DBManager.exe --export --help
    • Linux:
      ./dbmanager --export --help

移轉公用程式匯出參數

參數 預設值 必要?
-Dsource-db-user 要從中匯出資料的使用者帳戶。 ounce
-Dsource-db-pass 與指定使用者相關聯的密碼。 ounce
-Dsource-db-host 要從中匯出資料之資料庫的主機位置。 localhost
-Dsource-db-connection-info 主機如何連線至資料庫。 tcp localhost 2315
-Dsource-db-connection-string 本端網路服務名稱 無預設值 只有從 Oracle 匯出時才需要。1
-Dsource-db-client 從中匯出資料的資料庫類型:
  • 1=solidDB
  • 2=oracle
1 不。如果未指定,則假設用戶端為 SolidDB。
-Dsource-tns-admin-path tnsnames.ora 的檔案路徑 無預設值 只有從 Oracle 匯出時才需要。1
--asmt [--start-date <dd-MMM-yyyy> [--end-date <dd-MMM-yyyy>]] 匯出評量,並以參數中的格式指定日期範圍。 如果未指定日期範圍,則會匯出所有評量。 只有在匯出評量時才需要。 2
  1. 例如,從 Oracle 匯出可能會類似這樣:
    C:\Program Files\HCL\AppScanSource\migration_util_win>DbManager.exe --export --asmt -Dsource-db-client=2 -Dsource-db-connection-string=10.111.11.11:1521/appscan -Dsource-tns-admin-path=C:\app\Oracle\product\19.0.0\client_1\network\admin\tnsnames.ora
  2. 例如,從 SolidDB 匯出可能會類似這樣,因為 SolidDB 是 -Dsource-db-client 預設值:
    C:\Program Files\HCL\AppScanSource\migration_util_win>DbManager.exe --export --asmt
    或指定日期:
    C:\Program Files\HCL\AppScanSource\migration_util_win>DbManager.exe --export -–asmt -–start-date 01-Jan-2020 -–End-date 01-Jan-2021
    

匯出資料位置

匯出的資料會放在 C:\temp\Ounce 目錄中(Linux 上為 /tmp/ounce),除非您在上述步驟 1 中建立了不同的目錄並定義其位置:

  • 匯出的過濾器、使用者資料、自訂規則和掃描配置資料會放在下列位置:
    • 過濾器: C:\temp\Ounce\Filters
    • 掃描配置: C:\temp\Ounce\ScanConfig
    • 自訂規則: C:\temp\Ounce\vdb
    • 使用者資料: C:\temp\Ounce\Users
      註: 使用者資料僅供匯出作為參考之用。使用此移轉公用程式時,它不會與其他資料一起匯入 AppScan®Enterprise
  • 匯出的評量內容會放在 C:\temp\Ounce\Assessments 中。

疑難排解匯出

如果您在匯出資料時遇到任何問題,請參閱 AppScan® 來源 資料目錄中的 dbmanager_exceptions.log 檔案:
  • Windows:
    C:\ProgramData\HCL\AppScanSource\logs\dbmanager_exceptions.log
  • Linux:
    var/opt/hcl/appscansource/logs/dbmanager_exceptions.log