Take a notepad and write below code
REM Remove files backup older than 7 days
forfiles /p “C:\backup\folder” /s /m *.* /c “cmd /c Del @path” /d -7
/p <Path> : Specifies the path from which to start the search.
/s = search sub-directories
/m = search mask
/c = set a command
This code will delete files older than 7 days, if you want to delete 15 days older file write 15 instead of 7
Then call the bat file from bods script
exec(‘cmd’, ‘C:\delete_older_File.bat’, 8);
For example, if I have taken the sample data as given below, taken the Sno as a PK in query transform. Violation of PRIMARY KEY constraint.
Reason is because of Sno of 10,9,8,7 and 6 as shown in the sample data.
So we need to consider those records only once. Or eliminate Sno column and load the data with new surrogate key.
Finding Duplicate Rows:
Load the data by unchecking PK definition of the Sno column and load the data.
Execute the below SQL once you have loaded the data.
When I import .atl file into PROD, it is taking too much time, 30 mins. File isze is 50 MB.
How to fix this?
1) Repository database should not be far away , should be in the same LAN segment.
2) Disable the calculate column mapping, for this go to tools -> Options in Desginer and expand General Node, uncheck the “Automatically Calculate Column Mapping” if its checked
3) We should try using the al_engine command to manage your atl export / import.
4) Truncate your al_statistic table and al_history table .
If these tables contain too many rows the import process is slow down.
How to replace single quotes with double quotes?
IF we want to execute the stored procedure from script first import the SP into wer data store first and we can try the below scripts, i am not sure that it will works kindly try and let me know.
Datastore Name.Owner.Procedure_Name( $Var_1 , $Var_2 );
create or replace PROCEDURE findMin(x IN number, y IN number, z OUT number) IS
IF x < y THEN
Below Syntax worked.
SQL(‘Datastore_Name’,’DECLARE a number :=10; b number :=20; c number; begin FINDMIN(a,b,c); end;’);
SAP BODS job is running till the end but at the last data flow failing with the below error:
Data flow is terminated due to error <70301>.
Further error: Execution of <Regular Load Operations> for target <CKS_F> failed. Possible causes: (1) Error in the SQL syntax; (2) Database
connection is broken; (3) Database related errors such as transaction log is full, etc.; (4) The user defined in the datastore
has insufficient privileges to execute the SQL. If the error is for preload or postload operation, or if it is for regular load
operation and load triggers are defined, check the SQL. Otherwise, for (3) and (4), contact your local DBA.
Oracle <> error message for operation <OCIStmtExecute>: <ORA-14400: inserted partition key does not map to any partition
>.|<Regular Load Operations>|<CkS_F>