SSIS log provider for Text files - Clean logs
I have SQL Server 2012 with package deployment model.
I'm thinking what is best practise for logging.
Does SSIS log create new log files each day or does it log alway to same file forever?
How to handle that size of files in Logging Folder is under control? Is is manual process to clean(remove) logs or any automated way to remove logs older that 30 days etc?
Kenny_I
In all SSIS versions the logging to file is an append operation, or create then append if the log file does not exist. To remedy the file growth one needs to create a scheduled job.
Another option is to create a new file in the package http://goo.gl/4c1O3n this is helpful if you want to get rid of the files older than x days. IMO the easiest way to remove these is thru
Using Robocopy to delete old files from folder
Arthur My Blog
Similar Messages
-
SSIS 2008 Logging - SSIS Log Provider for SQL Server
Simple SSIS package - copies a table from Server A to Server B.
Everything works except logging using SSIS Log Provider for SQL Server. Selecting the similar events to using
SSIS Log Provider for Text Files does generates a file on the server.
I specified server B on the configuration for SSIS Log Provider for SQL Server.
Logged on with a username with sysadmin rights on Server B. Executed the package using that login and nothing is written to msdb..sysssislog
any ideas what's going on or what am I doing wrong?Just to be sure that the basics are right :
You sure that you configured the log provider correctly?
Selected the required 'components' on the left bar?
Selected events on the Details Tab?
selected the right table? I mean it should be --> select * from msdb..sysssislog
The default schema in your DB setup is dbo right? Coz, if not the logging will be a real problem. You might wanna recreate the table then ..
Btw, if you still experience issues, I'd advise you to enable all events and check for logging just to make sure that there isnt any prob with the DB setup ..
Do try and let us know :)
Edited:
Also a few more:
Check what database you chose in the connection setting page of the logging configuration wizard and check for entries in sysssislog of tht DB as, the sysssislog will be created only in that db.
Ensure that you have execute permission on sp_ssis_addlogentry in that particular db (mostly msdb). Can be checked via:
select name,
has_perms_by_name(name, 'OBJECT', 'EXECUTE') as has_execute
from msdb.sys.procedures
where name like 'sp_ssis_addlogentry' --for 2008 edition and up
or name like 'sp_dts_addlogentry' --for 2005 edition
Thanks to @Sathyanarrayanans for pointing this out :)
Hope this should help ..
Thanks, Jay <If the post was helpful mark as 'Helpful and if the post answered your query, mark as 'Answered'> -
What is the best practise to provide a text file for a Java class in a OSGi bundle in CQ?
This is probably a very basic question so please bear with me.
What is the best way to provide a .txt file to be read by a Java class in a OSGi bundle in CQ 5.5?
I have been able to read a file called "test.txt" that I put in a structure like this /src/resources/<any-sub-folder>/test.txt from my java class at /src/main/java/com/test/mytest/Test.java using the bundle's getResource and getEntry calls but I was not able to use the context.getDataFile. How is this getDataFile method call to be used?
And what if I want to read the file located in another bundle, is it possible? or can I add the file to some repository and then access it - but I am not clear how to do this.
And I would also like to know what is the best practise if I need to provide a large data set in a flat file to be read by a Java class in CQ5.
Please provide detailed steps or point me to a how to guide or other helpful resources as I am a novice.
Thank you in advance for your time and help.
VSAs you can read in the OSGi Core specification (section 4.5.2), the getDataFile() method is to read/write a file in the bundle's private persistent area. It cannot be used to read files contained in the bundle. The issue Sham mentions refers to a version of Felix which is not used in CQ.
The methods you mentioned (getResource and getEntry) are appropriate for reading files contained in a bundle.
Reading a file from the repository is done using the JCR API. You can see a blueprint for how to do this by looking at the readFile method in http://svn.apache.org/repos/asf/jackrabbit/tags/2.4.0/jackrabbit-jcr-commons/src/main/java /org/apache/jackrabbit/commons/JcrUtils.java. Unfortunately, this method is not currently usable as it was declared incorrectly (should be a static method, but is an instance method).
Regards,
Justin -
GUI_UPLOAD not working for text file upload with '|' as a saperater
Dear all,
I have used 'GUI_UPLOAD' to upload data from text file having below format,
1000|HBK1|HKTI
1000|HBK2|HKTI
1000|HBK3|HKTI
My code is as below
*& Report ZTEST_NEW1
REPORT ZTEST_NEW1.
TYPE-POOLS: truxs,
kcde.
TYPES : BEGIN OF ty_data2 ,
zbukr TYPE payr-zbukr ,
hbkid TYPE payr-hbkid ,
hktid TYPE payr-hktid ,
END OF ty_data2 .
DATA : it_file TYPE filetable .
DATA : wa_file LIKE LINE OF it_file .
DATA : w_rc TYPE i ,
lv_file TYPE string .
DATA : it_data2 TYPE TABLE OF ty_data2,
wa_data2 LIKE LINE OF it_data2.
SELECTION-SCREEN BEGIN OF BLOCK bk1 WITH FRAME TITLE text-020.
PARAMETER : pr_file TYPE rlgrap-filename .
SELECTION-SCREEN END OF BLOCK bk1 .
AT SELECTION-SCREEN ON VALUE-REQUEST FOR pr_file.
PERFORM get_file.
START-OF-SELECTION.
PERFORM get_data.
FORM get_file .
CALL METHOD cl_gui_frontend_services=>file_open_dialog
* EXPORTING
* WINDOW_TITLE =
* DEFAULT_EXTENSION =
* DEFAULT_FILENAME =
* FILE_FILTER =
* INITIAL_DIRECTORY =
* MULTISELECTION =
* WITH_ENCODING =
CHANGING
file_table = it_file
rc = w_rc
* USER_ACTION =
* FILE_ENCODING =
EXCEPTIONS
file_open_dialog_failed = 1
cntl_error = 2
error_no_gui = 3
not_supported_by_gui = 4
OTHERS = 5
IF sy-subrc EQ 0.
CLEAR : wa_file.
LOOP AT it_file INTO wa_file.
pr_file = wa_file-filename.
CLEAR : wa_file.
ENDLOOP.
ELSE.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDFORM. " get_file
FORM get_data .
IF pr_file IS INITIAL.
MESSAGE 'Enter file name'(002) TYPE 'E'.
ENDIF.
IF pr_file CP '*.xls'
or pr_file CP '*.xlsx' . " Added
ELSEIF pr_file CP '*.txt'.
CONSTANTS : c_del TYPE c LENGTH 1 VALUE '|'.
lv_file = pr_file.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME = lv_file
FILETYPE = 'ASC'
HAS_FIELD_SEPARATOR = c_del
* HEADER_LENGTH = 1
* READ_BY_LINE = 'X'
* DAT_MODE = ' '
* CODEPAGE = ' '
* IGNORE_CERR = ABAP_TRUE
* REPLACEMENT = '#'
* CHECK_BOM = ' '
* VIRUS_SCAN_PROFILE =
* IMPORTING
* FILELENGTH =
* HEADER =
TABLES
DATA_TAB = it_data2
* EXCEPTIONS
* FILE_OPEN_ERROR = 1
* FILE_READ_ERROR = 2
* NO_BATCH = 3
* GUI_REFUSE_FILETRANSFER = 4
* INVALID_TYPE = 5
* NO_AUTHORITY = 6
* UNKNOWN_ERROR = 7
* BAD_DATA_FORMAT = 8
* HEADER_NOT_ALLOWED = 9
* SEPARATOR_NOT_ALLOWED = 10
* HEADER_TOO_LONG = 11
* UNKNOWN_DP_ERROR = 12
* ACCESS_DENIED = 13
* DP_OUT_OF_MEMORY = 14
* DISK_FULL = 15
* DP_TIMEOUT = 16
* OTHERS = 17
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
endif.
ENDFORM. " get_data
In my output I am only getting company codes and not getting other two columns, can any body guide me where I am doing wrong?
I have checked many other same kind of threads and I have done the same as suggested to do but still I am facing issue.
Thanks in advance.
Regards,
UmangHi Umang,
There is a simple solution to this problem. Make the following changes to your code(marked in red color):
REPORT ZTEST_NEW1.
TYPE-POOLS: truxs,
kcde.
TYPES : BEGIN OF ty_data2 ,
zbukr TYPE payr-zbukr ,
hbkid TYPE payr-hbkid ,
hktid TYPE payr-hktid ,
END OF ty_data2 .
types: begin of ty_data
str type char200,
end of ty_data.
DATA: it_data type table of ty_data,
wa_data type ty_data.
DATA : it_file TYPE filetable .
DATA : wa_file LIKE LINE OF it_file .
DATA : w_rc TYPE i ,
lv_file TYPE string .
DATA : it_data2 TYPE TABLE OF ty_data2,
wa_data2 LIKE LINE OF it_data2.
rest of the code **
FORM get_data .
IF pr_file IS INITIAL.
MESSAGE 'Enter file name'(002) TYPE 'E'.
ENDIF.
IF pr_file CP '*.xls'
or pr_file CP '*.xlsx' . " Added
ELSEIF pr_file CP '*.txt'.
CONSTANTS : c_del TYPE c LENGTH 1 VALUE '|'.
lv_file = pr_file.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME = lv_file
FILETYPE = 'ASC'
*HAS_FIELD_SEPARATOR = c_del "comment this line
HEADER_LENGTH = 1
READ_BY_LINE = 'X'
DAT_MODE = ' '
CODEPAGE = ' '
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
CHECK_BOM = ' '
VIRUS_SCAN_PROFILE =
IMPORTING
FILELENGTH =
HEADER =
TABLES
DATA_TAB = it_data
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_READ_ERROR = 2
NO_BATCH = 3
GUI_REFUSE_FILETRANSFER = 4
INVALID_TYPE = 5
NO_AUTHORITY = 6
UNKNOWN_ERROR = 7
BAD_DATA_FORMAT = 8
HEADER_NOT_ALLOWED = 9
SEPARATOR_NOT_ALLOWED = 10
HEADER_TOO_LONG = 11
UNKNOWN_DP_ERROR = 12
ACCESS_DENIED = 13
DP_OUT_OF_MEMORY = 14
DISK_FULL = 15
DP_TIMEOUT = 16
OTHERS = 17
IF SY-SUBRC 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
endif.
Loop at it_data into wa_data.
split wa_data-str at '|' into wa_data2-zbukr wa_data2-hbkid wa_data2-hktid.
append wa_data2 to it_data2.
clear wa_data2.
Endloop.
ENDFORM. " get_data
IT_DATA2 will contain the final uploaded data. Hope this helps -
Is there a way to upload text files (either Word or PDF) with the current widgets in iWeb? If not, are there ways to embed links to these files in the web content, if they are not already published on the internet?
Thanks for any help you can give!dockld wrote:
Is there a way to upload text files (either Word or PDF) with the current widgets in iWeb?
I don't think so. iWeb uploads such files to your server automatically when you use the +"Link To: A File"+ option in iWeb Inspector's Link tab — see towards the end of this _video tutorial_. Note that you won't be able to test the hyperlink to your PDFs within iWeb — only in a browser after publishing. This may also help:
http://web.me.com/toad.hall/Demo_1/LinkTestPage.html
Or you could post your files on free Posterous and link to them via a text or image hyperlink — then they'll be automatically presented in a convenient viewer, e.g.
http://dont-panic.posterous.com/pdf-document-example -
Quick look for text files with non-registered extensions
It seems there was a way in 10.5 and 10.6 to register certain extensions with Quick Look to tell them how to preview a file. I have a lot of plain text files with different extensions that are not initially recognized by Quick Look. How do I hack the registry to tell Quick Look to preview a .cfg (or .aux, etc.) file as plain text?
Can't Quick Look for some text files
Re: Is it possible to change the viewing format?
Quick Look for files without extensions.
Re: Can I view text files without a .txt extension in Quick Look?
How do I add support to Quick Look -
Hi all
I am trying to implement attachement viewing with servlets. Following is what I am doing in order to set the application type which will open the file.
I can open all types of files except text. setcontenttype("text/html") should take care of text files. but I just get a blank page when I try to open the text file. no errors either.
what could be the problem?
following is the relevant code:
if (fileName.indexOf("xls") > -1)
res.setContentType( "application/vnd.ms-excel" ); // MIME type for xls document
}else if (fileName.indexOf("pdf") > -1)
res.setContentType( "application/pdf" ); // MIME type for Adobe pdf document
}else if (fileName.indexOf("doc") > -1)
res.setContentType( "application/msword" ); // MIME type for MSWord document
}else if (fileName.indexOf("ppt") > -1)
res.setContentType( "application/powerpoint" ); // MIME type for powerpoint document
else
res.setContentType("text/html");also if i view source in the blank page, i can see the following:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=windows-1252"></HEAD>
<BODY></BODY></HTML>
not sure where this comes from? but content=text/html is correct since i am setting it.
any hints? -
Where is a good source for text files?
Hi
I've just finished implementing a huffman tree and been testing it out. It seems to be working fine - encoding and decoding results look correct.
However, I really want to test this tree out with a larger 'dictionary', so that I can construct a larger tree and check if performance is any slower. Does anyone know where I can find a collection of large text documents that I can easily download and have my code run over it?
I tried googling, but haven't came across anything useful. Ideally, I would like to find documents of different topics. e.g. medical, computing, and a more general type that resembles everyday language. The reason I am wanting these is so I can test the encoding of different text on different tree types. Thus, encoding a computer journal on a tree constructed from the frequencies of a medical text file, should yield poorer compression than encoding the same computer journal on a tree constructed from the frequencies of a computing text file.
ThanksGoogle "project gutenberg" for a bunch of text.
Plain ASCII isn't enough for pictures and many fields' texts. So a lot of modern texts tend to be PDFs and such, which might not suit your purpose.
Maybe you could also use web pages as test data. Write a program that googles for "medical", downloads the first 100 hits, optionally replaces <.*> with a space, and runs your program on that. -
Hi guys,
Iam unable to view the downloaded text file (.txt) in my BlackBerry playbook....the error message is showing as "unable to find the default app.
Please help mePlease check your other message posted where I've responded.
1. If any post helps you please click the below the post(s) that helped you.
2. Please resolve your thread by marking the post "Solution?" which solved it for you!
3. Install free BlackBerry Protect today for backups of contacts and data.
4. Guide to Unlocking your BlackBerry & Unlock Codes
Join our BBM Channels (Beta)
BlackBerry Support Forums Channel
PIN: C0001B7B4 Display/Scan Bar Code
Knowledge Base Updates
PIN: C0005A9AA Display/Scan Bar Code -
Dear all,
I am currently working on ABAP development which create flat text file to client PC. Now the file may contain multi language, so the text encoding is UTF-8.
My question is that I want to create UTF-8 file with BOM (Byte Order Mark).
Is there a way to add that?
Thanks a lot for your input in advance.
Regards,
KazuyaHi,
You can use the parameter WRITE_BOM of FM/method gui_download to do this.
Kr,
Manu. -
Partial Overwrite for text file
I am trying to figure out how to overwrite a single line in a text file for an appointment program I am making. I am having a difficult time with this because I can't figure out how to overwrite a single line. If I could solve this, I could get my delete button (it's GUI) working and my edit button working. Thanks in advance!
-VegunksThe short answer is that "overwriting" in a text file is problematic, and for a couple reasons:
1. Often you want to replace 50 characters with 70 characters or 30 characters and you can't make a file simply grow or shrink like that.
2. Your text encoding may have some surprises in store for you. Common encodings like UTF-8 can encode a single character as 1, 2 or three bytes depending on its value, so even if you think you are replacing 50 characters with 50 characters, you may be replacing 80 bytes with 84 bytes.
The solution is to rewrite the entire file. More precisely:
1. create a new file and write to it.
2. delete the old file.
3. rename the new file to take the place of the old file.
edit: too slow! -
Algorithm for Text file comparision
Hi Everyone,
Please help me how to develop a utility for comparining two text files and display the output in the browser as given
Added
Modified
Removed
ThanksHi Everyone,
Please help me how to develop a utility for
comparining two text files and display the output in
the browser as given
Added
Modified
Removed
ThanksHi,
As u mentioned it as Text file, read both the files and store the content in a StringBuffer and compare the content to check whether new content is added, modified or deleted -
No support for text files attached in emails
I was shocked to discover that a simple RTF (Rich Text File) is not supported by iPhone. I was sent a small attachment as a text file and was unable to open it. Surely something as simple as a text file attachment should be easy to display.
Come on Apple, lets get working on version 1.1fixed in later OS
-
Help with makin an interface for text files in a directory
hi all..
i m in need to help for making a GUI, that takes all the filenames from a directory, count them,
display all their names on the GUI in form of radio buttons... for the user to choose from..
and then their shud be some options of changin the data inside the particular file that is chosen..
and storin it back...
i thought to do the GUI part in applet... and other program in simple java code....
but there is some problem in insert that code in applet...
can anyone help tellin me .. if this task can be fully done in java itself..
or can suggest anyother language,,,,
i also have problem in readin the filenames from directory..
and showin it as a option in interface????
please help...
thanks to allHello, I'm trying to do a thing pretty much the same although more simple.
I'm trying to list all contents of a directory, then check if the directory has a directory inside it named according to the contents of the file readed. To summarize, I'm trying to repeatedly open files and compare them.
Here is the code I've written so far:
package archivos;
import java.awt.*;
import java.awt.event.*;
import java.io.*;
import java.io.File;
import java.util.StringTokenizer;
class ej18 extends Frame implements ActionListener
private TextField tf;
private Button b;
private TextArea ta1,ta2,ta3,ta4;
private Label la;
ej18()
setLayout(new FlowLayout());
setSize(200,200);
setVisible(true);
la = new Label("Escribe el nombre del directorio donde se encuentra patrones y patrones.txt:");
tf = new TextField("",20);
ta1 = new TextArea(15,40);
ta2 = new TextArea(15,40);
ta3 = new TextArea(15,40);
ta4 = new TextArea(15,40);
b = new Button("Comenzar");
b.addActionListener(this);
add(la);
add(tf);
add(b);
add(ta1);
add(ta2);
add(ta3);
add(ta4);
pack();
public void actionPerformed(ActionEvent e1)
String x,y;
Button Boton;
Boton = (Button)e1.getSource();
int op=0;
if(Boton==b)
try
x=tf.getText();
File patrones = new File(x);
if(patrones.exists()&&patrones.isDirectory())
{ta1.append("******\nDirectorio <patrones> existe\n");}
else{ta1.append("Directorio <patrones> no existe\n");}
String[] files1 = patrones.list();
ta1.append( "Archivos:\n" );
for( String file : files1 ){ta1.append( file + "\n");}
File textfile = new File(x,"patrones.txt");
if(textfile.exists()&&textfile.isFile())
{{ta2.append("******\nArchivo <patrones.txt> existe\nContenido:\n");
BufferedReader in = new BufferedReader(new FileReader(textfile));
String s="";
//tokeinzer
while ( s != null )
ta2.append(s+"\n");
s = in.readLine();
String rs=s;
String[] result = rs.split(",");
String r = result[result.length-1];
File textfile1 = new File(x,r);
if(textfile1.exists()&&textfile1.isFile())
{ta3.append("*****\nArchivo <"+r+"> existe\nContenido\n");
StringTokenizer st = new StringTokenizer(r,".");
String rr=st.nextToken();
File textdir = new File(x,rr);
if(textdir.exists()&&textdir.isDirectory())
{ta4.append("*****\nEl directorio <"+rr+"> existe\n");
String[] files2 = textdir.list();
ta4.append( "Archivos:\n" );
for( String file : files2 ){ta4.append( file + "\n");}
else{ta4.append("*****\nEl directorio <"+rr+"> no existe\n");}
BufferedReader in1 = new BufferedReader(new FileReader(textfile1));
String ss="";
while ( ss != null )
ta3.append(ss+"\n");
ss = in1.readLine();
else{ta3.append("*****\nArchivo <"+r+"> no existe\n");}
//!tokenizer
in.close();}}
else{{ta2.append("Archivo <patrones.txt> no existe\n");}}
catch (Exception e2)
System.err.println("File input error");
class Intanciador_ej18
public static void main(String ar[])
ej18 obj = new ej18();
} -
Reg Sender AS2 module configuration for text file
Hi Experts,
I am working on an inbound scenario where Sender is AS2 and Receiver is SAP system in PI7.4. The Sender Trading Partner is Sending a text file which should be converted to xml. I have added the module parameter localjbs/PlainConverterModule .It is throwing the error as per the attached file.
Could anyone please guide me on this issue. Also Please let me know whether any configuration needs to be set in EDI content Manager.
Cheers,
NeethuHi Neethu,
according to the b2b help the module is used to convert EDIFACT message standards into XML. I your case you have flat file comming from AS2. you can use message transform bean to convert flat file to XML in sender as2 adapter. Or you need to define ED XML converter. Please refer the below link
SAP PI: Using the B2BADDON EDI<>XML Convertor Modules - Basics
You configure the communication channels of any Process Integration adapter with the PLAIN-XML converter module to convert business documents encoded in EDIFACT message standards into XML and the other way round. It must be configured in the sender and receiver channels based on the business scenario. The PLAIN-XML converter module runs on the SAP NetWeaver Process Integration Adapter framework.
You use this procedure to configure the parameters of the PLAIN-XML converter module.
source - Configuring the PLAIN-XML Converter Module - SAP NetWeaver Process Integration, business-to-business add-on 1 - SAP Libr…
regards,
Harish
Maybe you are looking for
-
How to Create a SQL Agent Job For A SSIS Package with Sql Server Authentication
Hi ALl, I have a SSIS package which basically has a data flow task in which i pull the data from one server and copy it into another server and my source server is the one where i dont have windows authentication and i have to only use a sql server a
-
Server 2012 R2 - Installing but not configuring WDS role
I would like to install the WDS role on a server but not configure PXE or the DHCP settings until later on this week. We currently have an existing WDS server running on Server 2003 DHCP is not running on the old server and will not be running on the
-
ITunes won't start after Windows 7 Repair install
Hi there I recently had to repair my Windows 7 64 bit Home Premium edition installation. It warned me before reinstalling that there could be some problems with iTunes following the repair but I followed the instructions to counter this and repair Wi
-
Hi, I purchased Acrobat Standard XI, but can only find the CD for windows. I have a mac (I have access to an external CD drive and I have the product keys for windows). I have never installed it anywhere else. What is the best way for me to instal
-
I'm considering buying a new Core Duo iMac, but I have a question -- all the "works" seem to be at the bottom of the screen, so that the height of the screen may be too high for me (at least from what I can see in the photos). It's difficult at best