What is this B.C.P. process everyone’s talking about?

13 minute read time.

Hello readers,

Today we are going to be looking at a relatively old, yet new, process. It’s a bit complicated to explain (going to try my best), but its super easy to use. We are going to be looking at the “Import from .dmp files, with Bulk Copy utility and Export Data Pump” which is also more commonly known as BCP process. This really easy utility to use and will drastically decrease the time it takes to export and import data sets for Sage X3. The utility itself is currently built into the Management Console, which was not always the case.

We are not going to be looking at how to manually run the utilities (as they are part of MS SQL Server) but we are going to look at the “Import from .dmp files, with Bulk Copy utility and Export Data Pump” function that you can find in later versions of the Management Console (AKA SAFE Console). If you have the Management console its most likely already there. If you are still using the SAFE console (which is an old version of the newer Management Console) then theres a chance, it’s not there. The Console version I am using in this blog is CFG.2.50.1.37. If you have a different version than this, it should be ok still.

Anyways, if you have a machine to follow along, great, if not that’s ok. You can just read this or later I will be posting a video on our YouTube channel on how to use it also. I will post the video in the chat as soon as I can.

Let’s get started…

So first off, you are going to need a data set to export. You will also need access to the Management Console and the associated user that goes with the setup/configuration. Once you have that, you can start.

In my demonstration, I am using version 11 patch 20 (just to show older versions work). You know you have the correct login, when you log into the Management Console, and you have a Data-Application configuration with stuff in it like my screenshot. If you don’t see anything, you have the wrong user account.

Next you want to click on the Folders tab from the top bar to load the folder (endpoint) data listings

Select the folder you want to export (in my case its SEED) and click the Export button from menu bar.

Now the important part. On the Export folder popup, you will see an option labeled: “Export data to native dump files. This function uses Bulk Copy utility on MS SQL Server, and Export Data Pump on Oracle”. You want to check that sucker. That’s the money maker button!!

You can leave the rest of it as default. I like to have a fresh SVG folder each time. Then slap that OK button to start the process of exporting.

Now, if you left the defaults, you may get a few popups after hitting ok. Like this one:

I said yes.

Or this one:

Which I also said OK to (because I want it to use it)

After all of that warning and saying YES and OK to stuff, it should kick off the export process

And hopefully it finishes really fast. For me it was so fast I had to double check the logs to make sure it was actually doing stuff.

 

I ran the export earlier and here is an example of what the trace log would typically look like.

14/12/2021 01:30:47 : INFO  - ---------------------------------------------------------------------

14/12/2021 01:30:47 : INFO  - Folder configuration

14/12/2021 01:30:47 : INFO  - ---------------------------------------------------------------------

14/12/2021 01:30:47 : INFO  - Starting configuration from Runtime X3ERPV12RUN x3erpv12sqlvm 14/12/2021 01:30:47

14/12/2021 01:30:47 : INFO  - Starting creating the SVG directory

14/12/2021 01:30:47 : INFO  - Creating the folder directories D:\Sage\X3ERPV12\Folders\SEED\SVG - x3erpv12sqlvm

14/12/2021 01:30:48 : INFO  - End of creation of the backup directories

14/12/2021 01:30:48 : INFO  - Starting generating the folder table list

14/12/2021 01:30:48 : INFO  - Launching the generation script of the folder table list - D:\Sage\X3ERPV12\Folders\SEED

14/12/2021 01:30:49 : INFO  - Recovering the folder table list

14/12/2021 01:30:49 : INFO  - Launching the generation script of the folder view list - D:\Sage\X3ERPV12\Folders\SEED

14/12/2021 01:30:50 : INFO  - Recovering the view table list

14/12/2021 01:30:50 : INFO  - 1942 tables found

14/12/2021 01:30:50 : INFO  - End of generation of the table list  (00:00:01.6929852)

14/12/2021 01:30:50 : INFO  - Starting exporting the folder tables

14/12/2021 01:30:50 : INFO  - Extracting the folder tables - SEED

14/12/2021 01:30:50 : INFO  - Starting exporting the folder SEED tables to D:\Sage\X3ERPV12\Folders\SEED\SVG - Windows

14/12/2021 01:30:53 : INFO  - Script 'D:\Sage\X3ERPV12\Folders\SEED\SVG\_valfilbat.bat' generated, host x3erpv12sqlvm, 1659 table(s) - 283 view(s)

14/12/2021 01:30:53 : INFO  - Executing '_valfilbat.bat' on x3erpv12sqlvm to extract tables data - (LibAdm.ExtractTablesWin32)

14/12/2021 01:31:06 : INFO  - End of extraction of the tables - Windows

14/12/2021 01:31:06 : INFO  - End of extraction of the tables  (00:00:16.1890856)

14/12/2021 01:31:06 : INFO  - Starting extracting the sequences

14/12/2021 01:31:06 : INFO  - Extracting the sequences - SEED

14/12/2021 01:31:06 : INFO  - Starting extracting the sequences - Windows / SqlServer  - x3erpv12sqlvm

14/12/2021 01:31:06 : INFO  - Sequence file stream generated, 1659 tables -  (LibAdm.ExtractSequenceWin32Sql)

14/12/2021 01:32:32 : INFO  - End of extraction of the sequences - SQL Server  (00:01:26.1073871)

14/12/2021 01:32:32 : INFO  - End of extraction of the tables

14/12/2021 01:32:32 : INFO  - Starting generating the srf files

14/12/2021 01:32:32 : INFO  - Generating the folder srf files - D:\Sage\X3ERPV12\Folders\SEED\SVG

14/12/2021 01:33:23 : INFO  - End of generation of the srf files  (00:00:50.7342099)

14/12/2021 01:33:23 : INFO  - Starting exporting the database

14/12/2021 01:33:23 : INFO  - Exporting the database - SEED  (Native dump mode)

14/12/2021 01:33:23 : INFO  - Starting exporting the database - SQL Server

14/12/2021 01:33:23 : INFO  - Bcp path built from key 'database.software.sqlodbctools', runtime X3ERPV12RUN: C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools

14/12/2021 01:36:54 : INFO  - End of database export - SQL Server  (00:03:30.8768724)

14/12/2021 01:36:54 : INFO  - End of configuration  (00:06:07.2475031)

14/12/2021 01:36:54 : INFO  - ---------------------------------------------------------------------

14/12/2021 01:36:54 : INFO  - End of configuration

14/12/2021 01:36:54 : INFO  - ---------------------------------------------------------------------


If you take the time to figure out how long it actually took (6 minutes and 7 seconds to be exact) you can see how fast it really was.

Here is another trace of running the export the original way:

14/12/2021 01:38:51 : INFO  - ---------------------------------------------------------------------

14/12/2021 01:38:51 : INFO  - Folder configuration

14/12/2021 01:38:51 : INFO  - ---------------------------------------------------------------------

14/12/2021 01:38:51 : INFO  - Starting configuration from Runtime X3ERPV12RUN x3erpv12sqlvm 14/12/2021 01:38:51

14/12/2021 01:38:51 : INFO  - Starting creating the SVG directory

14/12/2021 01:38:53 : INFO  - Delete directory 'D:\Sage\X3ERPV12\Folders\SEED\SVG'

14/12/2021 01:38:53 : INFO  - End of creation of the backup directories

14/12/2021 01:38:53 : INFO  - Starting generating the folder table list

14/12/2021 01:38:53 : INFO  - Launching the generation script of the folder table list - D:\Sage\X3ERPV12\Folders\SEED

14/12/2021 01:38:53 : INFO  - Recovering the folder table list

14/12/2021 01:38:54 : INFO  - Launching the generation script of the folder view list - D:\Sage\X3ERPV12\Folders\SEED

14/12/2021 01:38:54 : INFO  - Recovering the view table list

14/12/2021 01:38:54 : INFO  - 1942 tables found

14/12/2021 01:38:54 : INFO  - End of generation of the table list  (00:00:01.6859769)

14/12/2021 01:38:54 : INFO  - Starting exporting the folder tables

14/12/2021 01:38:54 : INFO  - Extracting the folder tables - SEED

14/12/2021 01:38:54 : INFO  - Starting exporting the folder SEED tables to D:\Sage\X3ERPV12\Folders\SEED\SVG - Windows

14/12/2021 01:38:59 : INFO  - Script 'D:\Sage\X3ERPV12\Folders\SEED\SVG\_valfilbat.bat' generated, host x3erpv12sqlvm, 1659 table(s) - 283 view(s)

14/12/2021 01:38:59 : INFO  - Executing '_valfilbat.bat' on x3erpv12sqlvm to extract tables data - (LibAdm.ExtractTablesWin32)

14/12/2021 01:56:59 : INFO  - End of extraction of the tables - Windows

14/12/2021 01:56:59 : INFO  - End of extraction of the tables  (00:18:04.8210271)

14/12/2021 01:56:59 : INFO  - Starting extracting the sequences

14/12/2021 01:56:59 : INFO  - Extracting the sequences - SEED

14/12/2021 01:56:59 : INFO  - Starting extracting the sequences - Windows / SqlServer  - x3erpv12sqlvm

14/12/2021 01:57:01 : INFO  - Sequence file stream generated, 1659 tables -  (LibAdm.ExtractSequenceWin32Sql)

14/12/2021 01:58:29 : INFO  - End of extraction of the sequences - SQL Server  (00:01:29.6959131)

14/12/2021 01:58:29 : INFO  - End of extraction of the tables

14/12/2021 01:58:29 : INFO  - Starting generating the srf files

14/12/2021 01:58:29 : INFO  - Generating the folder srf files - D:\Sage\X3ERPV12\Folders\SEED\SVG

14/12/2021 01:58:49 : INFO  - End of generation of the srf files  (00:00:20.0141674)

14/12/2021 01:58:49 : INFO  - End of configuration  (00:19:57.6989357)

14/12/2021 01:58:49 : INFO  - ---------------------------------------------------------------------

14/12/2021 01:58:49 : INFO  - End of configuration

14/12/2021 01:58:49 : INFO  - ---------------------------------------------------------------------


This one took 19 minutes and 58 seconds which is about 3 times as long as the BCP function is. If you use the Data extract tools in the development function it takes even longer.

With that said, the Folder Import process is pretty much the same thing. You check the same button on the import popup, and it will run through the same utility tools.

You want to go to the same Management Console \ Folders tab that we previously started at, but this time you want to click on the Import menu button

I went ahead and setup a TEST folder to import (just for this blog) to show what the option is. It’s really just an export of the SEED folder that I renamed TEST.

A Very Important Note: When importing with this method, the exported folder must have used the same Bulk Copy for the import Bulk Copy to work. You cannot use the function on a folder that was exported with the original/tradition export and vise versa.

On the Import a folder popup you want to check the “Import from .dmp files, with Bulk Copy utility and Export Data Pump” checkbox before running the import. Then all you have to do is click OK button at the bottom and watch the magic happen.

The import process will start as soon as you click OK.

When it’s finished you can click ok to the popup for complication and if all went according to plan, you should see the newly imported folder show up on the listing

Here is what the trace log looks like

16/12/2021 02:26:06 : INFO  - ---------------------------------------------------------------------

16/12/2021 02:26:06 : INFO  - Sage Application setup 16/12/2021 02:26:06

16/12/2021 02:26:06 : INFO  - ---------------------------------------------------------------------

16/12/2021 02:26:06 : INFO  - Starting folder import

16/12/2021 02:26:06 : INFO  -

16/12/2021 02:26:06 : INFO  - *--- Sage Folder Import ---*

16/12/2021 02:26:06 : INFO  - Reading solution.xml on x3erpv11vm...

16/12/2021 02:26:06 : INFO  - Information from solution.xml retrieved.

16/12/2021 02:26:06 : INFO  - Ok

16/12/2021 02:26:06 : INFO  - Application : reading adxinstalls on x3erpv11vm...

16/12/2021 02:26:06 : INFO  - Information from adxinstalls.xml on application server retrieved.

16/12/2021 02:26:06 : INFO  - Ok

16/12/2021 02:26:06 : INFO  - Database : reading adxinstalls on x3erpv11vm...

16/12/2021 02:26:06 : INFO  - Information from adxinstalls.xml on data server retrieved.

16/12/2021 02:26:06 : INFO  - Ok

16/12/2021 02:26:06 : INFO  - Information from adxinstalls.xml retrieved.

16/12/2021 02:26:06 : INFO  - Ok

16/12/2021 02:26:06 : INFO  - Main runtime : reading adxinstalls on x3erpv11vm...

16/12/2021 02:26:06 : INFO  - Information from adxinstalls.xml on main runtime server retrieved.

16/12/2021 02:26:06 : INFO  - Ok

16/12/2021 02:26:06 : INFO  - Starting configuration from Runtime X3ERPV11RUN, x3erpv11vm:

16/12/2021 02:26:06 : INFO  - Starting creation of C:\Users\x3admin\AppData\Roaming\Sage\Console\temp\Components\x3erpv11vm_TEST_APPLICATION_X3\Scripts\_adxcreateuser.bat.

16/12/2021 02:26:09 : INFO  - Database schema checked : user 'TEST' and roles 'TEST_ADX' not found (RunVerifSchemaBaseSqlServer)

16/12/2021 02:26:09 : INFO  - Tablespace for folder TEST will be created. (LibAdm.GenScriptsImportFolderNT)

16/12/2021 02:26:10 : INFO  - Directory FIL initialized. (LibAdm.GenScriptsImportFolderNT)

16/12/2021 02:26:12 : INFO  - Creation of _adxcreateuser.bat done.

16/12/2021 02:26:12 : INFO  - Tables list for folder to import created. (LibAdm.GenScriptsImportFolderNT)

16/12/2021 02:26:12 : INFO  - Creation of _lstfilseqtest.bat.

16/12/2021 02:26:12 : INFO  - Creation of _lstfilseqtest.bat done.

16/12/2021 02:26:13 : INFO  - File C:\Sage\X3ERPV11\Folders\TEST\SVG\_lstfilseqtest.bat sent on application server.

16/12/2021 02:26:13 : INFO  - Starting running _lstfilseqtest.bat ... (LibAdm.GenScriptsImportFolderNT)

16/12/2021 02:26:16 : INFO  - Execution of _lstfilseqtest.bat done

16/12/2021 02:26:17 : INFO  - File C:\Sage\X3ERPV11\Folders\TEST\SVG\_lstfilseqtest.txt retrieved from application server.

16/12/2021 02:26:17 : INFO  - Creation of _adxtestfil.bat done.

16/12/2021 02:26:17 : INFO  - Creation of _adxtestseq.sql.

16/12/2021 02:26:19 : INFO  - Creation of _adxtestseq.sql done.

16/12/2021 02:26:19 : INFO  - File C:\Sage\X3ERPV11\Folders\TEST\SVG\_adxcreateuser.bat sent on application server.

16/12/2021 02:26:20 : INFO  - File C:\Sage\X3ERPV11\Folders\TEST\SVG\_adxtestseq.sql sent on application server.

16/12/2021 02:26:20 : INFO  - Reading file C:\Sage\X3ERPV11\Folders\TEST\APL.ini. (LibAdm.GenerateAplIniImportFolder)

16/12/2021 02:26:20 : INFO  - File C:\Sage\X3ERPV11\Folders\TEST\APL.ini read from server.

16/12/2021 02:26:20 : INFO  - Processing file C:\Sage\X3ERPV11\Folders\TEST\APL.ini.

16/12/2021 02:26:21 : INFO  - Launching _adxcreateuser.bat ... (LibAdm.RunBaseImportFolderNT)

16/12/2021 02:26:34 : INFO  - Execution of _adxcreateuser.bat done.

16/12/2021 02:26:37 : INFO  - Database schema TEST is available and storages are online  (RunVerifSchemaBaseSqlServer)

16/12/2021 02:26:37 : INFO  - Processing .srf files ...

16/12/2021 02:26:37 : INFO  - Using AdxSrf style Srf generation.

16/12/2021 02:26:39 : INFO  - Processing srf files...

16/12/2021 02:26:40 : INFO  - Srf list for folder to import created.

16/12/2021 02:27:02 : INFO  - Srf files process done.

16/12/2021 02:27:02 : INFO  - Execution of createSrf done in 00:00:25.0097960

16/12/2021 02:27:11 : INFO  - Valfil test performed with success. (LibAdm.RunValfilImportFolderNT)

16/12/2021 02:27:11 : INFO  - Testing connection to Runtime X3ERPV11RUN, host 'x3erpv11vm:50011' ...

16/12/2021 02:27:12 : INFO  - Connection to Runtime x3erpv11vm:50011 OK

16/12/2021 02:27:12 : INFO  - Loading database 'X3ERPV11SQL' from x3erpv11vm   (Native dump mode) ...

16/12/2021 02:27:12 : INFO  - 1527 tables found

16/12/2021 02:27:12 : INFO  - 0076 tables loaded - 05% - ABANK - AFONCTION

16/12/2021 02:27:13 : INFO  - Bcp path built from system PATH variable : C:\Program Files (x86)\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn\bcp.exe

16/12/2021 02:28:04 : INFO  - 0152 tables loaded - 10% - AGDPRMAI - ARCHPAR

16/12/2021 02:28:45 : INFO  - 0228 tables loaded - 15% - ARCHPARE - AWRKHISSUI

16/12/2021 02:29:29 : INFO  - 0304 tables loaded - 20% - AWRKLNK - BP1096PRN

16/12/2021 02:29:47 : INFO  - 0380 tables loaded - 25% - BP1099BEGBAL - CARPRICE

16/12/2021 02:30:06 : INFO  - 0456 tables loaded - 30% - CASHING - CONTACTCRM

16/12/2021 02:30:26 : INFO  - 0532 tables loaded - 35% - CONTAINER - DIETRSXX

16/12/2021 02:30:45 : INFO  - 0608 tables loaded - 40% - DKSDATA - EDTTDS

16/12/2021 02:31:03 : INFO  - 0684 tables loaded - 45% - EECBIDWL - FXDASSETS

16/12/2021 02:31:21 : INFO  - 0760 tables loaded - 50% - FXDLIFL - GSTPER

16/12/2021 02:31:46 : INFO  - 0836 tables loaded - 55% - GSTPERD - ITMCPTVER

16/12/2021 02:32:07 : INFO  - 0912 tables loaded - 60% - ITMCUSNOM - MTCAUTO

16/12/2021 02:32:28 : INFO  - 0988 tables loaded - 65% - MTCBATCH - PHYELT

16/12/2021 02:32:47 : INFO  - 1064 tables loaded - 70% - PHYLCT - PRESP

16/12/2021 02:33:30 : INFO  - 1140 tables loaded - 75% - PRESPD - SAITRS

16/12/2021 02:33:47 : INFO  - 1216 tables loaded - 80% - SAITRSDET - SPAMOD123

16/12/2021 02:34:07 : INFO  - 1292 tables loaded - 85% - SPAMOD190 - SVCRINVCND

16/12/2021 02:34:39 : INFO  - 1368 tables loaded - 90% - SVCRINVCNDD - TABVAC

16/12/2021 02:34:56 : INFO  - 1444 tables loaded - 95% - TABVACBPR - TMPTCHANGE

16/12/2021 02:35:42 : INFO  - End of database load. (LibAdm.RunValfilImportFolderNT)

16/12/2021 02:35:43 : INFO  - Writing _adxtestseq.bat ... (LibAdm.RunValfilImportFolderNT)

16/12/2021 02:35:43 : INFO  - AdxAdmin x3erpv11vm:50000 connection : OK

16/12/2021 02:35:43 : INFO  - File C:\Sage\X3ERPV11\Folders\TEST\SVG\_adxtestseq.bat sent on application server.

16/12/2021 02:35:43 : INFO  - Launching _adxtestseq.bat ... (LibAdm.RunValfilImportFolderNT)

16/12/2021 02:35:46 : INFO  - Execution of _adxtestseq.bat done.

16/12/2021 02:35:46 : INFO  - Folder 'TEST' imported by Runtime X3ERPV11RUN in 00:08:43.6125276

16/12/2021 02:35:47 : INFO  - Checking user script file C:\Sage\X3ERPV11\Folders\TEST\init_console.cmd on server. (LibAdm.CreateFolderDef)

16/12/2021 02:35:48 : INFO  - No User script C:\Sage\X3ERPV11\Folders\TEST\init_console.cmd on server.

16/12/2021 02:35:48 : INFO  - Launching database cleaning script file. (LibAdm.CreateFolderDef)

16/12/2021 02:35:48 : INFO  - Initializing the supervisor from x3erpv11vm / X3ERPV11RUN:50011

16/12/2021 02:42:20 : INFO  - The supervisor initialization has been successfully completed. (00:06:31.7826732)

16/12/2021 02:42:20 : INFO  - Application setup finished.

16/12/2021 02:42:20 : INFO  - [End]


If you do the math on the time, it took roughly 16 minutes and 14 seconds to import the folder. You would still want to run the folder validation and setup and stuff, but the data is imported way faster than the traditional way.

That’s all there really is to it. A simple checkbox makes all the difference.

Until Next year…