8
0
Skriptentwickung/current/Import-FileContentToDB/Archiv/1.0.0.0/Import-FileContent2Database_Settings.ini
2024-01-24 16:42:38 +01:00

157 lines
13 KiB
INI

####################################################################################################
# Digital Data Configuration File (Template Date: 30.07.2016) #
# UTF-8 Coding required! #
# incl. FailSafe functions that are active when information is missing. #
####################################################################################################
#==================================================================================================#
########################################## General Setup ###########################################
#==================================================================================================#
####################################################################################################
# Path in which the log files will be stored. #
# Example: E:\LogFiles\<ScriptName> #
# FailSafe Setting is: <ScriptPath>\Logs #
####################################################################################################
LogPath =
####################################################################################################
# Numerical value how long (in days) log files will be kept. ValidateRange is 0 - 1000 #
# Setting the Value to 0 disables this Function. #
# FailSafe Setting is: 60 #
####################################################################################################
LogFileKeepTime = 30
####################################################################################################
# Numerical value how long (in Minutes) a File has to be there, before processing it. #
# FailSafe Setting is: 5 #
####################################################################################################
FileDelayAge = 1
#==================================================================================================#
######################################## Database settings ########################################
#==================================================================================================#
####################################################################################################
# Name or IP-Adress of the Database Server. #
# Example: 192.168.0.1 #
# Example: 192.168.0.1\<SQLInstance> #
####################################################################################################
DBSQLConnectServer = 172.24.12.56
####################################################################################################
# UserName for the SQL Connection. #
# This Setting is not neccessary if DBSQLConnectIntegratedSecurity is set to "true". #
# Example: sa #
####################################################################################################
DBSQLConnectUserName = sa
####################################################################################################
# Password for the specified UserName you set before. #
# This Setting is not neccessary if DBSQLConnectIntegratedSecurity is set to "true". #
####################################################################################################
DBSQLConnectUserPassword = dd
####################################################################################################
# Set the Database Name which exists on the Database Server. #
# Example: windream60 #
####################################################################################################
DBSQLConnectDatabase = CWLDATEN
####################################################################################################
# Set this to "True" if the Windows Login credentials should be used of Database Login. #
# In this case DBSQLConnectUserName and DBSQLConnectUserPassword setting will be ignored! #
# Example: True #
# Example: False #
####################################################################################################
DBSQLConnectIntegratedSecurity = false
#==================================================================================================#
########################################## Profile Setup ###########################################
#==================================================================================================#
####################################################################################################
# In the following section(s), it is possible to use multiple variables in File and Folder Paths, #
# in SQL Statements as well and other data related specifications. #
# #
# <VariableName> = <ReplaceWithThisValue> #
# %USERNAME% = The current User Name running this Script #
# %USERDOMAIN% = The current Domain Name, User is logged on #
# %COMPUTERNAME% = The Computername on which this Script is running #
# %LOGONSERVER% = The currently connected Domain Controller #
# %SCAN%& = Scan Tag for Batch scanning, will be replaced with - nothing #
# %DATE% = Get Date in this Format: dd.MM.yyyy #
# %TIMESTAMP1% = Get Date in this Format: ddMMyyyy #
# %TIMESTAMP2% = Get Date and Time in this Format: ddMMyyyy_HHmmss #
# %TIMESTAMP3% = Get Date and Time in this Format: ddMMyyyy_HHmmssffff #
# %TIMESTAMP4% = Get Date and Time in this Format: yyyyMMdd HHmmssfff #
# %TIMESTAMP5% = Get Date and Time in this Format: yyyyMMdd_HHmmss #
# %TIMESTAMP6% = Get Date in this Format: dd.MM.yyyy #
# %TIMESTAMP7% = Get Date and Time in this Format: dd.MM.yyyy_HH:mm:ss #
# %TIMESTAMP8% = Get Date and Time in this Format: dd.MM.yyyy_HH:mm:ss.ffff #
# %TIMESTAMP9% = Get Date and Time in this Format: yyyy/MM/dd HH:mm:ss.fff #
# %TIMESTAMP10% = Get Date and Time in this Format: yyyy/MM/dd HH:mm:ss #
#--------------------------------------------------------------------------------------------------#
# Additional Variables specific for this Script are: #
# %SourceFile% = Name of the processed File, including its Extension #
# %SourceFilePath% = Directory of the processed File #
# %SourceFileFullName% = Directory and Name of the processed File, including its Extension #
# #
# This dump table is matching with Function: "Update-ReplacePlaceholder-withLogging" #
# Version Number: 1.0.0.0 / Version Date: 25.10.2018 #
####################################################################################################
####################################################################################################
# Define Profiles in this config file for the executing Script. #
# Syntax: #
# Profile = <ImportMethode> ; <ImportFormat> ; <SourcePath> ; <FirstLine> ; <LastLine> ; #
# <ValueSeperator> ; <ArchivPath> ; <ErrorPath> #
# Example: #
# Profile = BulkImport ; e:\SourceFile.csv #
# Profile_CheckSQLQuery = SQL Statements (SELECT)
# Profile_InitialSQLQuery = SQL Statements (SELECT, INSERT, UPDATE)
# Profile_PreparingSQLQuery = SQL Statements (SELECT, INSERT, UPDATE)
# Profile_MainLoopSQLQuery = SQL Statements (INSERT, UPDATE)
# Profile_FinalSQLQuery = SQL Statements (SELECT, INSERT, UPDATE)
#--------------------------------------------------------------------------------------------------#
# First Parameter: <ImportMethode> #
# Set the way, Script is reading the SourceFile. #
# Currently only the BulkImport is available. #
# Example: BulkImport #
#--------------------------------------------------------------------------------------------------#
# Second Parameter: <SourceFile> #
# Set the full path and name to the file which includes the list you want to Import. #
# Make sure, file is .csv and value separation is done by ";". #
# Example: E:\UserList.csv #
#--------------------------------------------------------------------------------------------------#
# Optional Parameter: %ImportPathAD=<OU=OUName>,<DC=DomainName>,<DC=DomainSuffix> #
# Determ the TargetPath in your Active Directory (part of the distinguishedName). #
# If you dont use this Parameter, TargetPath will be the "Users" Folder by default. #
# Example: OU=Testuser,DC=domainname,DC=local #
#--------------------------------------------------------------------------------------------------#
# Optional Parameter: %ReportFile=<Path>\<FileName>.csv #
# By setting this Parameter, you get a overview file, which includes every created User, #
# with all available data (UserName, PreName, Surname, Password ...) #
# Example: %ReportFile=E:\ReportFile.csv #
#--------------------------------------------------------------------------------------------------#
# Argument call: #
# If you need to run the Script with dynamic Values, you can do so, by calling it with arguments. #
# Even the Special and Optional Parameters are available in this case. #
# Example: #
# This Function is currently not implement! #
####################################################################################################
Profile = BulkImport ; %ColumnName%|%CellValue% ; P:\Skriptentwickung\development\Import-CSV2DB\test-dateien\AltesFormat\*.txt ; 1 ; 2 ; . ;%SourceFilePath%\Archiv\%Timestamp5% ; %SourceFilePath%\Error
Profile_CheckSQLQuery = SELECT 'true'
Profile_InitialSQLQuery = SELECT (SELECT [u003] FROM [CWLDATEN].[dbo].[t693] WHERE [u000] = 1)+1
Profile_PreparingSQLQuery = INSERT INTO [CWLDATEN].[dbo].[TBDD_BATCHIMPORT_HEAD] (BELEGKEY, Konto, Laufnummer, Auftragsnummer) VALUES (%InitialSQLResult%, '700131', NULL, NULL) UPDATE [CWLDATEN].[dbo].[t693] SET u003 = %InitialSQLResult% WHERE [u000] = 1
Profile_MainLoopSQLQuery = INSERT INTO [CWLDATEN].[dbo].[t699] (u000, u001, u002, u003, u004, u005, u006, u007, u008, u009, u010, u011, u012, u013, u014, u015, u016, u029, u030) Select ISNULL(MAX(u000),0) + 1, %InitialSQLResult%, '%sourcefile%', '%column3%', '%column1%', '%column2%', '%column3%', '%column4%', '%column5%', '%column6%', '%column7%', '%column8%', '%column9%', '%column10%', '%column11%', '%column12%', '%column13%', getdate(), '%username%' FROM [CWLDATEN].[dbo].[t699]
Profile_FinalSQLQuery =