This blog is the continuation from BSI TaxFactory 10 Installation/Upgrade for SQL Server, which covered gathering materials, configuring SQL Server, and installing SAP Gateway. Now it’s time to get to the heart of the installation: TaxFactory itself.
The next step is to create and populate your TaxFactory database. Unlike an SAP installation, which creates an initial database for you, you must do this part mostly manually.
First, assuming you will separate your TaxFactory database onto separate drives, create the folder structure that will contain it. For instance, if you will be splitting your database across two drives and putting your transaction log onto a third, you might create folders TF10DB1, TF10DB2, and TF10LOG1 on the drives as appropriate. You may not need to split your database up this way; it will depend upon your database administration standards.
Next, launch the SQL Server Management Studio, right-click on Databases, and choose New Database.
Next you must extract the TaxFactory server files. Find the server package that you downloaded from BSI earlier (it will have a name something like wx64sql64tf100d_s.exe) and execute it. You will need to provide the cyclic password, provided to you in an email from BSI. Provide a folder name, such as Server_10.0.d (or as appropriate for the cyclic release), under your Source folder. The package will self-extract into this folder.
Once the extraction is complete, you will find a number of scripts for various database platforms in the subfolder sql. For SQL Server, there are only three you must execute, in this order: crtschma.sql, tf10sqv.sql, and noessqv.sql. To execute each script, go back into SQL Server Management Studio, select your new TF10 database, and choose Open File from the menu.
Open crtschma.sql and execute it.
Close the script file and open tf10sqv.sql (or as appropriate for your database platform) and execute it. This script will have a number of error messages at the beginning similar to “Cannot drop the table… because it does not exist…” This is ok, as indeed these tables do not yet exist until this script completes. Scroll down through the messages and confirm that these are the only errors, followed by a number of lines similar to “(1 row(s) affected).”
Close the script and open noessqv.sql (or as appropriate for your database platform) and execute it.
This has now created a schema and table structure within your database, and set the application password.
Add SQL Login
Now you must grant the Gateway service account access to the database. In SQL Server Management Studio, expand Security, right-click on Logins, and select New Login.
Browse for your Gateway service account, SAPService<SID>, and select it. Leave authentication set to Windows authentication, and set the default database to TF10.
Select the User Mapping page, check the box under Map next to the TF10 database, and ensure that the username appears in the User column. In the Default Schema column, browse for the TF10 schema and select it. Then, with the TF10 database row selected, add the db_owner role (public should already be selected).
Next you must configure the ODBC driver that the TaxFactory server will use for database access. Since you have installed SQL Server on this same host, the SQL Server Native Client is already installed and is the ideal driver to use.
For Windows 2012 R2, click Start… Administrative Tools… ODBC Data Sources (64-bit) (for other Windows releases, the path may be slightly different). Switch to the System DSN tab. Click Add.
Select the SQL Server Native Client and click Finish.
Give the Data Source (DSN) a name — I recommend making it the same as the SID you chose for the Gateway, in this example ‘TFP’, put in a description, and select or type in the hostname for your SQL Server. Click Next.
Leave With Integrated Windows Authentication selected, and click Next.
Select the checkbox for Change the default database to and select TF10. Leave other options at their default, and click Next.
On the final page, leave everything at default and click Finish. Click Test Data Source, and if everything is successful, click OK twice. Confirm your new System Data Source shows up in the list, and click OK again. Close Administrative Tools.
TaxFactory Server Executables
Create the folder path \BSI\TaxFactory. You can put this on the same drive with your SAP Gateway executables. From your Source folder, locate the Server_10.0.d folder that you extracted from your downloaded server package earlier (the same location from which you executed the SQL scripts). Copy the server subfolder and its contents to the \BSI\TaxFactory folder you just created.
Next, create a batch file named tf10server.bat and put the following lines into it:
REM for SAP trace debugging, uncomment below & see file errors.txt in gateway working directory
REM E:\BSI\TaxFactory\server\tf10serverdebug.exe %*
REM else for usual operation
Change the DSN name in the first line to match the actual DSN name you selected earlier, and the drive letter in the last line to the actual drive on which you placed your TaxFactory server executables.
Note that the path and filename for this batch file must exactly match the path and filename in the TP parameter in your Gateway’s secinfo.dat file (see part 1 of this blog for more information). If there is a discrepancy, adapt one or the other to match (if you modify secinfo.dat, you will need to restart the Gateway).
<continued at BSI TaxFactory 10 Installation for SQL Server – Part 3>