Thursday, February 16, 2012
Allow space in data
i suppose i have a very simple common but a problem :p in sqlldr.
I want to allow blank space in one of my columns.
say if i want to load the following
'amol '
' amol '
' amol '
' amol '
it gets loaded but i want toi retain the trailing blank characters. what i find in table is the trailing space is truncated and i get data length as
4
5
6
7
e.g 7 includes three prefixed blank characters and the 4 alphabets.
i want to see a regular length of 10 in each row.
any pointers?? any option in the control file of sqlldr??
Thanks,
Amol Cnow what on earth is a 'blank space' ? poor term, ain't it?
hey just dropped in to convey that the length of the data is 10.
'amol '
4 characters + 6 "blank spaces"|||Slightly modify the control file ... add the column length where needed.
Let's say, for example, that your control file looks like this:LOAD DATA
INFILE some_file.txt
INTO TABLE your_table
(column_name POSITION(001:010) CHAR)When loading, you'll lose trailing blanks. To prevent this to happen, the last row in example control file should look like this:(column_name POSITION(001:010) CHAR(10))
P.S. I guess it is about Oracle SQL*Loader utility ... if so, I'd suggest you to post questions regarding Oracle in the Oracle forum.|||User the PRESERVE BLANKS option:
LOAD DATA
INFILE some_file.txt
INTO TABLE your_table
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
PRESERVE BLANKS
(COL1, COL2, ...etc...
:D
Sunday, February 12, 2012
All SSIS packages failing after Windows Update!
Starting saturday all of our SSIS packages on a server (64-bit) starting failing (hundreds of them) the error is:
Precompiled script failed to load. Attempting to reload the script with updated data. For more information, see the Microsoft Knowledge Base article, KB931846 (http://go.microsoft.com/fwlink/?LinkId=81885).
That Knowledgebase link talks about SP2 fixing the issue but we have SP2 already on the server. The sysdtslog90 table is just packed with these as each script inside each package is getting the same error. Looking at the system log the following were installed as part of windows update shortly before the errors started occuring:
- Update for Windows Server 2003 x64 Edition (KB936357)
- Security Update for Windows Server 2003 x64 Edition (KB926122)
- Microsoft .NET Framework 3.0: x64 (KB928416)
- Security Update for Microsoft .NET Framework, Version 2.0 (KB928365)
- Security Update for Excel 2003 (KB936507)
- Update for Outlook 2003 Junk Email Filter (KB936557)
If I open the package and manually recompile the scripts it works fine.... if I need to do that for every script that is going to likely be several days of just opening the packages one by one and recompiling each script (over 100 packages, each with at least 5 script objects).
|||I think this is the problem: - Security Update for Microsoft .NET Framework, Version 2.0 (KB928365)
See the sticky post at the top of this forum. I suspect that's what caused the issue, and of course, it's not uninstallable. There's a hotfix listed in that post that you could try applying.
|||I read that post when I first got the error - but it sounds like that is only if you do not have SP2 install... Am I reading that KB/sticky wrong?
I'll try applying the mentioned hotfix anyway - sure beats massive recompiling by hand
Hi Chris,
You're saying that those packages fail with "
Precompiled script failed to load. Attempting to reload the script with updated data. For more information, see the Microsoft Knowledge Base article, KB931846 (http://go.microsoft.com/fwlink/?LinkId=81885).
"
But that message is actually a warning not an error. It should not fail the package just warn that we are trying to workaround a problem we have in the scripts due to the .net change mentioned in the KB article. Can you paste more of the package execution output to this thread so I can try and understand what error is triggered?
Thanks,
Silviu Guea [MSFT], SQL Server Integration Services
|||Correct... sorry the packages were not failing - however I have everything setup to email on warnings (sometimes those warnings are very useful, for example when it detects dupes in a lookup) so everyone has been getting hit with tons of email.
So .. basically are you saying I can ignore that warning? (I can hard code pkg to ignore that particular warning)
|||Hi Chris,
You should ignore the warning. We put it there to let you know we are doing something with the script and to help diagnose the fact that the machine has the .net framework change mentioned in the KB article from the announcement found at the top of the SQL Server IS thread.
Thanks,
Silviu Guea [MSFT] SQL Server Integration Services