SQLCMD in PDW Error

Hi,
I'm using SQLCMD in PDW for extracting data into a flat file. The command line syntax is given below:
sqlcmd -S "10.20.30.40,19001" -d MyPDW_DB -U PDW_User -P Password1 -Q "SET QUOTED_IDENTIFIER ON; SELECT * FROM MyPDW_DB.dbo.SampleFact" -o "FactOut.txt" -s"|"
When I try to execute the batch file, I get the following error:
Msg 104409, Level 16, State 1, Server PdwTdsServer, Line 1
Setting QuotedIdentifier to 'OFF' is not supported.
I am assuming this is due to the fact that there is a "comma" in the server name (IP address,Port Number). I can use this command for extracting data from SQL tables. Any idea on how I can make this working for PDW?
Thanks in advance

Hi Triumph,
Here is the complete solution you have asked.
sqlcmd -S "10.20.30.40,19001" -d MyPDW_DB -U PDW_User -P Password1 -I -Q "set nocount on;SELECT * FROM MyPDW_DB.dbo.SampleFact" -o "Output_Temp.txt" -s"|" -Wtype Output_Temp.txt | findstr /v \-\- > SampleFact.txt
del Output_Temp.txt
As
Katherine suggested please mark it as answer which will help other forum members who have the
similar issues.

Similar Messages

  • Failed to initialize sqlcmd library with error number -2147024809

    I have searched around but cannot find an answer to this so any help is appreciated.  I have a 2014 server with dual instances.  When I execute the following query , it succeeds on one instance but fails on the other with the above error. 
    This is not related to SQL Agent, this fails on query execution within SSMS as well (on instance 2, succeeds on instance 1).  Names have been changed to generic below.  I have tried with/without various options in the call, nothing seems to work
    on instance 2, but works fine on instance 1.  IF I remove the @query parameter, I DO receive the email.
    EXEC msdb.dbo.sp_send_dbmail
    @profile_name
    = 'Profile1',
    @recipients = 'recipientlist',   
    @subject = 'Error in rules-PLEASE INVESTIGATE-',
    @body = 'There is an error in rules, a rule calls itself. 
    Please fix.  The broken rule id is:',
    @query= 'select fields 
    from table WHERE [RuleOnSuccess] = [RuleID] OR [RuleOnFailure] 
    = [RuleID] ',
        @attach_query_result_as_file
    = 0;

    Hi, are you running this as a SQL Server Agent Job, if you are is the profile name you have specified in the script above the same default profile for Database Mail for SQL Server Agent? If it isn't then alter your profile name to the same one as the default.
    IS SQL Server Agent configured to use SQL Mail as well?  If it is try turning this off.
    Please click "Mark As Answer" if my post helped. Tony C.

  • Failed to initialize sqlcmd library with error number -2147467259

    I'm trying to get SQL Server to send an email.  The test email works fine; basically DBMail works properly.  The thing is, if a human runs it, everything is fine.  If I schedule it using Sql Server Agent Job, nothing works.  I think this
    has something to do with a proxy, or some such thing. Any thoughts on what could be wrong?
    As I know, the security features are much different than those from earlier versions.
    I'm using SQL Server Developer Edition 2014.
    Knowledge is the only thing that I can give you, and still retain, and we are both better off for it.

    That is correct.
    The problem with the SQL Agent is that it runs under an account which does not have the same privileges than the user using the SQL Server Management Studio (usually a Windows Administrator or a user with higher privileges).
    You can change the User account of the SQL Server Using the SQL Server Configuration Manager and you can use proxies to run jobs with more privileges.
    You can use this link to learn more abouth SQL Server Proxies
    http://www.mssqltips.com/sqlservertip/2163/running-a-ssis-package-from-sql-server-agent-using-a-proxy-account/
    MVP MCT MCTS Daniel Calbimonte
    http://elpaladintecnologico.blogspot.com

  • Trying to Email Results of Two Queries

    I have this SQL, which works perfectly fine.
    Insert Into #EL(LogDate, ProcessInfo, Text)
    EXEC xp_ReadErrorLog 1, 1
    Select distinct Text From  #EL
    Where Text like '%CLIENT:%'
    select distinct '[' + F.Item
    from #EL T
    CROSS APPLY dbo.fnSplit(T.Text, '[') F
    Where Item like '%CLIENT:%'
    I'm calling a function to split text, and maybe that's preventing the email from working.  Not sure.
    If I try to wrap it (just the first part...starting simple...)
    declare @query nvarchar(max)
    set @query =
    N'Insert Into #EL(LogDate, ProcessInfo, Text)'+
    N'EXEC xp_ReadErrorLog 0, 1'+
    N'Select distinct Text From  #EL'+
    N'Where Text like ''%CLIENT:%'''
    EXEC msdb.dbo.sp_send_dbmail
    @recipients = '[email protected]',
    @subject = 'Report',
    @query = @query
    I keep getting this error.
    Failed to initialize sqlcmd library with error number -2147467259.
    I know the database mail is setup and configured fine.  That's not the problem.
    I did some research and found this.
    http://support2.microsoft.com/kb/926642/en-us
    I followed the steps, and restarted the machine, but that didn't fix the problem.  Any idea what's wrong?  Or, can someone suggest another way to email the two tables to myself.
    Knowledge is the only thing that I can give you, and still retain, and we are both better off for it.

    Hi,
    I would suggest you to try to send simple mail using msdb.dbo.sp_send_dbmail just to make sure your
    DBMail works properly, additionally try to add @profile_name  parameter
    to msdb.dbo.sp_send_dbmail which is missing in your above SQL.
    Please mark solved if I've answered your question, vote for it as helpful to help other users find a solution quicker
    Praveen Dsa | MCITP - Database Administrator 2008 |
    My Blog | My Page

  • Using SQLCMD need to SET NOCOUNT OFF for Sql Server Parallel Data warehouse (PDW) V2

    Using SQLCMD to copy data to a flat file that is imported into Oracle using SQL Loader.
    At the bottom of the files created by SQLCMD there’s a blank row (ALL NULLs) and then there’s a row that shows the total number of rows, e.g., (12571 rows affected).
    SQL Loader allows us to remove headers (SKIP = 2), but it does not allow us to skip trailing records. Using the WHEN TABLE_ID != BLANKS command I can remove the blank row above the count marker, but SQLLDR still tries to load the count marker into the first
    column, which fails the import.
    When using SET NOCOUNT in the PDW I receive the error ‘NoCount is not a recognized option’.
    Any suggestions on how to get around this and remove the trailing count?

    Hi Waldropj,
    Thank you for your question. I am trying to involve someone more familiar with this topic for a further look at this issue. Sometime delay might be expected from the job transferring. Your patience is greatly appreciated. 
    Thank you for your understanding and support.
    If you have any feedback on our support, please click
    here.
    Elvis Long
    TechNet Community Support

  • SQLCMD throwing error with multi-line queries

    I get the error "Unclosed quotation mark after the character string..." when I pass multi-line queries to SQLCMD via a SQL Agent Job.  For example, the following command fails:
    SQLCMD -E -S MyServerName -Q "PRINT 'Hello';
    PRINT 'World';" -b
    SQLCMD seems to be only processing the first line, ignoring that there is more to the query.  The actual error in this case is:
    Msg 105, Level 15, State 1, Server MyServerName, Line 1
    Unclosed quotation mark after the character string 'PRINT 'Hello';\n '.
    Msg 102, Level 15, State 1, Server MyServerName, Line 1
    Incorrect syntax near 'PRINT 'HELLO';\n'.
    Where "\n" is actually an unprintable character for the line terminator.
    What am I doing something wrong for passing multi-line statements to SQLCMD?

    Hi Brandon,
    You can use sqlcmd to run a Transact-SQL script file. A Transact-SQL script file is a text file that can contain a combination of Transact-SQL statements, sqlcmd commands, and scripting variables.
    To create a simple Transact-SQL script file by using Notepad and save the file as myScript.sql in the C drive.
    To run the script file
    1. Open a command prompt window.
    2. In the Command Prompt window, type: sqlcmd -S myServer\instanceName -i C:\myScript.sql
    3. Press ENTER.
    TechNet
    Subscriber Support
    If you are TechNet Subscription user and have any feedback on our support quality, please send
    your feedback here.
    Thanks,
    Maggie
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. This can be beneficial to other community members reading the thread.

  • How to run a large script from sqlcmd and continue despite errors

    I am on SQL Server 2008 R2.
    I have  a large sql file (4 GB size) which has various insert  statements created by genarate script of SQL Server 2008, i.e, generate script facility to create insert satements for data of all the tables in a database.
    Now I am loading this data in another database, so I use a command like:
    sqlcmd -S "10.37.59.6"  -d  JnJ_Version1   -U admin_dtyler10 -P xxxxxxx  -i "D:\stage\JnJ-Version1\Data.sql" -o D:\stage\JnJ-Version1\idatasql.out -V 17
    This command is run from a task scheduler and after 3 hours task comepletes and the
    idatasql.out  contains following error message:
    Msg 102, Level 15, State 1, Server AMAZONA-658CHN2, Line 42
    Incorrect syntax near ')'.
    Before this message there were lot of success messages such as:
    (1 rows affected)
    Processed 1299500 total records
    (1 rows affected)
    Processed 1299600 total records
    (1 rows affected)
    Processed 1299700 total records
    (1 rows affected)
    Processed 1299800 total records
    1. Now how do I troubleshoot this error message, my file is so big...
    2. Also how sqlcmd handles errors, I know there are many insert satements followed by GO, so
    I aussme if there wer errors that GO transaction will fail, but it will continue with next insert satement after GO ,  is that correct If not, how can I make it contnue despite errors.
    I did not see any option in sqlcmd to do that.
    3. Also what does -V17 in Sqlcmd do. I had copied it from somewhere on internet.

    1. Now how do I troubleshoot this error message, my file is so big...
    Finding the error in a 4GB is certainly a challenge. The easiest is probably to write your own C# program that parses out the batches and submits them - and spews out the bat ones.
    2. Also how sqlcmd handles errors, I know there are many insert satements followed by GO, so
    I aussme if there wer errors that GO transaction will fail, but it will continue with next insert satement after GO ,  is that correct If not, how can I make it contnue despite errors.
    Yes, SQLCMD will continue with the next batch, unless the error was raised with state 127. But see below.
    3. Also what does -V17 in Sqlcmd do. I had copied it from somewhere on internet.
    I did SQLCMD -? and I see that -V is related to severitylevel. It may mean that SQLCMD will exit if the severity level is >= 17. But I would recommend that you look up SQLCMD in Books Online yourself to verify. (Yes, I am too lazy to do it myself this
    time.)
    Erland Sommarskog, SQL Server MVP, [email protected]

  • PDW-HD1500 - Final Cut Pro export to Sony XDCAM error

    I have a sequence in Final Cut Pro with XDCAM HD422 1080i50. When I try to export going via the "File > Export > Sony XDCAM" menu, choose "XDCAM HD422 1080i50 CBR" and hit the "Export" button.
    On a 5 minute clip, I get this error message after 8% of exporting. In the system.log in Mac OS X there is a "write error 138" reported by the XDCAM exporter.
    If I set an out point to reduce the in-point to just 5 secons, the export is successful. If I try 1 minute, the export fails. If I check "recompress all frames" and export the 1 minute clip, the export is successful.
    Waiting for Final Cut Pro to recompress all frames takes too long on a new MacBook Pro 17-inch. 1 minute takes about 4 minutes to recompress.
    I am running Mac OS X 10.5.8, Final Cut Pro 6.0.4, QuickTime 7.6.4, XDCAM Transfer 2.11, and firmware version 1.51 on the PDW-HD1500.
    I have set the audio outputs of my sequence to 8 tracks dual mono discrete, and set each audio track to go 1-1, 2-2, 3-3, 4-4 and so on. The video settings are XDCAM HD422 1080i50 50Mb.
    I have checked that the settings on the PDW-HD1500 is set to HD422, 50i, 8ch 24-bit. Are there any other settings I might have overlooked?
    Any suggestions? I would really appreciate some help.

    I've had experience wiith using 7toX and never had that message. Have you tried contacting the developer? My guess is they would be responsive.
    Russ

  • Error on restore a database using sqlcmd

    Hi
    I wrote a command to to restore a database (from SQL server backup tool) , it works for a few restore files but faild with a specific bak file.
    The error:
    sqlcmd  -U sa -P password -Q "RESTORE DATABASE TfsWorkItemTracking FROM DISK='x:\tfs\TfsWorkItemTracking.bak' WITH  FILE = 1,
     MOVE N'TfsWorkItemTracking' TO N'D:\SQL_Data\Data\TfsWorkItemTracking.mdf',  MOVE N'TfsWorkItemTracking_log' TO N'L:\SQL_Data\Log\TfsWorkIt
    emTracking_log.ldf',  NOUNLOAD,  REPLACE,  STATS = 100"
    Msg 3634, Level 16, State 1, Server SRVRND-TFSDB10, Line 1
    The operating system returned the error '3(failed to retrieve text for this error. Reason: 15105)' while attempting 'CreateFile' on 'C:\Prog
    ram Files\Microsoft SQL Server\MSSQL.1\MSSQL\FTData\TeamFoundationServer10FullTextCatalog\SQL.HDR'.
    Msg 3013, Level 16, State 1, Server SRVRND-TFSDB10, Line 1
    RESTORE DATABASE is terminating abnormally.
    I understood from the error that it is an access error - BUT the path the process try to create the file is not exist at all.
    One more issue - when I use the SQL Management consle to restore the database it works propery.
    Any idea ?
    CM Consultant

    Hello Jason, OP and future readers,
    The issue here is not what Jason suggested, but was caused by the fact that this database (TfsWorkItemTracking) is a part of Team Foundation Server, and has embedded in it a third item (for Full Text Search queries) that also needs its own MOVE TO clause.
    Here is a suitable SQLCMD query that will do what the OP needed:
    sqlcmd -U sa -P password -Q "RESTORE DATABASE [TfsWorkItemTracking] FROM  DISK = ’x:\tfs\TfsWorkItemTracking.bak’ WITH  FILE = 1, 
    MOVE N’TfsWorkItemTracking’ TO N’D:\SQL_Data\Data\TfsWorkItemTracking.mdf’, 
    MOVE N’TfsWorkItemTracking_log’ TO ’L:\SQL_Data\Log\TfsWorkItemTracking.LDF’, 
    MOVE N’sysft_TeamFoundationServer10FullTextCatalog’ TO N’D:\SQL_Data\Data\TfsWorkItemTracking.TeamFoundationServer10FullTextCatalog’, 
    NOUNLOAD,  STATS = 100"
    The original poster was missing that third "MOVE TO" clause, and SQL Server didn't know what to do with the Full Text metadata in this backup.  Note that this object is referenced in the error message, and note that it is attempting
    to create this file on the C:, which is the original location of the file when the backup was made, hence leading to the solution.
    It is a certainty that the OP ran into this while attempting to migrate from Team Foundation Server 2008 to new hardware and a newer version of SQL and TFS, as this is a common hiccough in the process that isn't well documented.  (The majority of the
    instructions just say "back up the databases, then restore them to the new SQL server...)
    Jeff Woods
    STI Computer Services, Inc.
    Eagleville, PA

  • Sqlcmd: Error: Microsoft SQL Server Native Client 10.0

    Hi All .need help ..
    When I am running this from cmd on my sql 2008 database server:
    sqlcmd -U sa -S mymachinen_name\MSSQLSERVER   ,   MSSQLSERVER is my instance name ,
    I get prompt for password and after that I get this:
    Password: HResult 0x57, Level 16, State 1
    SQL Server Network Interfaces: Connection string is not valid [87].
    Sqlcmd: Error: Microsoft SQL Server Native Client 10.0 : A network-related or in
    stance-specific error has occurred while establishing a connection to SQL Server
    . Server is not found or not accessible. Check if instance name is correct and i
    f SQL Server is configured to allow remote connections. For more information see
     SQL Server Books Online..
    Sqlcmd: Error: Microsoft SQL Server Native Client 10.0 : Login timeout expired.
    I have my sqserver browser service started and also I can login through managemnet studio with windows authentication.
    Also found this :
    http://support.microsoft.com/kb/905618  , but this is for MS Server 2005/2000.
    Can you guys please help me.
    Regards

    Hello,
    Try the following commands from your computer and
    from the local server:
    SQLCMD -E -S mymachinen_name\MSSQLSERVER
    SQLCMD -E -S mymachinen_name
    Use SQL Server Management Studio and connect
    to the SQL server with the SA account
    and password. If this does not work,
    your SA account is disabled or the SQL
    server is configured for Windows authentication.
    If MSSQLSERVER is the default instance
    of your SQL Server, do not use it in your
    command line SQLCMD
    Check on your SQL server
    remote connections are enabled
    If you are using TCP / IP, add an inbound
    TCP exception in the firewall of your SQL
    server on port used by your SQL Server instance
    + an inbound UDP 1434
    exception for the SQL Server Browser service
    Regards
    Charlie Dancoisne - Independent Consultant & Trainer (Please take a moment to "Vote as Helpful" and/or "Mark as Answer", where applicable. This helps the community, keeps the forums tidy, and recognises useful contributions. Thanks!)

  • Invoke-sqlcmd parameter error

    I'm trying to pass semicolan separated value as single parameter to Invoke-SQLCMD via powershell and it throwing "Invoke-Sqlcmd : The format used to define the new variable for Invoke-Sqlcmd cmdlet is invalid. Please use the "var=val
    ue" format for defining a new variable.
    At line:1 char:14" error.
    $conditions = "qrytype = summary;test_id = 562;"Invoke-Sqlcmd -Variable $conditions -ServerInstance "MyInstanse" -Database "testdb" -InputFile "C:\Queue1.sql"
    Could anyone let me know, how do I pass semicolan separated value as single parameter?

    Start by notplacingquotes around everything and don't catenate lines which makes thecode confusing to you.
    $conditions = @("qrytype='summary'",'test_id=562')
    Invoke-Sqlcmd -Variable $conditions -ServerInstance MyInstanse -Database testdb -InputFile C:\Queue1.sql
    See help for SQlCmd to understand how to use it.  Look closely at all of teh examples.
    ¯\_(ツ)_/¯

  • Premiere CC v7.2 "generic import error" Sony xdcam 422 50mb / PDW F800

    I'm receiving a "generic import error" when attempting to import Sony XDCAM footage in to Premiere Pro CC v7.2.0 (PC). The footage is in the original file structure transferred from a Sony XDCAM disc. The format is 1920x1080p, 29.97, 50mbps mpeg-2 long GOP (CBR). Shot with a Sony PDW F800 camera. It opens and plays fine with the Sony XDCAM viewer. I've tried importing the entire folder structure from PP media browser with no success. Not getting any thumbnails or previews from the files. PP will import the proxy files (mxf/mp4) but not the mpeg-2 HD media. Any insight on this issue would be greatly appreciated.

    Hey Wil, got this figured out quite painlessly considering the train wreck that it was to begin with. The material consisted of 4 mxf discs all with sequentially numbered duplicate filenames from disc to disc… cameramen love to torture editors. Simply renaming the clips using the OS would not work so here’s what I did. Starting with Bridge I identified the HD material apart from the 8 audio files and 1 proxy file per clip by performing a file search using the letter (V), only the HD video material has a (V) in the filename. Next I copied only the video files to a work folder as to not alter the original disc structure, I did this for each mxf disc. Next critical step was to turn off all metadata logging in Bridge except the filename metadata, then I used the batch renaming function with 3 criteria: 1-seed each filename with the disc number, 2- retain original clip name, and 3-rename extension to mpg. I did this for each disc. Next step was to batch encode using AME. I processed each disc using the same codec as the original source material, MXF/OP1a, Sony XDCAM 50mb with smart rendering codec enabled. My system ripped through this process at amazing speed, it retained the original source clip time code and the quality appears to be unaltered from the original. The reason for turning off the metadata logging in Bridge was to strip off the mxf reference, AME would not process the files by simply renaming them using the OS. Total time to clean-up train wreck; 40 minutes.
    BTW: I did not need the associated audio from these clips otherwise there would have been an extra step involved using premiere’s nesting feature as you had mentioned.
    Happy Holidays.

  • Executing multiple scripts using sqlcmd utility and halt execution on error

    Hello Everyone,
    This is a kind of urgent. I'm stuck with this from last couple of days and had a bad weekend due to this.
    Any help on this topic will be appreciated.
    I'm running through an issue in which I am executing 214 sql scripts in a folder using
    sqlcmd -S %Server% -E -d Employee2K6 -b -i "!dir!!file" -b -r1 1>NUL 2>"%logs%\!file!.log"
    I'm able to generate the logs as well.  I'm not able to stop the execution on error.
    Can anybody tell me how to stop the subsequent scripts execution if any of the scripts fails?
    Many Thanks!
    Kusum 

    Hi Visakh,
    Thanks for the reply. 
    I think I didn't put together my question correctly here. 
    Here's some more information for you.
    I'm executing the below mentioned command in a batchfile.
    sqlcmd -S %Server% -E -d Employee2K6 -b -i "!dir!!file" -b -r1 1>NUL 2>"%logs%\!file!.log"
    the !dir!!file here brings the folder that contains 214 scripts. I want the script execution to halt whenever a script
    fails.
    Right now all the scripts are getting executed and if some of them fails it generates the logs as well.
    I checked sqlcmd commands to halt execution on error. The msdn has it has -b but that's not working for me.
    Any help on this is highly appreciated.
    Thanks!

  • Error message: "Unable to open the physical file" when trying to attach AdventureWorks database

    I have searched the internet and this forum and have not found an answer...
    I am trying to install the AdventureWorks database into my single instance of MS SQL Server Express 2005.  I am logged into my machine as an administrator and logged into SQL Server 2005 express 'sa'.  I attempt to run the following script:
    exec sp_attach_db @dbname = N'AdventureWorks',
    @filename1 = N'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\AdventureWorks_Data.mdf',
    @filename2 = N'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\AdventureWorks_log.ldf'
    The error message I get back is:
    Msg 5120, Level 16, State 101, Line 1
    Unable to open the physical file "C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\AdventureWorks_Data.mdf". Operating system error 5: "5(Access is denied.)".
    The folder "C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data" and all the files in it are read-write.  I am 100.0000% certain the files "C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\AdventureWorks_Data.mdf" and "C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\AdventureWorks_Log.ldf" exist!  They are the result of running the installation program AdventureWorksDB.msi, which I downloaded from: http://www.codeplex.com/MSFTDBProdSamples/Release/ProjectReleases.aspx?ReleaseId=4004.
    What do I have to do to install the AdventureWorkds database????

    Hello,
    To try to help you, please, could you give some more informations ?
    - the operating system (XP/Vista), the edition ( Pro/Home...) and the service pack
    - usually, the installer installs the both files in C:\Program Files\Microsoft Sql Server\Samples. Is there any change in the location or have you moved the both files ?
    - could you check with the files explorer , that the 2 files are read-write and not read only( find one file, right-click on it, properties and in the 1st tabpage, you should see a checkbox read-only ( if checked , unchecke it ) ?
    - have you Sql Server Management Studio Express Edition ( at least SP1 ) ?
    If no, download it and use it to attach
    in the object explorer,
    click on your instance to expand it
    right click on databases
    in the contextual menu, click on attach
    in the new form,click on add
    you arrive on a second form : find your file , click on it, and OK
    it's the simplest way to attach ( the sp_-attach_db is complicated to type )
    the error messages are sometimes more clear in SSMSEE than in Sqlcmd
    Try also to attach ( thru SSMSEE or Sqlcmd but in using the windows authentification )
    NB: i hope that you are not trying to attach AdventureWorks on a remote instance and on a remote computer ( it would explain access denied )
    We are waiting for your feedback to try to help you more efficiently
    Have a nice day

  • Error updating a CLOB XML fragment

    Hi,
    I have an xml schema that contains an element of type xs:anyType that has been mapped to Oracle as CLOB.
    Now I have the needs to update this value but I was not able to do it.
    The code that does the update is the following:
    public void updateXML(String sqlCmd, String XMLString) throws Exception
    DataSource ds = null;
    Connection conn = null;
    OraclePreparedStatement stmt = null;
    oracle.sql.CLOB tempCLOB = null;
    Writer tempCLOBWriter= null;
    try
    //Get Data Source
    ds = (DataSource) new InitialContext().lookup(xmlDS);
    // Get Connection
    conn = ds.getConnection();
    // Prepare statement with requested insert, update or delete statement
    stmt = (OraclePreparedStatement) ((OracleConnection) conn).prepareStatement(sqlCmd);
    // Build CLOB containing XML if required
    if (XMLString != null)
    tempCLOB = oracle.sql.CLOB.createTemporary
    ( ((WLConnection)conn).getVendorConnection(),
    true,
    CLOB.DURATION_SESSION);
    try {
    tempCLOB.open(CLOB.MODE_READWRITE);
    tempCLOBWriter = tempCLOB.getCharacterOutputStream();
    tempCLOBWriter.write(XMLString);
    tempCLOBWriter.flush();
    } finally {
    if (tempCLOBWriter != null)
    tempCLOBWriter.close();
    //Set parameter on Prepared Statement
    stmt.setCLOB(1,tempCLOB);
    // Execute command
    stmt.executeUpdate();
    // Clean up CLOB data if required
    if (XMLString != null)
    tempCLOB.freeTemporary();
    // Return connection to the pool
    conn.close();
    catch ( Exception e)
    if (conn != null)
    conn.close();
    throw e;
    IF the sqlCmd param contains:
    update XML_OPERAZIONE_LOG t
    set value(t) = updateXML(value(t),
    '/operazione.log/Operazione',XMLTYPE(?))
    where existsNode(value(t),
    '/operazione.log/Journal [NumeroElettronico="99900000"]') = 1
    I get the error ORA-17410 "No More Data to read from socket"
    If the sqlCmd contains:
    insert into XML_OPERAZIONE_LOG values( XMLType(?))
    I have no problems.
    Any Idea ?
    Oracle 9.2.0.2.0, latest classes12.zip BEW Web Logic 8.1

    Upgrade to 9.2.0.5.0 since 9.2.0.2.0 is not supported for XMLType. Also try OCI rather than thin dirver.

Maybe you are looking for

  • How much would it be to replace an iPhone 5s home button?

    My phone received some water damage and it looks like the home button needs to be replaced. Anybody know how much it would cost to replace?

  • What is digital signature

    hi friends, can any one give brief information about the follwing two statements,these statements are the features of ADOBE. Activate enhanced functions such as comments Digital signatures and form certification

  • Hello Experts, I have a question, how I can import "linq" file to ms sql?

    Hello Experts, I have a question, how I can import linq (OpenUIPlayersDB.linq) file to ms sql? Form Sample OpenUI applications? BR Lukas

  • Drive Storage and longevity question

    I LOVE my MAC PRO and am setting up some new drives and have a simple question: I have 1TB drive that houses all my most valuable work that I keep in an internal drive bay. I have a secondary 1TB drive that I intend to mirror the first drive. I can't

  • Imported address book missing street address

    Hello, I have imported my address book from Thunderbird on Windows XP. All went okay, except it is missing the street address (town and other address info is okay). Not sure if this is a Mac problem or the Thunderbird export problem. Any advise, plea