EXEC SQL and DBIF_DSQL2_CONNECTERR error
Hello,
Currently our shipping system is communicating with SAP below are the parameters used:
<SAPProgramID>kewill_LXD</SAPProgramID>
<SAPGatewayHost>10.XX.40.XX</SAPGatewayHost>
<SAPGatewayService>sapgw00</SAPGatewayService>
<TransHandlerConnString>STMT=;OPTION=3;DSN=didb;UID=sn_usr;PASSWORD=sipndb;DESC=MySQL ODBC 3.51 Driver;DATABASE=didb;SERVER=localhost;PORT=3306</TransHandlerConnString
This is what I have in DBCON or tcode DBCO
Connection Name: Ship
DBMS: MSS
User Name: sn_usr
Password: sipndb
Conn. info: MSSQL_SERVER=localhost;MSSQL_DBNAME=didb
I get a dump with DBIF_DSQL2_CONNECTERR error when I try to use this in the EXEC SQL:
REPORT ZKEWILL_CONN .
Tables: DBCON.
DATA: BEGIN OF WA,
ship_date(10), S2Name1(50),
END OF WA.
DATA : bdate(10) value '2008-09-29',
edate(10) value '2008-10-05'.
EXEC SQL.
CONNECT TO 'KEWILL' AS 'K'
ENDEXEC.
EXEC SQL.
SET CONNECTION 'K'
ENDEXEC.
EXEC SQL.
SELECT ship_date, s2name1 INTO :WA FROM shipment_header
WHERE ship_date >= :bdate
AND ship_date <= :edate
ENDEXEC.
WRITE: / WA-ship_date, WA-s2name1.
We are in 4.6C. Please let me know if I need to make changes to the DBCO or to the program or both.... thanks!!
AJ
Hi Jimmy,
The issue is more related to livecache.So can you please close this tread and create new thread under forum 'SAP MaxDB/livecache'.
Thanks & Regards,
Sunitha
Similar Messages
-
Use Of "#EC CI_EXECSQL in ABAP with EXEC SQL. Statement giving Syntax Error
Dear Gurus,
I have encountered an issue while trying to remove warning for using Native SQL statement using pseudo comment "#EC CI_EXECSQL
The thing is like this -- i have used follwing native sql command in abap.
EXEC SQL.
CONNECT TO 'SURROUND_DB'
ENDEXEC.
Now when i am checking this code in code inspector it is showing a warning with information below
CA CL_CI_TEST_CRITICAL_STATEMENTS0006
Code Inspector
Critical Statements
Use of Native SQL
Authorization checks cannot be appropriately run using EXEC SQL and should be carried out at program level.
The message can be hidden using the pseudo-comment "#EC CI_EXECSQL
Use of exceptin handling section for that warning showing me to use :
The message can be hidden using pseudo
comment "#EC CI_EXECSQL
Now when I am using "#EC CI_EXECSQL in the abap like below :
EXEC SQL. "#EC CI_EXECSQL
CONNECT TO 'SURROUND_DB'
ENDEXEC.
It is giving syntax error
The text literal ""#EC CI_EXECSQL " is longer than 255
characters.Check whether it ends correctly.
Please provide the guideline to resolve this issue.
Thanks & regards
Saifur Rahaman.Hi Saifur,
You can remove the warning using the following syntax:
EXEC "#EC CI_EXECSQL
SQL.
CONNECT TO 'SURROUND_DB'
ENDEXEC.
At least, it worked fine for me when using OPEN CURSOR, SELECT, FETCH and so on statements.
The way to use the pseudo comment is not very intuitive, but at least for my examples worked fine.
I hope this may help you.
Best regards,
Edgardo G. König -
Adpatch: Error running SQL and EXEC commands in parallel
Hi
I am applying R12 RUP2 to an instance at the moment. I had an OS crash (I'm running R12 on Linux on VMWARE) and on reboot attempted to restart the patch.
I now get an error as follows:
Error running SQL and EXEC commands in parallel
I must admit, I'm not a DBA, so if anyone has any ideas or has seen this before then it would be most appreciated!
Thanks
ChrisHi Adith
The patch is 5484000, RUP 2 for E-Business Suite R12
Here's the adpatch output:
Start date: Wed Sep 12 2007 15:15:14
0 "left over" javaupdates.txt files uploaded to DB: Wed Sep 12 2007 15:15:14
0 patches uploaded from the ADPSV format patch history files: Wed Sep 12 2007 15:15:14
Uploading information about files copied during the previous runs ...
0 "left over" filescopied_<session_id>.txt files uploaded to DB: Wed Sep 12 2007 15:15:14
****************** E N D O F U P L O A D ******************
End date: Wed Sep 12 2007 15:15:14
Already asked for the name of the patch directory.
(The answer was: /oracle/patches/5484000)
Already asked for the name of the patch driver file.
(The answer was: /oracle/patches/5484000/u5484000.drv)
Reading release list save file...
Done reading release list save file
Log and Info File sync point:
Wed Sep 12 2007 15:15:15
Turning off actions that reference unrecognized products.
Log and Info File sync point:
Wed Sep 12 2007 15:15:15
End of unrecognized products checking.
(The number of parallel workers is: " 2 ")
AutoPatch will run in parallel mode.
Did not need to apply new applterr.txt.
Skipping...
Determine directories to create for Specified driver
since no such action is present for this driver file
Skipping...
Determine Oracle Reports libraries to generate for Specified driver
since no such action is present for this driver file
Skipping...
Determine if need to generate message files for Specified driver
since no such action is present for this driver file
Skipping...
Create Directories for Specified driver
since no such action is present for this driver file
Number of invalid objects: 31057
Running SQL scripts and EXEC commands...
Determining which SQL and EXEC commands to run...
Validating PL/SQL direct execute exceptions file ...
Done validating PL/SQL direct execute exceptions file.
SERVICE_NAME/INSTANCE_NAME : [VIS]
connect_string : [(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ebusr12.chriseebee.me.uk)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=VIS)))]
Done determining which SQL and EXEC commands to run.
Running SQL and EXEC commands in parallel...
Creating the AD_UTIL_PARAMS table...
Table AD_UTIL_PARAMS already exists, so dropping the table and recreating it.
Creating FND_INSTALL_PROCESSES table...
Already created fnd_install_processes table
Already created FND_INSTALL_PROCESSES_U1 index.
Already created AD_DEFERRED_JOBS table
Already created AD_DEFERRED_JOBS_U1 index.
Writing dependencies of jobs to run to appldep.txt file...
There are now 7569 jobs remaining (current phase=A0):
0 running, 5 ready to run and 7564 waiting.
Reading completed jobs from restart file (if any).
There are now 3474 jobs remaining (current phase=A18):
0 running, 1 ready to run and 3473 waiting.
Determining which java executables are supported by adJavaWorker...
Starting worker processes.
Worker process 1 started.
Worker process 2 started.
Checking if all jobs have their actual and symbolic arguments in sync....
Done.
Writing jobs to run to restart file.
Reading jobs from FND_INSTALL_PROCESSES table ...
Running: file adobjcmp.sql on worker 1 for product ad username APPLSYS.
AutoPatch error:
The worker should not have status 'Running' or 'Restarted' at this point.
Telling workers to quit...
************* Start of AD Worker session *************
AD Worker version: 12.0.0
AD Worker started at: Wed Sep 12 2007 15:15:34
APPL_TOP is set to /oracle/VIS/apps/apps_st/appl
************* Start of AD Worker session *************
AD Worker version: 12.0.0
AD Worker started at: Wed Sep 12 2007 15:15:34
APPL_TOP is set to /oracle/VIS/apps/apps_st/appl
All workers have quit.
AutoPatch error:
Error running SQL and EXEC commands in parallel
You should check the file
/oracle/VIS/apps/apps_st/appl/admin/VIS/log/adpatch.log
for errors. -
Error running SQL and EXEC commands in parallel when adpatch
Hi,
AutoPatch error:
aiprfp: product 'cle' not in release 'R120'
AutoPatch error:
Error running SQL and EXEC commands in parallel
Freeing includes hash table
Freeing fixes hash table
Freeing basedons hash table
Freeing entities hash table
You should check the file
/a02/prod/apps/apps_st/appl/admin/PROD/log/adpatch_7305220_1.log
for errors.
How to resolve this errror while applying patch 7305220.
Regards,Hi,
Please check logfile */a02/prod/apps/apps_st/appl/admin/PROD/log/adpatch_7305220_1.log* for any errors recoded.
Post error messages from this logfile.This is the main patch log file and it should show the same error "aiprfp: product 'cle' not in release 'R120'".
Thanks,
Hussein -
Error running SQL and EXEC commands in parallel
Dear Gurus,
We are applying 3480000 and in process as soon as workers start it come out of adpatch session and give su the following error:
************* Start of AD Worker session *************
AD Worker version: 11.5.0
AD Worker started at: Sun Sep 02 2007 23:11:01
APPL_TOP is set to /sgmtemp/prodappl
Worker process 4 started.
Checking if all jobs have their actual and symbolic arguments in sync....
Done.
Writing jobs to run to restart file.
Reading jobs from FND_INSTALL_PROCESSES table ...
Done reading jobs from FND_INSTALL_PROCESSES table ...
Telling workers to read 'todo' restart file.
Done.
Starting phase 0 (A0): first
There are now 98197 jobs remaining (current phase=A0):
0 running, 123 ready to run and 98074 waiting.
Assigned: file adsysapp2.sql on worker 1 for product admin username APPLSYS.
Assigned: file cssruwq1.sql on worker 2 for product cs username CS.
Connecting to CSD......Unable to connect.
AutoPatch error:
The following ORACLE error:
ORA-01017: invalid username/password; logon denied
occurred while executing the SQL statement:
CONNECT CSD/*****
AutoPatch error:
Error while evaluating "Check Object"
Telling workers to quit...
3 workers have quit. Waiting for 1 more.
All workers have quit.
Error running SQL and EXEC commands in parallel
You should check the file
/sgmtemp/prodappl/admin/msbep004/log/3480000_sbm3.log
for errors.
applmgr@21:/sgmtemp/Oglupgr/3480000>
What could be the issue, i tried to connect CSD/CSD in sql and it connected.
Thanks in Advance
Regards
Kiran RanaHi Gurus,
Even i tried to recreate the FND_GLOBAL by performing the following, but still no luck:
output for scripts hearder value in FND_TOP:
applmgr@21:/sgmtemp/prodcomn/temp> cd $FND_TOP/patch/115/sql
applmgr@21:/sgmtemp/prodappl/fnd/11.5.0/patch/115/sql> grep Header AFSCGBL*
AFSCGBLB.pls:/* $Header: AFSCGBLB.pls 115.78 2005/03/21 11:40:02 vbalakri ship $ */
AFSCGBLS.pls:/* $Header: AFSCGBLS.pls 115.33 2004/06/30 05:00:18 rsheh ship $ */
Output for script header value in Database:
SQL> select text from dba_source where name='FND_GLOBAL' and line <5;
TEXT
package FND_GLOBAL as
/* $Header: AFSCGBLS.pls 115.33 2004/06/30 05:00:18 rsheh ship $ */
package body FND_GLOBAL as
/* $Header: AFSCGBLB.pls 115.78 2005/03/21 11:40:02 vbalakri ship $ */
8 rows selected.
We tried to re-apply 4 hours back when one of the support personnal ask use to run those
scripts. one of them went with out any errors but second one went with errors
as follows:
First Script @AFSCGBLS.pls
applmgr@21:/sgmtemp/prodappl/fnd/11.5.0/patch/115/sql> sapps @AFSCGBLS.pls
SQL*Plus: Release 8.0.6.0.0 - Production on Mon Sep 3 03:24:10 2007
(c) Copyright 1999 Oracle Corporation. All rights reserved.
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.7.0 - 64bit Production
With the Partitioning and Oracle Data Mining options
JServer Release 9.2.0.7.0 - Production
DOC> | Copyright (c) 1993 Oracle Corporation Redwood Shores, California, USA|
DOC> | All rights reserved. |
DOC> +=======================================================================+
DOC> | FILENAME
DOC> | AFSCGBLS.pls
DOC> |
DOC> | DESCRIPTION
DOC> | PL/SQL specification for package: FND_GLOBAL
DOC> |
DOC> | NOTES
DOC> | This module is called by AutoInstall (afplss.drv) on install and
DOC> | upgrade. The WHENEVER SQLERROR and EXIT (at bottom) are required.
DOC> |
DOC> | HISTORY
DOC> | June, 1999 - Added function AUDIT_ACTIVE, bug 879630. Jan Smith.
DOC> | 11/19/01 MSkees - Added DBDrv line and 'SET VERIFY OFF' for ARU auto
DOC> | generation bug 2047263 build
DOC> |
DOC> *=======================================================================*/
Package created.
Commit complete.
Disconnected from Oracle9i Enterprise Edition Release 9.2.0.7.0 - 64bit Production
With the Partitioning and Oracle Data Mining options
JServer Release 9.2.0.7.0 - Production
Second Script AFSCGBLB.pls:
applmgr@21:/sgmtemp/prodappl/fnd/11.5.0/patch/115/sql> sapps @AFSCGBLB.pls <
SQL*Plus: Release 8.0.6.0.0 - Production on Mon Sep 3 03:27:15 2007
(c) Copyright 1999 Oracle Corporation. All rights reserved.
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.7.0 - 64bit Production
With the Partitioning and Oracle Data Mining options
JServer Release 9.2.0.7.0 - Production
Warning: Package Body created with compilation errors.
Commit complete.
Disconnected from Oracle9i Enterprise Edition Release 9.2.0.7.0 - 64bit Production
With the Partitioning and Oracle Data Mining options
JServer Release 9.2.0.7.0 -
Production
applmgr@21:/sgmtemp/prodappl/fnd/11.5.0/patch/115/sql>
The second script (AFSCGBLB.pls) run's out with errors and changes status of almost 15000 objects as INVALID in database.
Regards
Kiran Rana -
SQL error 3113 occurred when executing EXEC SQL.
Hi,
We are facing one typical problem, One background is failing regularly with
below dump. as we now got all notes giving information, if database restarted
taking backup, these type of failures occur, but our database is only down for backup once in a week, but it is failing with frequenly.
in this two servers are located in different place, in this job tries to connect
another server to get material statistics.
It is giving some error message in sm21 with
SQL error 3113 occurred when executing EXEC SQL.
work procees in reconnect mode.
all notes saying these types of dump occur when database restared, but this dump
even though database is up.
below is short dump, please can anyone help me from this problem.
ABAP runtime errors DBIF_DSQL2_SQL_ERROR
Occurred on 08.01.2007 at 00:30:28
>> Short dump has not been completely stored. It is too big.
SQL error 3113 occurred when executing EXEC SQL.
What happened?
The error occurred in the current database connection "AZ1".
What can you do?
Note the actions and input that caused the error.
Inform your SAP system administrator.
You can print out this message by choosing "Print". Transaction ST22
allows you to display and manage termination messages, including keeping
them beyond their normal deletion date.
Error analysis
How to correct the error
Database error text........: "ORA-03113: end-of-file on communication channel#"
Triggering SQL statement...: "select mara.groes, mara.brgew, mara.ntgew,
mara.gewei, mara.volum, mara.voleh, mara.mstae, mara.mstde, mara.prdha,
marc.matnr, marc.werks, marc.mmsta, marc.mmstd from sapr3.mara, sapr3.m
where sapr3.mara.mandt = sapr3.marc.mandt and sapr3.mara.matnr =
Internal call code.........: "[DBDS/NEW DSQL]"
Please check the entries in the system log (Transaction SM21).
If the error occurred in a non-modified SAP program, you may be
able to find a solution in the SAP note system.
If you have access to the note system yourself, use the following
search criteria:
"DBIF_DSQL2_SQL_ERROR"
"ZM2431216 " or "ZM2431216 "
"EXTRACT_GENERAL_DATA"
If you cannot solve the problem yourself, please send the
following documents to SAP:
1. A hard copy print describing the problem.
To obtain this, select the "Print" function on the current screen.
2. A suitable hardcopy prinout of the system log.
To obtain this, call the system log with Transaction SM21
and select the "Print" function to print out the relevant
part.
3. If the programs are your own programs or modified SAP programs,
supply the source code.
To do this, you can either use the "PRINT" command in th
print the programs using the report RSINCL00.
4. Details regarding the conditions under which the error o
or which actions and input led to the error.
System environment
SAP Release.............. "46C"
Application server....... "essceu3"
Network address.......... "172.19.119.198"
Operating system......... "AIX"
Release.................. "5.3"
Hardware type............ "00C7ADBD4C00"
Database server.......... "ukblx176"
Database type............ "ORACLE"
Database name............ "EU3"
Database owner........... "SAPR3"
Character set............ "es_ES.ISO8859-1"
SAP kernel............... "46D"
Created on............... "Jul 9 2006 20:26:33"
Created in............... "AIX 1 5 00447C4A4C00"
Database version......... "OCI_920__OCI_7_API "
Patch level.............. "2257"
Patch text............... " "
Supported environment....
Database................. "ORACLE 8.0.5.., ORACLE 8.0.6.., ORACLE
8.1.6.., ORACLE 8.1.7.., ORACLE 9.2.0.., ORACLE 10.2.0.."
SAP database version..... "46D"
Operating system......... "AIX 1 4, AIX 2 4, AIX 3 4, AIX 1 5, AIX 2 5, AIX 3
5, , System build information:, , LCHN :
841480"
User, transaction...
Client.............. 600
User................ "MPZMMES"
Language key........ "S"
Transaction......... " "
Program............. "ZM2431216 "
Screen.............. "SAPMSSY0 1000"
Screen line......... 6
Information on where termination occurred
The termination occurred in the ABAP/4 program "ZM2431216 " in
"EXTRACT_GENERAL_DATA".
The main program was "ZM2431216 ".
The termination occurred in line 980
of the source code of program "ZM2431216 " (when callin
The program "ZM2431216 " was started as a background jo
Source code extract
009500 mara.ntgew,
009510 mara.gewei,
009520 mara.volum,
009530 mara.voleh,
009540 mara.mstae,
009550 mara.mstde,
009560 mara.prdha,
009570 marc.matnr,
009580 marc.werks,
009590 marc.mmsta,
009600 marc.mmstd
009610 into :w_ops-groes,
009620 :w_ops-brgew,
009630 :w_ops-ntgew,
009640 :w_ops-gewei,
009650 :w_ops-volum,
009660 :w_ops-voleh,
009670 :w_ops-mstae,
009680 :w_ops-mstde,
009690 :w_ops-prdha,
009700 :w_ops-matnr,
009710 :w_ops-werks,
009720 :w_ops-mmsta,
009730 :w_ops-mmstd
009740 from sapr3.mara, sapr3.marc
009750 where sapr3.mara.mandt = sapr3.marc.mandt
009760 and sapr3.mara.matnr = sapr3.marc.matnr
009770 and sapr3.mara.mandt = :p_mandt
009780 and sapr3.mara.matnr = :w_ebs-matnr
009790 and sapr3.marc.werks = :p_owerks
> ENDEXEC.
009810 endform. " extract_general_data
009820 *&
009830 *& Form append_i_ops
009840 *&
009850 * Appends W_OPS to I_OPS
009860 *
009870 form append_i_ops.
009880 append w_ops to i_ops.
009890 endform. " append_i_ops
009900 *&
009910 *& Form extract_material_description
009920 *&
009930 * Extracts a Material Description from the remote database an
009940 * modifies the current record in I_OPS.
009950 *
009960 * >P_SPRAS Language Key
009970 *
009980 form extract_material_description using p_spras.
009990 EXEC sql performing set_langauge.
Contents of system fields
SY field contents..................... SY field contents............
SY-SUBRC 0 SY-INDEX 0
SY-TABIX 1 SY-DBCNT 1
SY-FDPOS 18 SY-LSIND 0
SY-PAGNO 0 SY-LINNO 1
SY-COLNO 1
Chosen variables
Name.......................... Contents.1........2........3....+..
W_EBS-PRAT4
2
0
W_OPS-GROES
22222222222222222222222222222222
00000000000000000000000000000000
W_OPS-BRGEW #######
0000000
000000C
W_OPS-NTGEW #######
0000000
000000C
regards,
krishnaiah.Hi,
This is usually a SERVER SIDE DATABASE PROBLEM or SQLNET LISTENER (server side) PROBLEM. The client side should initially be ignored and instead the server should be investigated. In rare cases, this can be caused by client
side memory or other resource problem, or a DLL version mismatch, but this is
unlikely.
Enlist the assistance of your DBA. Then reproduce the ORA-3113 error on your
client application. Ask your DBA to look at the database side Alert.log and
trace files and look for ANY activity. Any activity that coincides with your
ORA-3113 will be a clue.
REgards
Vinod -
EXEC SQL Error: ORA-01401: Inserted value too large for column
Getting this SQL Error: ORA-01401: Inserted value too large for column..on an EXEC SQL Insert statement when writing to an
external Oracle DB from SAP.
On further analysis..it appears that this happens to the fields..when the string length matches the field length.
Example: Plant field is defined as char(4) on the SAP side and it is a Varchar2(4) on the Oracle side.
When a value like '1015' is passed thru a variable in the insert statement then this ORA-01401 error pops up.
No error:
- if the value '1015' is passed directly in the insert statement to the external table (or)
- when a value with 3 chars or less(like the first three chars..101) is passed thru a variable defined as 'Plant(4) type c'.
- when using EXEC sql within SAP
- when reading from the external db table
This was working ok until the Oracle Patch P9147110 was installed recently.
Any suggestions !Hello Dvas,
what's the characterset of your external database?
What's the column definition in your external database (byte or character based)?
If you use a characeterset like UTF8 it is possible, that one character needs more than one byte and then you will run into such kind of issues if the definition is too small.
Regards
Stefan -
hello people,
I'm using the connection DBCOMM to connect a external BD, using this connection:
EXEC SQL.
SET CONNECTION :vg_con_name
ENDEXEC.
IF NOT sy-subrc IS INITIAL.
EXEC SQL.
CONNECT TO :vg_con_name
ENDEXEC.
ENDIF.
I verified the connection and before i maked a select in the table EKKO
kind of this:
EXEC SQL.
SELECT EBELN
FROM EKKO
INTO :P_EBELN
WHERE EBELN = :W_EBELN
ENDEXEC.
sometimes i lost the connection, but here in the project I use the version of R/3, 4.6c and don't have the command TRY to catch the problem.
The Dump is:
DBIF_DSQL2_SQL_ERROR
"ORA-03113: end-of-file on communication channel#"
anyone here can help me,
waiting
WilleHI,
Cause: There is an SQL error during execution of a Native SQL command.
Runtime Error: DBIF_DSQL2_SQL_ERROR
If you want to select into a work area in a SELECT statement, and not into a list of host variables, the host variable must be a structure. If you cannot determine statically (at compilation time) whether the target area is a structure at runtime, then there is a runtime error, depending on the database system. Or only the first selected column is placed into the target area. In this case, one can be certain, using INTO STRUCTURE (instead of only INTO), that at runtime a structure really is available as target area.
Please the connection which you have specified is existing in the DBCON TABLE.
Regards
Anitha -
I installed the SQL server Express 2008 R2 and then SQL Server Management Studio 2008 R2 . But during the installation, I could not choose the both SQL and windows authentication mode and an error accrued so I did that just with windows authentication mode.
Now, I want to change the windows authentication mode account to the SQL authentication mode but it shows me an error which is you do not have permission (Although I am the administrator in windows), what can I do?
Following steps are the steps that I went but I got an error:
Server properties >> security >> choose the option of SQL Server and Windows Authentication mode
and the error that I got is attached(access is denied)
Can you please help me?You can change the setting after you gain admin rights to your SQL Server. You don't admin rights automatically, you have to explicitly add yourself during the install
Here's a guide on how to (re)gain those rights:
http://v-consult.be/2011/05/26/recover-sa-password-microsoft-sql-server-2008-r2/ -
SQL server 2008 restore and access error
hi
(provider: Named Pipes Provider, error: 40 – Could not open a connection to SQL Server
I restored a backup which i was not created to a new database and if i connect above said issue is coming , if i generate script from restored DB and running without data in another new database and connecting to the same is working .. can you plz tell what
will be the exact problem and i found one database level user is there as below in the script.
CREATE USER [appointment_bee] WITHOUT LOGIN WITH DEFAULT_SCHEMA=[dbo]
kindly let me know whats the problem ..
regards,
martinHi Martin,
As Nag said, it's hard for us to understand your issue. For the error "Could not open a connection to SQL Server".
There could be several reasons you get these error messages. To avoid this issue, please refer to the steps that provided on the links below.
http://www.mssqltips.com/sqlservertip/2340/resolving-could-not-open-a-connection-to-sql-server-errors/
http://blog.sqlauthority.com/2007/04/23/sql-server-fix-error-40-could-not-open-a-connection-to-sql-server/
If this is now what you want, please provide us more information about your issue, so that we can make further analysis.
Regards,
Charlie Liao
TechNet Community Support -
WCF-SQL Debatch and Map: Error
I am using WCF-SQL to poll and fetch a bunch of records. I then debatch them. (Tested the output and it's ok). As a next step, I applied a map between the debatched schema and my canonical schema. Testing the map worked well. On deploying and running, I
get an error
"The adapter "WCF-SQL" raised an error message. Details "System.Runtime.InteropServices.COMException (0xC0C01627): Exception from HRESULT: 0xC0C01627"."
Please adviseHi,
Have you checked the Body xpath property of repeating record and checked Envelope property to true.
I would recommend to test the Envelope Schema and document schema through xmldasm.exe .
Go to C:\Program Files(*)\Microsoft BizTalk server 2013\SDK\Utilities\PipelineTools copy both
xmldasm.exe and PipelineObjects.dll to the folder where you have your schema files.
or
If you don't want to copy the files the alternative way is goto command prompt just type
path = %path%;”C:\Program Files (x86)\Microsoft BizTalk Server 2010\SDK\Utilities\PipelineTools”
hit enter.
Open command prompt and execute the following command : xmldasm Documentxml.xml -ds
Document.xsd -es EnvelopeSchema.xsd -c hit enter.
Thanks
Abhishek -
hi, I have a problem.
I would like to capture an error provoked by the education EXEC SQL.
I have tried to insert the block try... cath around the command EXEC but
the program goes in loop.
Thanks for the help
This is the example that I have tried but it doesn't work
data myref type ref to CX_SY_NATIVE_SQL_EROR.
try.
exec sql.
endexec.
catch CX_SY_NATIVE_SQL_EROR.
write 'Error ', myref->SQL_ERROR.
RAISE EXCEPTION myref.
endtry.According to you, you've placed the sqlexec statements in fieldchange event but if you'll notice in your error, it happened on the fieldformula event of SI_LTTR_TMP field. currently, what is the code in SI_WRK.SI_LTTR_TMP.FieldFormula?
Thanks... -
Getting core dump when using EXEC SQL CLOSE
In my pro*c program , i have used a cursor to fetch the set of accounts.Once cursor is opened , code will perform set
of operation using fetched data and then cursor is closed. Between open and closing of cursor , i have used 23 EXEC
SQL CLOSE. For example i am copying the value of a to b using strlcpy between fetch and close cursor statement.If
returned value from strlcpy is greater than size of destination variable, then flow should not proceed , in that case I will
close the cursor using EXEC SQL CLOSE and return the flow to calling program. Similarly i have closed the cursor at
another 22 locations.
When i compile the code and run binary the core dump occurs. On analyzing the core it shows
t@null (l@8) terminated by signal SEGV (no mapping at the fault address)
0xffffffffffffffff: <bad address 0xffffffffffffffff>
dbx: core file read error: address 0xfc4ffe48 not in data space
Current function is dbMtBaseClass::Pswd_Change
7860 sqlcxt(&_dbMtCtx, &sqlctx, &sqlstm, &sqlfpn);
if I remove any of the three EXEC SQL CLOSE commands , core dump does not occurs.
It looks strange.Please help me to resolve the issue.In my pro*c program , i have used a cursor to fetch the set of accounts.Once cursor is opened , code will perform set
of operation using fetched data and then cursor is closed. Between open and closing of cursor , i have used 23 EXEC
SQL CLOSE. For example i am copying the value of a to b using strlcpy between fetch and close cursor statement.If
returned value from strlcpy is greater than size of destination variable, then flow should not proceed , in that case I will
close the cursor using EXEC SQL CLOSE and return the flow to calling program. Similarly i have closed the cursor at
another 22 locations.
When i compile the code and run binary the core dump occurs. On analyzing the core it shows
t@null (l@8) terminated by signal SEGV (no mapping at the fault address)
0xffffffffffffffff: <bad address 0xffffffffffffffff>
dbx: core file read error: address 0xfc4ffe48 not in data space
Current function is dbMtBaseClass::Pswd_Change
7860 sqlcxt(&_dbMtCtx, &sqlctx, &sqlstm, &sqlfpn);
if I remove any of the three EXEC SQL CLOSE commands , core dump does not occurs.
It looks strange.Please help me to resolve the issue. -
Hi,
I am getting an issue during a SCOM 2012 R2 installation while creating the SCOM DataWarehouse database. Setup seems to timeout during creating the datawarehouse database. I can see all database files created in windows explorer on the SQL server before
setup rolls the SCOM install back.
Has anyone seen this issue before or know how to help resolve it?
Appreciate your help, below is the SCOM installation log:
Thanks
Marc
[13:27:27]: Always: :Creating Database: OperationsManagerDW
[13:35:28]: Warn: :Warning:Retry on SQL error -2: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
[13:43:28]: Warn: :Warning:Retry on SQL error -2: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
[13:51:29]: Warn: :Warning:Retry on SQL error -2: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
[13:59:30]: Warn: :Warning:Retry on SQL error -2: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
[14:07:30]: Warn: :Warning:Retry on SQL error -2: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
[14:15:31]: Warn: :Warning:Retry on SQL error -2: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
[14:23:31]: Warn: :Warning:Retry on SQL error -2: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
[14:31:32]: Warn: :Warning:Retry on SQL error -2: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
[14:39:32]: Warn: :Warning:Retry on SQL error -2: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
[14:47:33]: Warn: :Warning:Retry on SQL error -2: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
[14:55:33]: Error: :DB operations failed with SQL error -2: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
: Threw Exception.Type: System.Data.SqlClient.SqlException, Exception Error Code: 0x80131904, Exception.Message: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
[14:55:33]: Error: :StackTrace: at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean asyncWrite)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at Microsoft.EnterpriseManagement.OperationsManager.Setup.Common.SqlRetryHandler.ExecuteNonQuery(SqlCommand sqlCommand, Int32& result)
at Microsoft.EnterpriseManagement.OperationsManager.Setup.Common.SqlRetryHandler.Execute[T](SqlCommand sqlCommand, SqlRetryPolicy retryPolicy, GenericExecute`1 genericExecute)
[14:55:33]: Error: :Inner Exception.Type: System.ComponentModel.Win32Exception, Exception Error Code: 0x80131904, Exception.Message: The wait operation timed out
[14:55:33]: Error: :InnerException.StackTrace:
[14:55:33]: Error: :Error:Failed to execute sql command. Setup has reached maximum retry limit.
[14:55:33]: Warn: :Sql error: 11. Error: -2. Error Message: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
[14:55:33]: Error: :Exception running sql string
DECLARE @sql NVARCHAR(MAX);
SET @sql = 'CREATE DATABASE ' + QUOTENAME(@DatabaseName) + '
ON PRIMARY(NAME=MOM_DATA,FILENAME=''' + REPLACE(@Filename, '''', '''''') + ''',SIZE=' + CAST(@Size AS VARCHAR) + 'MB,MAXSIZE=UNLIMITED,FILEGROWTH=' + CAST(@FileGrowth AS VARCHAR) + 'MB)
LOG ON(NAME=MOM_LOG, FILENAME=''' + REPLACE(@LogFilename, '''', '''''') + ''',SIZE=' + CAST(@LogSize AS VARCHAR) + 'MB,MAXSIZE=UNLIMITED,FILEGROWTH=' + CAST(@LogFileGrowth AS VARCHAR) + 'MB)';
EXEC(@sql);: Threw Exception.Type: System.Data.SqlClient.SqlException, Exception Error Code: 0x80131904, Exception.Message: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
[14:55:33]: Error: :StackTrace: at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean asyncWrite)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at Microsoft.EnterpriseManagement.OperationsManager.Setup.Common.SqlRetryHandler.ExecuteNonQuery(SqlCommand sqlCommand, Int32& result)
at Microsoft.EnterpriseManagement.OperationsManager.Setup.Common.SqlRetryHandler.Execute[T](SqlCommand sqlCommand, SqlRetryPolicy retryPolicy, GenericExecute`1 genericExecute)
at Microsoft.EnterpriseManagement.OperationsManager.Setup.DBConfigurationHelper.DBConfiguration.RunSqlCommandsList(IEnumerable`1 sqlCommands)
[14:55:33]: Error: :Inner Exception.Type: System.ComponentModel.Win32Exception, Exception Error Code: 0x80131904, Exception.Message: The wait operation timed out
[14:55:33]: Error: :InnerException.StackTrace:
[14:55:33]: Always: :Failed to create and configure the DB with exception.: Threw Exception.Type: System.Data.SqlClient.SqlException, Exception Error Code: 0x80131904, Exception.Message: Timeout expired. The timeout period elapsed prior to completion
of the operation or the server is not responding.
[14:55:33]: Always: :StackTrace: at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean asyncWrite)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at Microsoft.EnterpriseManagement.OperationsManager.Setup.Common.SqlRetryHandler.ExecuteNonQuery(SqlCommand sqlCommand, Int32& result)
at Microsoft.EnterpriseManagement.OperationsManager.Setup.Common.SqlRetryHandler.Execute[T](SqlCommand sqlCommand, SqlRetryPolicy retryPolicy, GenericExecute`1 genericExecute)
at Microsoft.EnterpriseManagement.OperationsManager.Setup.DBConfigurationHelper.DBConfiguration.RunSqlCommandsList(IEnumerable`1 sqlCommands)
at Microsoft.EnterpriseManagement.OperationsManager.Setup.DWConfigurationHelper.DWConfigurationProcessor.RunAdminScripts(String sqlServerInstance, Nullable`1 port, String databaseName, Int64 dbSize, Int64 logSize, String dbPath, String logPath)
at Microsoft.EnterpriseManagement.OperationsManager.Setup.DWConfigurationHelper.DWConfigurationProcessor.ConfigureDataWarehouseDatabase(String sqlServerInstance, Nullable`1 port, String databaseName, Int64 dbSize, Int64 logSize, String dbPath,
String logPath)
[14:55:33]: Always: :Inner Exception.Type: System.ComponentModel.Win32Exception, Exception Error Code: 0x80131904, Exception.Message: The wait operation timed out
[14:55:33]: Always: :InnerException.StackTrace:
[14:55:33]: Error: :CreateDataWarehouse failed: Threw Exception.Type: System.Data.SqlClient.SqlException, Exception Error Code: 0x80131904, Exception.Message: Timeout expired. The timeout period elapsed prior to completion of the operation or
the server is not responding.
[14:55:33]: Error: :StackTrace: at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean asyncWrite)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at Microsoft.EnterpriseManagement.OperationsManager.Setup.Common.SqlRetryHandler.ExecuteNonQuery(SqlCommand sqlCommand, Int32& result)
at Microsoft.EnterpriseManagement.OperationsManager.Setup.Common.SqlRetryHandler.Execute[T](SqlCommand sqlCommand, SqlRetryPolicy retryPolicy, GenericExecute`1 genericExecute)
at Microsoft.EnterpriseManagement.OperationsManager.Setup.DBConfigurationHelper.DBConfiguration.RunSqlCommandsList(IEnumerable`1 sqlCommands)
at Microsoft.EnterpriseManagement.OperationsManager.Setup.DWConfigurationHelper.DWConfigurationProcessor.RunAdminScripts(String sqlServerInstance, Nullable`1 port, String databaseName, Int64 dbSize, Int64 logSize, String dbPath, String logPath)
at Microsoft.EnterpriseManagement.OperationsManager.Setup.DWConfigurationHelper.DWConfigurationProcessor.ConfigureDataWarehouseDatabase(String sqlServerInstance, Nullable`1 port, String databaseName, Int64 dbSize, Int64 logSize, String dbPath,
String logPath)
at Microsoft.SystemCenter.Essentials.SetupFramework.InstallItemsDelegates.OMDataWarehouseProcessor.CreateDataWarehouse()
[14:55:33]: Error: :Inner Exception.Type: System.ComponentModel.Win32Exception, Exception Error Code: 0x80131904, Exception.Message: The wait operation timed out
[14:55:33]: Error: :InnerException.StackTrace:
[14:55:33]: Error: :FATAL ACTION: CreateDataWarehouse
[14:55:33]: Error: :FATAL ACTION: DWInstallActionsPostProcessor
[14:55:33]: Error: :ProcessInstalls: Running the PostProcessDelegate returned false.
[14:55:33]: Always: :SetErrorType: Setting VitalFailure. currentInstallItem: Data Warehouse Configuration
[14:55:33]: Error: :ProcessInstalls: Running the PostProcessDelegate for OMDATAWAREHOUSE failed.... This is a fatal item. Setting rollback.
marc nalderHi,
Based on the log, I recommend you use the following way to test SQL connectivity.
You can use a UDL file to test various connectivity scenarios, create a simple text file, rename the extension from TXT to UDL, fill out the necessary information on the connection tab then test the connection, and troubleshoot as necessary
if it fails to connect.
For more information, please review the link below:
The easy way to test SQL connectivity
http://blogs.technet.com/b/michaelgriswold/archive/2014/01/06/the-easy-way-to-test-sql-connectivity.aspx
We
are trying to better understand customer views on social support experience, so your participation in this
interview project would be greatly appreciated if you have time.
Thanks for helping make community forums a great place. -
Native SQL Update statement error when more than one field used
Hi, I would make it simple. I update directly to a SQL server.
1-
When I update only one field works.
LOOP AT IT_MAT.
EXEC SQL.
UPDATE Articulos SET PrecioSinImp = :IT_MAT-PRECIOSINIMP WHERE Modelo = :IT_MAT-MODELO
ENDEXEC.
ENDLOOP.
This give me sy-subrc = 0
When I Try to update several fields doesnt works, any would can help me ?.
LOOP AT IT_MAT.
EXEC SQL.
UPDATE Articulos SET PrecioSinImp = :IT_MAT-PRECIOSINIMP
Descripcion = :IT_MAT-DESCRIPCION
WHERE Modelo = :IT_MAT-MODELO
ENDEXEC.
ENDLOOP.
This give me dump SQL error 170.
2- BTW, I have to leave this report program in a job so the data would be updated once a day in a job, so I have to update the existing data and add new one.
I Was thinking doing something like this.
LOOP AT it_table.
UPDATE DQL TABLE
IF sy-subrc <> 0.
INSERT DQL TABLE
ENDIF.
ENDLOOP.
This may works ??? because if this not work, I have to select single each one of the data in the SQL table, if it was founded UPDATE otherwise INSERT. And I dont like this aproach.
ThxHi Rodrigo,
I feel that your requirement is as below:
Depending on the criteria in the where clause, check whether the record exists or not.. If it does, then update the record with new values, else, create a new record..
You can do the same as below:
LOOP AT it_mat INTO e_mat. (e_mat of same structure as it_mat)
MOVE : xxx TO e_mat-yyy... and so on (Only change the non-key values)
MODIFY dbtable FROM e_mat.
ENDLOOP.
This code will create a new record if a record with the given key values in e_mat is not found, else, it will update the existing record with the new non-key values in the structure e_mat.
Thanks and Best Regards,
Vikas Bittera.
<b><REMOVED BY MODERATOR></b>
Message was edited by:
Alvaro Tejada Galindo
Maybe you are looking for
-
Robot class and positioning the cursor
I have an application where I have a number of panels on the screen and using an editable field wish to enter coordinates to position the Cursor to on another panel. ie, using grid coordinates on a map. Using the robot class I am able to position the
-
Logo printing issue in Smartform
Hi, I have uploaded company logo and i am using this logo in my Z*PO smart form, during printpreview it is showing correctly (the alignment and resolution), if i print that, the logo alignment is not proper, it is coming down than what i am aligned,
-
WARNING ON CS5 INDESIGN!!! - CS5 - InDesign Database error -
I worked on an ID CS5 file yesterday and saved to our Mac OS X 10.6.3 server. This morning I tried opening the file to make some corrections and InDesign crashed. I tried opening the file again and my document opened - but then gave me this error...
-
Get row(id) of changed inputfield of a table
I have an inputfield in a tablecolumn of a table. If this field of a row is changed by a user I want save the change. Is it possible to get the position of the changed field although the row is not selected. Therefore the lead-selection doesn't help.
-
Controlling external programs from Java
Hi, I try to invoke an external command-line program in Windows 2000 fron Java. I do this by Process proc = Runtime.getRuntime().exec(cmd); cmd is a String representing a command. For instance I try to control the gnupg program by "cmd /c C:\\gnupg\\