Redirection In FTP Would Not Work From ISQL..

Sep 21, 2000

Gurus,
For some reason the INPUT REDIRECTION of FTP commands from a file does not work when executed from a ISQL session.

"ftp -i -n host_name <serverstare_dirFTP-commands.dat >serverstare_dirFTP-errors.dat " would not work. It gives me an error message - "The handle could not be opened during redirection of handle 0 "

How ever it works from COMMAND prompt and BAT files.
I changed it use "-s:" option instead of INPUT REDIRECTION and it works just fine every where... The command I used is
"ftp -i -n -s:serverstare_dirFTP-commands.dat host_name >serverstare_dirFTP-errors.dat "

I still could not figure out why INPUT REDIRECTION would not work from ISQL only.

any ideas !!!!!!!!

Thanks,
- HemantH

View 2 Replies


ADVERTISEMENT

Cant Get ISQL To Work With Xp_cmdshell

Dec 30, 2002

I have copied a script from the web that allows me to run scripts from a file over multiple databases(have attached file). Now everything works fine on my local SQL server but when I try to run it on my web server I get this msg
''isql' is not recognized as an internal or external command, operable program or batch file.'

I have tried to use the full path to the isql.exe file but still get the msg

Thats about as much info I can provide, my understanding of this is very slight

View 5 Replies View Related

ISQL - Blank Line At The End Of The ISql Output File

Sep 23, 2005

Hi,I'm using isql to query data and output the same to a flat file.The isql has the following command options ' -h-1 -w500 -n -b -s"" '.In the SQL_CODE, the first two lines before the select statement areuse dbnameset nocount ongoWhen I run this, an additional blank line is put into the output file.Actually, there are two lines after the last result set in the outputfile. This file is being fed into another system and the blank line iscausing validation issues.How can I supress this blank line?This script is run from windows and the isql is called from a batscript.Batch script ...================================================== ========.....isql -Uuserid -Ppassword -Sserver -i"%SQL_CODE%" -h-1 -w500 -n -b -s""[color=blue][color=green]>>"%OUT_FILE%"[/color][/color]IF ERRORLEVEL 0 SET RC=0IF ERRORLEVEL 1 exit 4================================================== ========SQL code ...================================================== ========use punclaimset NOCOUNT ONGOselect * from XYZ;GO================================================== ========Your help is greatly appreciated.Yash

View 3 Replies View Related

Lookup Error Redirection

Sep 14, 2006

Hi,

I would like to know if the following is possible or if there is another way to implement this. I have a lookup transformation which i check to see if a specific record is stored. If nothing is returned i would like to insert a record into the table and then try the lookup again so that this time it will find the record and continue processing. How could i redirect the data flow to allow something like this to be done. I have tried linking the lookup failure constraint to an oledb destination and then attempted to link this back to the lookup but this has not worked.

Does anyone have any ideas on this?

Thanks in advance,

Grant

View 5 Replies View Related

Error Row Redirection...at Destination

May 1, 2008

I know how to setup the components to redirect error rows. Unfortunately, you can only redirect error rows coming through a transform. The only ones you can actually redirect going from a transform to a data destination are things like violations of a primary/foreign key. However, redirection does not work if you have a row come through a transform to a destination and the error is a constraint violation like trying to stick a null into a not null column. This simply makes the entire thing fail and shut down instead of redirecting just the row which failed.

This is the specific case. I have a really messed up inbound file. The file is pipe delimited and at least every row is the same length. I bring the file in and shove the entire file through a derived column task to explicitly calculate nulls since I can't get the convert data task to handle it and I didn't want to rewire the entire package. From there the data flows into my first conditional split where I look at the 4th column of data and split off the rows for a specific record type. These rows flow through a convert data task to do the data type conversion specific to that record type and then flow into an OLE DB destination adapter. The remaining rows flow down into a derived column transform to do some additional scrubbing for the remaining record types. From there, it flows into a conditional split to split the records out 16 ways based on the value in the 4th column, with anything not matching being dumped back to an error file for someone to look at. Each leg of the conditional split sends the row through a convert data task to convert the data to the data types specific to that given record type. I have error files setup for each of these off the convert data task which redirect any row that fails conversion. This redirects any row which doesn't convert properly. It also succeeds in redirecting any row which violates a primary or foreign key constraint. However, it does not handle those cases where the inbound file had a null when the column within the database does not allow a null. In those cases, the entire thing simply fails and then we have to grab the error and have someone page through thousands of lines of the input file to try to find the row which had a problem. What I really need to be able to do is configure the OLEDB Destination Adapter to redirect any rows which throw an error when they hit the database, unfortunately, you can't do this because a detsination adapater doesn't have any output (even though there is a place to configure errors with redirect being an option).

Does anyone have any ideas on how I can setup an error redirection to redirect ONLY those rows which are rejected, because the inbound file has a NULL where it shouldn't? Please don't tell me that I have to set something up to test every single column, because we are talking about over 2,000 columns which would need to be checked.

View 3 Replies View Related

Help. Serious Problem With Error Redirection

Apr 19, 2007

Hi,



I have a flat file source. In the flat file, there are some bad, i.e. incomplete rows.



I set up the flat file error output to send the bad rows to a file destination on both "error" and "truncation".



However, for some reason it's really buggy, and doesn't work correctly.



For example, if my data looks like this:



cat, whiskers, 10 -- good row

dog, spot, 15 -- good row

blah -- bad row

blah blah -- bad row

horse, flicka, 20 -- good row



It correctly sends "blah" & "blah blah" to the error output, but it ALSO sends "horse, flicka, 20" to the error output as well.



This is NOT what I want.



I have this particular scenario 5 times in the data file. And each and every time, it sends the first two bad rows PLUS the following GOOD row to the error output, so basically, I lose 5 good rows in the process.



Aside from writing a script to remove the bad rows, is there an explanation for this strange behavior?



Thanks much





View 11 Replies View Related

SQL Server Connection Redirection With VB6 Application.....!

Mar 20, 2008

I have VB6 application on several desktops connected to SERVER A (SQL Server 2005) in TESTING. I know I can change some registry values in VB6 application to connect it to SERVER B(SQL Server 20050 in PRODUCTION.
but it is work on each and every desktop.

Is there any way to do something on SQL Server 2005 Engine end (like Alias) so I don't have to make changes for SERVER Redirection in each and every Desktop machine(client), and Just I make change on SERVER Side.
any help or idea on that?
Thanks,

View 1 Replies View Related

Lookup Error Redirection Problem

Jun 21, 2007

Hi,

Maybe someone can assist me in solving the following error.
I created a facttable with surrogate keys. In the package that processes the fact data a lookup-task is supposed to find the appropriate dimension key.
If a certain dimension row is not found, this error is redirected.
In this errorflow a stored procedure will add the missing row in the dimensiontable, after which another lookup takes place. Then the results of both lookups are brought together in a union all task.

When I test this errorflow I notice that the missing dimension row is indeed added to the dimensiontable. The only task that turns red is the first lookup. Please refer below for the errormessages.
I understand the first one; that is why I created the redirection. But what does the rest mean? And even if I redirect the error for further processing is it still counted as a raised error? If the maximum allowed is 1 (as indicated) will the task still fail?

Any help will be greatly appreciated. Thanks in advance and regards,

Albert.


The errormessages are as follows:
Error: 0xC020901E at Xforms, lookups en wegschrijven, Lookup LosplaatsKey [5071]: Row yielded no match during lookup.
Error: 0xC0047072 at Xforms, lookups en wegschrijven, DTS.Pipeline: No object exists with the ID 5317.
Error: 0xC0047022 at Xforms, lookups en wegschrijven, DTS.Pipeline: SSIS Error Code DTS_E_PROCESSINPUTFAILED. The ProcessInput method on component "Lookup nwe losplaats" (5315) failed with error code 0xC0047072. The identified component returned an error from the ProcessInput method. The error is specific to the component, but the error is fatal and will cause the Data Flow task to stop running. There may be error messages posted before this with more information about the failure.
Error: 0xC0047021 at Xforms, lookups en wegschrijven, DTS.Pipeline: SSIS Error Code DTS_E_THREADFAILED. Thread "WorkThread1" has exited with error code 0xC0047072. There may be error messages posted before this with more information on why the thread has exited.
Error: 0xC0047039 at Xforms, lookups en wegschrijven, DTS.Pipeline: SSIS Error Code DTS_E_THREADCANCELLED. Thread "WorkThread2" received a shutdown signal and is terminating. The user requested a shutdown, or an error in another thread is causing the pipeline to shutdown. There may be error messages posted before this with more information on why the thread was cancelled.
Error: 0xC0047039 at Xforms, lookups en wegschrijven, DTS.Pipeline: SSIS Error Code DTS_E_THREADCANCELLED. Thread "WorkThread3" received a shutdown signal and is terminating. The user requested a shutdown, or an error in another thread is causing the pipeline to shutdown. There may be error messages posted before this with more information on why the thread was cancelled.
Error: 0xC0047021 at Xforms, lookups en wegschrijven, DTS.Pipeline: SSIS Error Code DTS_E_THREADFAILED. Thread "WorkThread2" has exited with error code 0xC0047039. There may be error messages posted before this with more information on why the thread has exited.
Error: 0xC0047021 at Xforms, lookups en wegschrijven, DTS.Pipeline: SSIS Error Code DTS_E_THREADFAILED. Thread "WorkThread3" has exited with error code 0xC0047039. There may be error messages posted before this with more information on why the thread has exited.
.
.
.
Task failed: Xforms, lookups en wegschrijven
Warning: 0x80019002 at FactRittenInit: SSIS Warning Code DTS_W_MAXIMUMERRORCOUNTREACHED. The Execution method succeeded, but the number of errors raised (8) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches the number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the errors.
SSIS package "FactRittenInit.dtsx" finished: Failure.

View 11 Replies View Related

Error Row Redirection DF Tasks Execute Without Any Errors

Aug 14, 2007

I have a simple Error row redirection (from an OLEDB Command) to redirect all rows in error to a Transform script and thereafter to a Flat file destination. This is via the red arrow (DF path) output from the OLEDB Command.

I don't understand why this leg executes even when there are no rows in error? Zero byte Flat Files get written out when there are no errors.

How come? Why would a path with a red arrow execute even when there are no errors?


Part 2
When I introduce some errors in the data to cause an integrity violation, and I hook up an OnError event handler, it is never raised even through the error rows are successfully redirected and written out to the Flat File destination.

So what consitutes an error for a Data Flow Task? Is an error raised by Sql Server for an integrity violation bubble up as an error in the SSIS package?

View 2 Replies View Related

Error Redirection - How To Supress File Creation?

Oct 16, 2007


Hi all!

I´ve having some issues with a package that I´m currently building.
The package is pretty much finished and doing what it´s supposed to,
just doing some testing to ensure everything is in order.

The package is pretty basic:
Read a fixed with text file, do a lookup on destination database table,
conditional split to determine what to insert and what to update, and that´s it!

At the source of my data flow I have the error output set to redirect all rows,
counting those rows, and finally writing them to a dynamically created file.

However, I just now realized that this file seems to be created ALWAYS,
regardless of rows actually being redirected or not. Everytime I run the package
with no rows being passed through the error output, I still end up with a
dynamically named, zero sized text file.

So my question: Is it possible to supress the creation of this file,
or do I have to add a file system component to my control flow,
deleting this file if my number of errorrows = 0 ?

Hope you can help!

Regards
Daniel

View 1 Replies View Related

Redirection Of Failed Rows To Error Table

Sep 29, 2006

Hi,

I know we can redirect a error to say an OLE DB Destination or textfile. Is there something we can do so that I can know seeing the error table the reason for which the row failed.

The Error table will look just similar to the destination table, but for one col which should hold the reason say 'Truncate error' etc...

Is this possible???

Thanks,

View 3 Replies View Related

Programmatically Configuring Error And Truncation Dispositions For Row Redirection

Mar 29, 2007

Hi,



I have created a SSIS package programmatically using C#.



The package should do the following take data from source A, and place rows into destination B, if there are any error rows then redirect the rows to destination C. In my package I have the following components:



DTSAdapter.OLEDBSource.1 - Used as the Source

DTSAdapter.OLEDBDestination.1 - Used for the Destination Output - (let me call this normalOutput)

DTSAdapter.OLEDBDestination.1 - Used for the Destination Error Output - (let me call this errorOutput)



All my mappings appear to be correct, I build and save the package and receive a Successful validation and Success on Execution.



However, When I open the application using the Execute Package Utility I get the warning:



Warning:No rows will be sent to the error output(s). Configure error or truncation dispositions to redirect rows to the error output(s), or delete data flow transformations or destinations that are attached to the error output(s)



How do I get around this?







I have placed on the DTSAdapter.OLEDBDestination.1 (Used for the Destination Output), on the input collection I have placed:



normalOutput.InputCollection[0].ErrorRowDisposition = DTSRowDisposition.RD_RedirectRow;

normalOutput.InputCollection[0].TruncationRowDisposition = DTSRowDisposition.RD_RedirectRow;

normalOutput.OutputCollection[0].ExclusionGroup = 1;



on the DTSAdapter.OLEDBDestination.1 (Used for the Destination Error Output) I have placed:

errorOutput.OutputCollection[0].ExclusionGroup = 1;



However this does not work, I just get the wanring displayed above.







I have also tried to set the

OutputCollection[0].SynchronousInputID for both the error output and the normal output to the same values

so that:

normalOutput.OutputCollection[0].SynchronousInputID = normalOutput.InputCollection[0].ID

errorOutput.OutputCollection[0].SynchronousInputID = normalOutput.InputCollection[0].ID



However, the above scenario does not pass the package validation, in the Execute Package Utiltity, I get the wanring mentioned above and also the error:

Error: The input "OLE DB Destination Input" (16) has an invalid error or truncation row disposition.







So my question is what are the correct configuration settings to have in this scenario?



Thanks





View 15 Replies View Related

Problems Using Error Row Redirection And Transactions In A Data Flow Task

Mar 22, 2007

I am having a problem getting error rows to redirect between an OLE DB Source and an OLE DB Destination when using transactions. Each time I turn on the transaction control I get an error stating:

"[OLE DB Destination [48]] Error: The input "OLE DB Destination Input" (61) cannot be set to redirect on error using a connection in a transaction."

I get the above Error when using MSDTC. I have the data flow inside of a Sequence Container with the transaction option set to REQUIRED and the Isolation Level set to Serializable. I have tried all the Isolation levels.

I have the error rows piped off to a seperate OLE DB Destination. I have also tried using native SQL transactions with Execute SQL tasks to BEGIN, COMMIT or ROLLBACK the transaction. This does not work either. It looks like it works properly when the data flow is successful but using profiler I can see SSIS opens up a seperate process for the BEGIN and then another one with the Data Flow task. When I intentionally fail the Data Flow the Rollback always fails. I made sure I had RetainSameConnection turned on for the Connection I was using.

I am speculating that the Data Flow does not know what to Rollback the actual rows that succeeded or the error rows that are getting piped off.

I am fairly stumped on this one so any help is appreciated.

Thanks

View 4 Replies View Related

ISQL

Oct 27, 2000

Hello,
how can i do to launch a .bat file that execute my procedures in whitch i populate a table that after must be send whith bcp command to a file??
Can you give me an example for that?What about ISQL??
Thanks

Massimo Nardi

View 2 Replies View Related

Isql

Jan 3, 2000

Does anyone use ISQL to run maintenance? I am trying to write a batch file that will log on to my server and dump a specifice tran log when triggered by a perfmon warning.

I can successfully log on to the server however the dump command does not seem to run? IS it possible to run a predefined task??

ANy assistance would be greatly appreciated,

Thanks
David

View 4 Replies View Related

Isql

Dec 16, 2002

When I am running an SQL query on a SQL server DB from ISQL the results are returning a space in front of every row, plus it is returning the number of rows effected at the bottom. When I run the query without ISQL the results come back without the space in front of every row, but it does come back with the number of rows effected. I need the spaces reomed and the number of rows removed. Here is an example of the ISQL.
ISQL.EXE /U????? /P?????? /n /d????? /h-1 /w 218 /S????? /i????? /o?????

Are ther any arguments to help remove the preceding space and the trailing footer?

Here is a copy of the SQL

select CONVERT(char(49),i.item_number),CONVERT(char(17),s um(s.actual_qty)),CONVERT(char(19),"WMS"),
CONVERT(char(2),DATEPART(month,GETDATE())) + '/' + CONVERT(char(2),DATEPART(day,GETDATE())) + '/' + CONVERT(char(4),DATEPART(year,GETDATE())) + CONVERT(char(109),''),
CONVERT(char(8),"01:00:00") from t_stored_item s, t_item_master i, t_location l
where i.c5 = 'FVM' and
i.item_number = s.item_number and
l.location_id = s.location_id and
l.location_id like 'V-%'
group by i.item_number
order by i.item_number

Thanks!

View 2 Replies View Related

Isql Help

May 4, 2004

Hello all, I'm new to the board...

I'm trying to run a script in isql with a file that contains create database statements and I'm completely lost. If someone could help me and point me in the right direction, please!

Thank you

View 5 Replies View Related

Isql

Jan 31, 2007

Hi,
I'm running isql from a dos batch file and the isql command is below:

%SQLPath%isql -U%DBUser% -P%DBPswd% -S%SQLServer% -d%Gatewaydb% -iBatchScriptsSQL_Get_Create_Batch.sql -oZ:mbox
ecsincreate_1.bat -w100 -s; -h

I want the rows from the SELECT statement in my ".sql" file to appear in the output file but what ends up being written to the file is this:

1> 2> 3> 4> 5> 6> 7> 8> 9> 10> 11> 12> 13> 14> 15> 16> 17> 18> 19> 20> 21> (14 rows affected)

Not sure what I'm doing wrong.
Thanks,
J


1>

View 9 Replies View Related

Isql Display

Aug 9, 2000

Hi,
When I execute a script by using isql, it displays the number of statement executed. can anybody tell me how to turn this off (no display)?
Thanks,

Mark

View 1 Replies View Related

ISQL --URGENT

Oct 3, 2000

Hi

I am running the Stored procedure from using ISQL like this and the stored procedure name is in the input file (c:empinp.txt)

c:>ISQL /S DB1 /U sa /P pass /d test_db /i c:empinp.txt

I want to write a Comment(say 'DONE' OR 'COMPLETED') into a OUTPUT FILE? after executing the stored procedure.

Is there a way to do it?

Thanks
VENU

View 1 Replies View Related

Pb Codepage Et ISQL

Aug 24, 2000

Bonjour,
J'execute un script en sql 7 qui lance isql qui crée un fichier texte en sortie. j'ai un souci, ce fichier de resultat a remplacer les lettres accentuées é è ...
par des virgules ,
Quelle est la solution ? Merci d'avance ...

View 1 Replies View Related

ISQL Shareware

Sep 2, 2000

I am looking for a shareware product I can use in place of ISQL. I am working with databases on a web site, and I want to be able to give different clients access to their data, without forcing them to go out and buy SQL Server.

Thanks,

Doug

View 1 Replies View Related

ISQL Utility

Aug 6, 2001

Hi,

All the wanted to know whether the ISQL utility is optional during the sqlserver setup??? Is it possible to install sql server without installing ISQL utility??

Thanks in advance,

Asha

View 1 Replies View Related

Osql / Isql

Jan 17, 2008

Is osql/isql supported in SQL 2005? How about in 2008? Thanks

View 2 Replies View Related

URGENT Isql Will Not Start

Jan 24, 2002

I'm running sql 6.5. trying to load lots of data. Rec msg that memory was low so I increased memory obvisouly too high. Now sql will not start. found all the documentation to start sql in single user mode however when trying to start isql to change to memory setting, isql would not start. The server is using named pipes. Message I receive is sql server is unavailable or does not exist.

You help would be greatly appreciated as this is a production environment and we are down.

thanks!!
darlene

View 2 Replies View Related

Passing Parameters In ISQL

Aug 30, 2001

Hi,

I would like to pass parameters from isql command line to an input query file. I am working on SQL Server 7.0. How can I accomplish this?

My eg. is like this:

> isql.exe (all the server options etc.,) /iInputfile /oOutput file
I need the output depend on the query given in the input file with the query depending on the parameter I supply on the command line.Thanks for your help in advance.

thanks,
Sravan.

View 1 Replies View Related

ISQL, Xp_cmdShell Question

Dec 27, 1999

Hi,

I have an input file which contains a simple select query. I want to output the results of the query to an output file. I use the following query:

DECLARE @sTemp1 Varchar(100)

SELECT @sTemp1 = "isql -d TestDB /U sa /P SAPassword -n /i C:QRYIn.txt > C:QRYOut.txt"

EXEC master..xp_cmdshell @sTemp1

The problem is that this query looks for the C: drive on the SERVER not on my local machine. C:QRYIn.txt exists on my machine so this does not work. However if I create a C:QRY folder on the SERVER the whole thing works.

Basically I want this query to go to execute the In.txt query from my local machine as opposed to the SERVER.

View 1 Replies View Related

Calling A BAT File With ISQL ?

Sep 26, 1999

I am writing a trigger that I want to call a BAT file when there is an insert or update to a paricular table, but don't know the code to that will execute my BAT file.

To reitrate, when a row is inserted, I want to automatically start a particular EXE that our developers created to process rows written into this table.

My BAT that currently runs OK from the Command line is : CBBOP.BAT
-----------------
@echo
"d:program filescabs2000CBBOP.exe" /cabsit /password 2,2,time
-----------------

But what I need to know is the SQL that will run my CBBOP.BAT, and I will code it into my trigger.

Cheers
Brett

View 1 Replies View Related

ISQL Output To A File...

Jul 25, 2002

SQL 6.5

I am doing a ISQL join on 4 tables that creates a few million record output. This causes some memory grief on my laptop. How do I have my query output to my c: drive??

Thnaks in advance.

Ray

View 1 Replies View Related

ISQL.EXE Hangs During Installation

Mar 8, 1999

ISQL.EXE hangs during installation. In task manager, when I end task on ISQL.EXE the installation continues, but msdb comes up suspect. Can someone please help me.

View 2 Replies View Related

Help! ISQL And DOS Batch Files

Aug 13, 2004

Hi all,

Can anyone help me?? I'm just a newb :D

Please consider the following:

I need to be able to query a db on server A, in a batch file, return the result (DateTime value) into a variable, and then use that date as a parameter in a query that I will query on server b.

I have the following code:

isql -E -d firstDB -S ServerA -Q "select max(load_date) from mydates"

How would I pipe the results of the above query into a variable???

I cannot create a linked server between the two servers. (Permissions)

Thanks in advance!

View 7 Replies View Related

Isql Error Message

Jul 23, 2005

Hi,I have created a database as pubs.qa and wrote a command utility toquery a table.isql -S server -E -d pubs.qa -i qry.sql -b -ncontents of qry.sqlselect * from usersgowhen i run this command, error messageMsg 911, Level 16, State 1, Server XXXXXXX, Line 1Could not locate entry in sysdatabases for database 'pubs'. No entryfound with that name. Make sure that the name is entered correctly.However, I am able to use this database in Query Analyzer and executethe query.I am just wondering if the database name with '.' is the problem...Any pointers to proceed further.Thanks in advance-Anu

View 3 Replies View Related

ISQL Call Problem

Aug 13, 2005

Hello everyone!I have the following problem. I`ve opened a Query Analyser and write thestatement:-isql -S 'PL6XXXX' -i 'd:SQL_Server_2000Raport_WWW.sql'I got the following erorr message:Incorrect syntax near -SHow to call the statement which is placed inside the 'Raport_WWW.sql'file, which is located on folder D:SQL_Server_2000??? Do I have to doit in the cmd panel???Thank you in advance for your helpMarcin from Poland*** Sent via Developersdex http://www.developersdex.com ***

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved