Description
I have followed the TEC484180 to import the audit logs to the sql database I was successfully able to run the script harvest.bat -cleanup (switch) and the script created all the comma seperated values in .tmp files know i was trying to import these files to SQL database. Do you know How I can import the csv files into the SQL Server Databases?
Solution
This can be done using SQL Server utilities, in this KB article we are using the SQL Server utility BCP.
You can import the data as follows:
bcp <database>.<owner>.table in <datafile> -T -f format <file>
Example:
C:\temp>bcp auditstore..smobjlog4 in XPS_324_20090731104256_1.dat -T -f C:\temp\format.xml Starting copy... 8 rows copied. Network packet size (bytes): 4096 Clock Time (ms.) Total : 16 Average : (500.00 rows per sec.)