Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

download IIS log from .log file Expand / Collapse
Author
Message
Posted Thursday, October 24, 2013 1:53 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, June 2, 2014 7:17 AM
Points: 7, Visits: 26
Hello.

I'm sorry for my English.
I have a task, download into my table IIS log and compress this table

Now I did such
Download from MS site programm LogParser, and did a bat file
"C:\Program Files (x86)\Log Parser 2.2\LogParser.exe" "SELECT * INTO LogIIS FROM C:\test\u_*.log " -i:IISW3C -o:SQL -database:AdventureWorks2012
Work very well!!)

The first problem was, if I do table with one column varchar(max) and then ALTER TABLE LogIIS REBUILD PARTITION = ALL WITH (DATA_COMPRESSION = PAGE), compress don't work, but I couldn'y understand how to parse with internal function of sql server?

Question, can i do this task without other programm? I mean without LogParser?

Table
LogIIS
LogFileName varchar
logRow int
dateLog datetime
timeLog datetime
c_ip varchar
cs_username varchar
s_sitename varchar
s_compname varchar
s_ip2 varchar
s_port int
cs_method char
cs_uri_ste varchar
cs_uri_quer varchar
sc_status int
sc_substatus int
cs_win_sta int
sc_bytes int
cs_bytes int
time_taken int
cs_version varchar
cs_host varchar
cs_us_agent varchar
cs_cokiee varchar
cs_reffer varchar
s_event varchar
s_proc_type varchar
s_user_time real
s_kern_time real
s_page_fault int
s_total_faul int
s_active_pro int
s_stoppe_pro int
Post #1507906
Posted Thursday, October 24, 2013 12:52 PM


SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Yesterday @ 6:25 AM
Points: 149, Visits: 1,023
Perhaps you don't have partitions?

It looks to me that you can complete page level compression for the whole table by doing this:
ALTER TABLE T1 REBUILD WITH (DATA_COMPRESSION = PAGE)

It's worth a try anyway.


Regards,

Irish
Post #1508227
Posted Thursday, October 24, 2013 11:44 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, June 2, 2014 7:17 AM
Points: 7, Visits: 26
thank you!!!
You are right, when I did your scritp, the table compressed.
Post #1508331
Posted Wednesday, November 6, 2013 9:50 AM


SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Yesterday @ 6:25 AM
Points: 149, Visits: 1,023
I'm just glad I could help!

Regards,

Irish
Post #1511932
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse