Saturday, February 25, 2012

Problem with decimal point

I have got txt file and I am trying to import this file into the database. For that action I use SQL Server Import and Export Wizard. I use Locale Czech and CodePage 1250. In the text file is the column in that format: 18152.65 - it is number with decimal point. When I use BCP utility for importing data, I use datatype decimal(10,2) and everything is OK. But when I try to use Import and Export Wizard, I choose for that column datatype numeric (DT_NUMERIC - precision 10, scale 2), the Import doesn't start and occurs the error:

- Executing (Error)

Messages

Error 0xc02020a1: Data Flow Task: Data conversion failed. The data conversion for column "PRED_CEL " returned status value 2 and status text "The value could not be converted because of a potential loss of data.".
(SQL Server Import and Export Wizard)

Is it always a precision of 10, and a scale of 2? You may have some inconsistent data. There's two things you could do.

1) Increase the precision and scale.

or

2) Create a custom SSIS package, and redirect the error rows to see where the data inconsistency is. The Import/Export Wizard is great for straight forward tasks, but you'll find that with the smallest blib you'll need to create a custom package.

|||The import is very picky about number formats when importing from flat files. It will NOT import zero padded numbers into a decimal field. Even though it will implicetly convert it internally.

For example:
3.99 - OK
003.99 - FAILS
+003.99 - OK
-003.00 - OK

If you import "003.99" into a varchar(12) and then update a decimal(10,2), with the value of teh varchar, it will work fine.

Problem with debugging SSIS 2005 (32bit) component under Windows Vista ultimate

Hi,

I have a problem when i want to debug an ssis component under visual studio 2005.

I'm using sql 2005 with service pack 2 and i have already install patch for visual studio under vista.

When i put a breakpoint for exemple in the method "public override void PreExecute()" or in the other method. "public override void ProcessInput(int inputID, PipelineBuffer buffer)" and i execute the pgm.

however when i begin debugging,it's always skip breakpoint

However when i put a break point in the Validate method "public override DTSValidationStatus Validate()" it function.

When execute the the package it works fine.

I use this debug parametres :

Start external program :

C:\Program Files\Microsoft SQL Server\90\DTS\Binn\DTExec.exe

Command line arguments

/FILE "D:\Projects\Integration Services Project1\Integration Services Project1\TestXmlParserPipe.dtsx" /MAXCONCURRENT " -1 " /CHECKPOINTING OFF /REPORTING EWCDI

I execute visual studio 2005 as Administrator

Please, can some one help me!

It must be some sort of those trivial problems. Are you sure the execution goes through those two methods? Try to check using some kind of checkpoint logging (i. e. MessageBox).

A few additional troubleshooting tips:

- Make sure you are building the debug version of your component.

- Check if the proper module gets loaded.

- Double-check the function signatures.

HTH.

|||

Hi,

thanks for your answer.

I'm sure, i'm was building the debug version.

I notice that if i put a messagebox in the script component and i run the package.

The message box appear, so i go to my ssis component code under visual studio2005 and then i put a breakpoint in

PreExecute() method (for example), after this i attached the process DtsDebugHost.exe (this process is visible in the process list only when the package ssis is running ). I came back to the message box i click ok and finally it work i can see the yellow line hilight the method.

What can i do to let de debugger work fine under vista ultimate? In my work, we have Windows XP professional and i don't have to use complicated procedure each time i want to debug my custom component.

so it will be so nice if some one know the solution for that.

Thanks in advance.

|||

Can you confirm one thing? Are you debugging your custom component using DTExec or BIDS?

Thanks,

Bob

|||

Hi,

I debug the my custom component using DTExec :

On Start action \start external program I use :

C:\Program Files\Microsoft SQL Server\90\DTS\Binn\DTExec.exe

I'm using the following command line arguments on start option:

/FILE "..\TestXmlParserPipe.dtsx" /MAXCONCURRENT " -1 " /CHECKPOINTING OFF /REPORTING EWCDI

Please help with Windows Vista Ultimate ?

|||

Always start investigating debugging/breakpoints problems by checking if VS finds the symbols for your assembly. Go to Modules window, find your assembly, check if the symbols are loaded. If not, try to load the symbols manually.

Do you install a custom component (run gacutil /if ...) as part of VS post-build step?

What often happens is that if you don't do this, VS would build a new version of the component before starting debugging session; but the binary used by DTEXEC comes from GAC and it is different from the new version build by VS, so VS can't match the symbols and can't use the breakpoints.

Problem with debugging SSIS 2005 (32bit) component under Windows Vista ultimate

Hi,

I have a problem when i want to debug an ssis component under visual studio 2005.

I'm using sql 2005 with service pack 2 and i have already install patch for visual studio under vista.

When i put a breakpoint for exemple in the method "public override void PreExecute()" or in the other method. "public override void ProcessInput(int inputID, PipelineBuffer buffer)" and i execute the pgm.

however when i begin debugging,it's always skip breakpoint

However when i put a break point in the Validate method "public override DTSValidationStatus Validate()" it function.

When execute the the package it works fine.

I use this debug parametres :

Start external program :

C:\Program Files\Microsoft SQL Server\90\DTS\Binn\DTExec.exe

Command line arguments

/FILE "D:\Projects\Integration Services Project1\Integration Services Project1\TestXmlParserPipe.dtsx" /MAXCONCURRENT " -1 " /CHECKPOINTING OFF /REPORTING EWCDI

I execute visual studio 2005 as Administrator

Please, can some one help me!

It must be some sort of those trivial problems. Are you sure the execution goes through those two methods? Try to check using some kind of checkpoint logging (i. e. MessageBox).

A few additional troubleshooting tips:

- Make sure you are building the debug version of your component.

- Check if the proper module gets loaded.

- Double-check the function signatures.

HTH.

|||

Hi,

thanks for your answer.

I'm sure, i'm was building the debug version.

I notice that if i put a messagebox in the script component and i run the package.

The message box appear, so i go to my ssis component code under visual studio2005 and then i put a breakpoint in

PreExecute() method (for example), after this i attached the process DtsDebugHost.exe (this process is visible in the process list only when the package ssis is running ). I came back to the message box i click ok and finally it work i can see the yellow line hilight the method.

What can i do to let de debugger work fine under vista ultimate? In my work, we have Windows XP professional and i don't have to use complicated procedure each time i want to debug my custom component.

so it will be so nice if some one know the solution for that.

Thanks in advance.

|||

Can you confirm one thing? Are you debugging your custom component using DTExec or BIDS?

Thanks,

Bob

|||

Hi,

I debug the my custom component using DTExec :

On Start action \start external program I use :

C:\Program Files\Microsoft SQL Server\90\DTS\Binn\DTExec.exe

I'm using the following command line arguments on start option:

/FILE "..\TestXmlParserPipe.dtsx" /MAXCONCURRENT " -1 " /CHECKPOINTING OFF /REPORTING EWCDI

Please help with Windows Vista Ultimate ?

Problem with debugging SSIS 2005 (32bit) component under Windows Vista ultimate

Hi,

I have a problem when i want to debug an ssis component under visual studio 2005.

I'm using sql 2005 with service pack 2 and i have already install patch for visual studio under vista.

When i put a breakpoint for exemple in the method "public override void PreExecute()" or in the other method. "public override void ProcessInput(int inputID, PipelineBuffer buffer)" and i execute the pgm.

however when i begin debugging,it's always skip breakpoint

However when i put a break point in the Validate method "public override DTSValidationStatus Validate()" it function.

When execute the the package it works fine.

I use this debug parametres :

Start external program :

C:\Program Files\Microsoft SQL Server\90\DTS\Binn\DTExec.exe

Command line arguments

/FILE "D:\Projects\Integration Services Project1\Integration Services Project1\TestXmlParserPipe.dtsx" /MAXCONCURRENT " -1 " /CHECKPOINTING OFF /REPORTING EWCDI

I execute visual studio 2005 as Administrator

Please, can some one help me!

It must be some sort of those trivial problems. Are you sure the execution goes through those two methods? Try to check using some kind of checkpoint logging (i. e. MessageBox).

A few additional troubleshooting tips:

- Make sure you are building the debug version of your component.

- Check if the proper module gets loaded.

- Double-check the function signatures.

HTH.

|||

Hi,

thanks for your answer.

I'm sure, i'm was building the debug version.

I notice that if i put a messagebox in the script component and i run the package.

The message box appear, so i go to my ssis component code under visual studio2005 and then i put a breakpoint in

PreExecute() method (for example), after this i attached the process DtsDebugHost.exe (this process is visible in the process list only when the package ssis is running ). I came back to the message box i click ok and finally it work i can see the yellow line hilight the method.

What can i do to let de debugger work fine under vista ultimate? In my work, we have Windows XP professional and i don't have to use complicated procedure each time i want to debug my custom component.

so it will be so nice if some one know the solution for that.

Thanks in advance.

|||

Can you confirm one thing? Are you debugging your custom component using DTExec or BIDS?

Thanks,

Bob

|||

Hi,

I debug the my custom component using DTExec :

On Start action \start external program I use :

C:\Program Files\Microsoft SQL Server\90\DTS\Binn\DTExec.exe

I'm using the following command line arguments on start option:

/FILE "..\TestXmlParserPipe.dtsx" /MAXCONCURRENT " -1 " /CHECKPOINTING OFF /REPORTING EWCDI

Please help with Windows Vista Ultimate ?

|||

Always start investigating debugging/breakpoints problems by checking if VS finds the symbols for your assembly. Go to Modules window, find your assembly, check if the symbols are loaded. If not, try to load the symbols manually.

Do you install a custom component (run gacutil /if ...) as part of VS post-build step?

What often happens is that if you don't do this, VS would build a new version of the component before starting debugging session; but the binary used by DTEXEC comes from GAC and it is different from the new version build by VS, so VS can't match the symbols and can't use the breakpoints.

Problem with debugging SSIS 2005 (32bit) component under Windows Vista ultimate

Hi,

I have a problem when i want to debug an ssis component under visual studio 2005.

I'm using sql 2005 with service pack 2 and i have already install patch for visual studio under vista.

When i put a breakpoint for exemple in the method "public override void PreExecute()" or in the other method. "public override void ProcessInput(int inputID, PipelineBuffer buffer)" and i execute the pgm.

however when i begin debugging,it's always skip breakpoint

However when i put a break point in the Validate method "public override DTSValidationStatus Validate()" it function.

When execute the the package it works fine.

I use this debug parametres :

Start external program :

C:\Program Files\Microsoft SQL Server\90\DTS\Binn\DTExec.exe

Command line arguments

/FILE "D:\Projects\Integration Services Project1\Integration Services Project1\TestXmlParserPipe.dtsx" /MAXCONCURRENT " -1 " /CHECKPOINTING OFF /REPORTING EWCDI

I execute visual studio 2005 as Administrator

Please, can some one help me!

It must be some sort of those trivial problems. Are you sure the execution goes through those two methods? Try to check using some kind of checkpoint logging (i. e. MessageBox).

A few additional troubleshooting tips:

- Make sure you are building the debug version of your component.

- Check if the proper module gets loaded.

- Double-check the function signatures.

HTH.

|||

Hi,

thanks for your answer.

I'm sure, i'm was building the debug version.

I notice that if i put a messagebox in the script component and i run the package.

The message box appear, so i go to my ssis component code under visual studio2005 and then i put a breakpoint in

PreExecute() method (for example), after this i attached the process DtsDebugHost.exe (this process is visible in the process list only when the package ssis is running ). I came back to the message box i click ok and finally it work i can see the yellow line hilight the method.

What can i do to let de debugger work fine under vista ultimate? In my work, we have Windows XP professional and i don't have to use complicated procedure each time i want to debug my custom component.

so it will be so nice if some one know the solution for that.

Thanks in advance.

|||

Can you confirm one thing? Are you debugging your custom component using DTExec or BIDS?

Thanks,

Bob

|||

Hi,

I debug the my custom component using DTExec :

On Start action \start external program I use :

C:\Program Files\Microsoft SQL Server\90\DTS\Binn\DTExec.exe

I'm using the following command line arguments on start option:

/FILE "..\TestXmlParserPipe.dtsx" /MAXCONCURRENT " -1 " /CHECKPOINTING OFF /REPORTING EWCDI

Please help with Windows Vista Ultimate ?

|||

Always start investigating debugging/breakpoints problems by checking if VS finds the symbols for your assembly. Go to Modules window, find your assembly, check if the symbols are loaded. If not, try to load the symbols manually.

Do you install a custom component (run gacutil /if ...) as part of VS post-build step?

What often happens is that if you don't do this, VS would build a new version of the component before starting debugging session; but the binary used by DTEXEC comes from GAC and it is different from the new version build by VS, so VS can't match the symbols and can't use the breakpoints.

Problem with deadocks

Hi list, iam very new to SQL. i have a developer that is making a very
complex query over a SQL2000 + SP3 database, with a lots of union queries.
He recieves this error:
Transaction (Process ID 97) was deadlocked on lock | communication buffer
resources with another process and has been chosen as the deadlock victim.
Rerun the transaction.
I dont know how to proceed with this, how can try to discover the problem?
Could be a resources problem?
Thanks for the advices...Aswers in microsoft.public.sqlserver.server
--
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"Tinchos" wrote:

> Hi list, iam very new to SQL. i have a developer that is making a very
> complex query over a SQL2000 + SP3 database, with a lots of union queries.
> He recieves this error:
> Transaction (Process ID 97) was deadlocked on lock | communication buffer
> resources with another process and has been chosen as the deadlock victim.
> Rerun the transaction.
> I dont know how to proceed with this, how can try to discover the problem?
> Could be a resources problem?
> Thanks for the advices...|||http://www.microsoft.com/communitie...80-e67d8812bd2d
AMB
"Tinchos" wrote:

> Hi list, iam very new to SQL. i have a developer that is making a very
> complex query over a SQL2000 + SP3 database, with a lots of union queries.
> He recieves this error:
> Transaction (Process ID 97) was deadlocked on lock | communication buffer
> resources with another process and has been chosen as the deadlock victim.
> Rerun the transaction.
> I dont know how to proceed with this, how can try to discover the problem?
> Could be a resources problem?
> Thanks for the advices...|||In your from statement use WITH (NOLOCKS) when you are selecting data.
Rick
"Tinchos" <Tinchos@.discussions.microsoft.com> wrote in message
news:B5CBFB12-BF8F-4BA8-B71A-8D9A893C66F6@.microsoft.com...
> Hi list, iam very new to SQL. i have a developer that is making a very
> complex query over a SQL2000 + SP3 database, with a lots of union queries.
> He recieves this error:
> Transaction (Process ID 97) was deadlocked on lock | communication buffer
> resources with another process and has been chosen as the deadlock victim.
> Rerun the transaction.
> I dont know how to proceed with this, how can try to discover the problem?
> Could be a resources problem?
> Thanks for the advices...

Problem with dead-locks

We are experiencing some problems with deadlocks in our system. We call
Sql server 2k from a .Net applicationlayer.
The flow is
Create transaction object in .Net
FOR each table in a list (e.g. 11 tables in total)
DELETE FROM Table WHERE SomeID IN (x,y) // SomeID is foreign key
(done in stored procedure with no cursors)
// END FOR
FOR each table in a list (same list af before, but in opposite sequence)
BULK INSERT MyTable ..
(SQL-statement created in .Net and sent to Sql svr)
// END FOR
transactionsobject.Commit();
We receive data from an external system once every w. The external
system cannot give os delta-information, e.g. only new data, s they send
us their entire data. This is the reason for why we delete all data in
our system and insert them again.
The problem occurs at BULK INSERT, but odly not always. The database in
question is offline for the rest of the system, so nothing takes place on
the server apart from this job. The transaction object is sent to the
server using Microsoft Practices Enterprise Library's data-block to
enable us to roll-back the transaction if one of the statements fail.
We are kind of blank with regards to how to solve this - do you guys have
an idea to a solution?
Thanks,
:o)
Jesper Stocholm
http://stocholm.dk
<a href="http://links.10026.com/?link=http://www.sony.com">evil</a>
Findes din kiosk p nettet? Se http://ekiosk.dkHave you followed the basic recommendations on deadlocks in Books Online?
Start here, if you haven't:
http://msdn.microsoft.com/library/d... />
a_3hdf.asp
Tracing deadlocks might also be much help:
http://msdn.microsoft.com/library/d...
tabse_5xrn.asp
ML|||I have two suggestions. (1) change the mechanism so that the deletes are
committed prior to starting the bulk inserts, or (2) generate a temporary
stored procedure or dynamic SQL to execute the entire job in a single batch,
complete with error handling, etc.
You could save off the rows your deleting into a separate database, and
reinsert them if a failure occurs during the bulk inserts.
My preference is to migrate transaction processing to the data tier whenever
possible. It's a lot easier to modify a stored procedure than to recompile
and redeploy a middle-tier component or God forbid, a client application.
"Jesper Stocholm" <j@.stocholm.invalid> wrote in message
news:Xns97105AA34EC40stocholmdk@.207.46.248.16...
> We are experiencing some problems with deadlocks in our system. We call
> Sql server 2k from a .Net applicationlayer.
> The flow is
> Create transaction object in .Net
> FOR each table in a list (e.g. 11 tables in total)
> DELETE FROM Table WHERE SomeID IN (x,y) // SomeID is foreign key
> (done in stored procedure with no cursors)
> // END FOR
> FOR each table in a list (same list af before, but in opposite sequence)
> BULK INSERT MyTable ..
> (SQL-statement created in .Net and sent to Sql svr)
> // END FOR
> transactionsobject.Commit();
> We receive data from an external system once every w. The external
> system cannot give os delta-information, e.g. only new data, s they send
> us their entire data. This is the reason for why we delete all data in
> our system and insert them again.
> The problem occurs at BULK INSERT, but odly not always. The database in
> question is offline for the rest of the system, so nothing takes place on
> the server apart from this job. The transaction object is sent to the
> server using Microsoft Practices Enterprise Library's data-block to
> enable us to roll-back the transaction if one of the statements fail.
> We are kind of blank with regards to how to solve this - do you guys have
> an idea to a solution?
> Thanks,
> :o)
> --
> Jesper Stocholm
> http://stocholm.dk
> <a href="http://links.10026.com/?link=http://www.sony.com">evil</a>
> Findes din kiosk p nettet? Se http://ekiosk.dk|||"Brian Selzer" <brian@.selzer-software.com> wrote in
news:epOZG6w6FHA.3416@.TK2MSFTNGP15.phx.gbl:

> I have two suggestions. (1) change the mechanism so that the deletes
> are committed prior to starting the bulk inserts, or (2) generate a
> temporary stored procedure or dynamic SQL to execute the entire job in
> a single batch, complete with error handling, etc.
I will look into this, thanks.

> My preference is to migrate transaction processing to the data tier
> whenever possible. It's a lot easier to modify a stored procedure
> than to recompile and redeploy a middle-tier component or God forbid,
> a client application.
We have since my first post moved the SQL to the database in a stored
procedure that creates some dynamic sql and executes it, so it is no longer
in the application layer. The problem, however, did not go away.
Also, we cannot do it all in the application layer. The entire process is a
ETL-process, where the data is (heavily) transformed before being loaded
into the (other) database. It is not possible to put some of the key parts
in the database-layer - for various purposes we need to do the
transformation in the application layer.
I talked to one of our DBAs, and he suggested that another benefit of
moving the sql to a stored procedure would be that it would complete the
current batch after each "GO"-statement at the end of executing the stored
procedure. We moved the SQL-code and the problem seems to have dissapeared
... for now at least. We are keeping our fingers crossed. If this works, we
are happy ... a bit nervous that we didn't find the cause of the error ...
but happy, none the less.
:o)
Jesper Stocholm
http://stocholm.dk
<a href="http://links.10026.com/?link=http://www.sony.com">evil</a>