显示标签为“particular”的博文。显示所有博文
显示标签为“particular”的博文。显示所有博文

2012年2月23日星期四

bcp and transaction problem

Hi,
We are creating a procedure in which we use bcp
(xp_cmdshell) to archive out the data for particular
month. When I execute procedure without begin tran/commit
tran it works fine and bcp out the data from table to hard
disk. But when i try to use transaction handling using
begin tran i see it to be waiting and dbcc inputbuffer of
waiting process shows:
SET FMTONLY ON select * from db..bcptable SET FMTONLY OFF
Why sql server is starting seperate process within
procedure ...IS there any special way to handle
transaction when using bcp and xp_cmdshell in the
procedure?
This is the only procedure running on machine.
Thanks
--harvinderharvinder,
> We are creating a procedure in which we use bcp
> (xp_cmdshell) to archive out the data for particular
> month. When I execute procedure without begin tran/commit
> tran it works fine and bcp out the data from table to hard
> disk. But when i try to use transaction handling using
> begin tran i see it to be waiting and dbcc inputbuffer of
> waiting process shows:
> SET FMTONLY ON select * from db..bcptable SET FMTONLY OFF
> Why sql server is starting seperate process within
> procedure ...IS there any special way to handle
> transaction when using bcp and xp_cmdshell in the
> procedure?
Bcp is running as a separate connection, not as a part of your
transaction. This is normal. It is being blocked by the connection
that opened the transaction. You cannot wrap a call to bcp in a
transaction.
Linda

2012年2月18日星期六

BCP & odd charachters

Hi

When I BCP out some data from a database that contains german charachters ( in particular characters with hyphens & unlatts on them ), the letter appears as a square box when I open it in a text file.

I run BCP locally on the server that the database is on.

Any ideas what might be causing this? I have the local Regional settings of the server set to German but still no joy.

Any ideas?

Help!!

JWhat happens when you BCP the data back into a database? Sometimes certain products that we use to view files can not display none printable characters to they write out the 'box'. It does not mean that data is incorrect. You should create another test table and BCP the data into the new test table.

2012年2月16日星期四

Batch Script

Hello everyone,

I have about 20 dtsx packages to run in a particular order.
Some create tables, other fill/convert data, and others just clean/remove temporary tables.

Everything works ok manually...
But, i need to run them automatically.

A batch script seems the quickest and more simple way to do...
So, I made a batch with something like this:

dtexec.exe file1.dtsx > output1.txt
dtexec.exe file2.dtsx > output2.txt
dtexec.exe file3.dtsx > output3.txt

(the ideia is to save the logs...)

My first question is...
I get a very usual "product level is insufficient" (0xC00470FE) error on some components...
It's wierd because manually works ok. But through the batch it returns lot's of these...
I searched for information and found this...
It's a nice topic, not enought to fix my problem.

My second question is...
A noob batch script question:
Can i make something like this:
dtexec.exe file1.dtsx > output1.txt
IF FIND /C /I "End Error" output1.txt != 0 GOTO EXITSCRIPT
The ideia is to search the log for errors, and if found any run other batch file...

Thank you so much for any help!!!

David

Have you thought about just creating a master package that runs your packages in the desired order? You have a lot more flexibility that way instead of batch files. Just my opinion.

2012年2月12日星期日

Basket Analysis

Hi,
Does anyone know of any good examples of cube construction
for basket analysis, I can't seem to find much of anything
on this particular type of analysis.
Ta
Paul
You might find some interesting material here:
http://www.ralphkimball.com/html/articles.html
Dave Wickert [MSFT]
dwickert@.online.microsoft.com
Program Manager
BI SystemsTeam
SQL BI Product Unit (Analysis Services)
This posting is provided "AS IS" with no warranties, and confers no rights.
"Paul" <anonymous@.discussions.microsoft.com> wrote in message
news:389501c4aeec$a2c634b0$a601280a@.phx.gbl...
> Hi,
> Does anyone know of any good examples of cube construction
> for basket analysis, I can't seem to find much of anything
> on this particular type of analysis.
> Ta
> Paul

Basket Analysis

Hi,
Does anyone know of any good examples of cube construction
for basket analysis, I can't seem to find much of anything
on this particular type of analysis.
Ta
PaulYou might find some interesting material here:
http://www.ralphkimball.com/html/articles.html
--
Dave Wickert [MSFT]
dwickert@.online.microsoft.com
Program Manager
BI SystemsTeam
SQL BI Product Unit (Analysis Services)
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Paul" <anonymous@.discussions.microsoft.com> wrote in message
news:389501c4aeec$a2c634b0$a601280a@.phx.gbl...
> Hi,
> Does anyone know of any good examples of cube construction
> for basket analysis, I can't seem to find much of anything
> on this particular type of analysis.
> Ta
> Paul