Showing posts with label purposes. Show all posts
Showing posts with label purposes. Show all posts

Thursday, March 8, 2012

Bulk Insert fails. Column is too long in the data file

Hi,

for testing purposes I'm inserting a flat file into a sql-server table using BULK INSERT unsig the following code:

BULK INSERT rsk_staging
FROM 'c:\temp\bulk\rsk.txt'
WITH (
FIELDTERMINATOR = '\n',
ROWTERMINATOR = '\r\n',
CODEPAGE = 'RAW',
DATAFILETYPE = 'char',
BATCHSIZE = 100000,
ROWS_PER_BATCH = 1925604,
TABLOCK
)

I have two versions of "rsk.txt" one with 1.9mill rows and one with the first 2000 rows only. The files have one column only with 115 characters that I'll split in to several columns later using SUBSTRING. The one with 2000 rows fires in to the database with no problems whatsoever using this exact code, the other one throws the following error:

Server: Msg 4866, Level 17, State 66, Line 1
Bulk Insert fails. Column is too long in the data file for row 1, column 1. Make sure the field terminator and row terminator are specified correctly.

How can I resolve this problem?

EDIT: I tried several different row- and fieldterminators but this exact one works for the small data-file so I assume it should also work for the large one...the large one is however copyed directly using binary ftp from a unix-filesystem and the small one is manually copied into a new txt-file using UltraEdit.

Problem solved...when I used ascii-ftp instead of binary everything worked well. 1.9 mill records from a flat file on a network share into my local db WITH substring conversion in 2 mins. No need to say I'm a happy camper at the moment

Thursday, February 16, 2012

BUILTIN\Administrators Login

I would like to remove the BUILTIN\Administrators Login
from SQL Server 2000 for security purposes.
Will there be any problems with SQL Server 2000 running
properly if I do this?
Thank you.Whether you get problems or not depends. The following
article has an more information section with links to some
issues that could come up:
INF: How to impede Windows NT administrators from
administering a clustered instance of SQL Server
http://support.microsoft.com/?id=263712
-Sue
On Mon, 22 Mar 2004 12:58:47 -0800, "Mike"
<anonymous@.discussions.microsoft.com> wrote:

>I would like to remove the BUILTIN\Administrators Login
>from SQL Server 2000 for security purposes.
>Will there be any problems with SQL Server 2000 running
>properly if I do this?
>Thank you.|||Hi,
I had problems in the below when I removed "Syadmin role" from
BuildIN/Administrators. So I have given back the sysadmin role to solve the
issue.
1. FULL Text Indexing
2. Maintenance Plans
So do a test in test server for couple of weeks and then implement in
Production server.
Known issues after removal ,
Some things to be aware of:
Q237604 PRB: SQL Server Agent Does Not Start and Displays Error 18456
Q295034 FIX: MSSearch Takes 100% CPU if BUILTIN\Administrators Removed
Q317746 PRB: SQL Server Full-Text Search Does Not Populate Catalogs
Thanks
Hari
MCDBA
"Sue Hoegemeier" <Sue_H@.nomail.please> wrote in message
news:d9mu5054kffi4f8olts36mpa8du6um98q9@.
4ax.com...
> Whether you get problems or not depends. The following
> article has an more information section with links to some
> issues that could come up:
> INF: How to impede Windows NT administrators from
> administering a clustered instance of SQL Server
> http://support.microsoft.com/?id=263712
> -Sue
> On Mon, 22 Mar 2004 12:58:47 -0800, "Mike"
> <anonymous@.discussions.microsoft.com> wrote:
>
>