October 24, 2013 at 1:53 am
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
LogFileNamevarchar
logRowint
dateLogdatetime
timeLogdatetime
c_ipvarchar
cs_usernamevarchar
s_sitenamevarchar
s_compnamevarchar
s_ip2varchar
s_portint
cs_methodchar
cs_uri_stevarchar
cs_uri_quervarchar
sc_statusint
sc_substatusint
cs_win_staint
sc_bytesint
cs_bytesint
time_takenint
cs_versionvarchar
cs_hostvarchar
cs_us_agentvarchar
cs_cokieevarchar
cs_reffervarchar
s_eventvarchar
s_proc_typevarchar
s_user_timereal
s_kern_timereal
s_page_faultint
s_total_faulint
s_active_proint
s_stoppe_proint
October 24, 2013 at 12:53 pm
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
October 24, 2013 at 11:44 pm
thank you!!!
You are right, when I did your scritp, the table compressed.
November 6, 2013 at 9:50 am
I'm just glad I could help!
Regards, Irish
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply