‎2006 Sep 20 7:34 PM
Need to connect from SAP 4.6 to SQL Server 2000.
Had written the following code. to connect to code to connect.
As well as made changes in the DBCON table.
DBMS: MSS
USER_NAME srvhadp
PASSWORD Password for setting up
the connection
to the database <pwd>/<pwd>
MSSQL SERVER=GRDSQL01 MSSQLDBNAME=SRA
and wrote this Z program to connect its giving the following runtime error
DBIF_DSQL2_CONNECTSTR_ERROR
REPORT ZDBCON .
EXEC SQL.
CONNECT TO 'GRDSQL01' AS 'V'
ENDEXEC.
EXEC SQL.
SET CONNECTION 'V'
ENDEXEC.
Please guide and help.
Regards,
Kamlesh
‎2006 Sep 20 7:37 PM
Hi
Is GRDSQL01 the connection name given in DBCON?
Regards,
Raj
‎2006 Sep 20 7:39 PM
‎2006 Sep 20 7:43 PM
Hi
Are these two servers (SAP and MSS) are in the same intranet?
Because, once i faced the same problem connecting to MSS server. Once they changed the network properties, i was able to successfully connect to MSS server.
Regards,
Raj
Message was edited by: Rajasekhar Dinavahi
‎2006 Sep 20 7:46 PM
I checked it. Its not changed.
what else can be the problem.what do u want me to check else.
‎2006 Sep 20 7:49 PM
Hi
In your case SRA is the MSS server name and the username and pwd are the one used to connect to that MSS server, am I right? Thats the way it should be.
Can you confir the same? Are you able to login to MSS server (SRA) using those credentials?
Regards,
Raj
‎2006 Sep 20 7:59 PM
‎2006 Sep 20 8:05 PM
Hi
Found the below exceptions. See if they make any sense.
Regards,
Raj
Exceptions
Catchable Exceptions
CX_SY_NATIVE_SQL_ERROR
Cause: Error during setup of a secondary database connection.
Runtime Error: DBIF_DSQL2_CONNECTERR
Cause: The specified secondary database connection is not entered in table DBCON.
Runtime Error: DBIF_DSQL2_CONNECTSTR_ERROR
Cause: Error during COMMIT or ROLLBACK to "DEFAULT" database connection.
Runtime Error: DBIF_DSQL2_DEFAULT_CR_ERROR
Cause: An internal error occurred during exection of Native SQL.
Runtime Error: DBIF_DSQL2_INTERNAL_ERROR
Cause: Incorrect environment variable in table DBCON for setup of connection to R/3- or an external database (multi-connect). At the beginning of the connection, the values of the environment variables are read from table DBCON and analyzed. This check showed that the values are longer than allowed or that environment variables for the connection setup are missing.
Runtime Error: DBIF_DSQL2_INVALENV_ERROR
Cause: Invalid interruption of a database selection. The cursor was closed.
Runtime Error: DBIF_DSQL2_INVALID_CURSOR:
Cause: The DSQL interface was called using invalid parameters. In the system log (SM21) you will find further explanations on these incorrect parameters.
Runtime Error: DBIF_DSQL2_INVALID_REQUEST
Cause: A data record with the specified key already exists.
Runtime Error: DBIF_DSQL2_KEY_ALREADY_EXISTS
Cause: The specified key was not found in the database.
Runtime Error: DBIF_DSQL2_KEY_NOT_FOUND
Cause: Another internal internal error occurred during COMMIT or ROLLBACK.
Runtime Error: DBIF_DSQL2_MIXED_CR_ERROR
Cause: An error occurred during COMMIT or ROLLBACK to a Native SQL database connection.
Runtime Error: DBIF_DSQL2_NATIVE_CR_ERROR
Cause: No storage space available for a Native SQL statement any longer.
Runtime Error: DBIF_DSQL2_NO_MEMORY
Cause: The database object already exists in the database. There was an attempt to create a database object (table, view, index, ...) in the database. This oject, however, already exists.
Runtime Error: DBIF_DSQL2_OBJ_EXISTS
Cause: You worked with the name of a table or a view that does not exist in the database.
Runtime Error: DBIF_DSQL2_OBJ_UNKNOWN
Cause: There is an SQL error during execution of a Native SQL command.
Runtime Error: DBIF_DSQL2_SQL_ERROR
Cause: The database interface gave an unexpected return code.
Runtime Error: DBIF_DSQL2_UNEXPECTED_CODE
Cause: The maximum number of secondary database connections has been exceeded.
Runtime Error: EXSQL_CONNECTION_LIMIT
Cause: The maximum number of cursors has been exceeded.
Runtime Error: EXSQL_DSQL_CURSOR_LIMIT
‎2006 Sep 20 8:15 PM
Cause: Error during setup of a secondary database connection.
Runtime Error: DBIF_DSQL2_CONNECTERR
I had got this error. what do u mean by secondary database.
‎2006 Sep 20 8:29 PM
Hi
All databases other than SAP's own come under secondary databases.
To access these secondary databases, you create DBCON entries (Database connection), through which you connect to them.
Did u do a 'Test Connection' from within SAP(Trxn DBCA)?
Regards,
Raj
‎2006 Sep 20 9:04 PM
hi Raj
DBCA is a table or a transaction. I tried it in se11, se16.
plus I suppose I would need more guidance from u.
‎2006 Sep 20 9:26 PM
Hi
dbca is a transaction.
give me your mailid...will mail u the document i have.
Regards,
Raj
‎2006 Sep 20 9:34 PM
‎2006 Sep 20 10:21 PM
‎2006 Sep 21 4:18 PM
Hi Raj,
I am still not being able to get the connection done. does the basis guy need to do anything into it.
I request you to please also mail me the document which u were suppose to send.
‎2006 Sep 22 2:13 PM
Hi,
I have the same error and can't manage to connect to my MSSQL Server from SAP (ECC5 640 / NT / Oracle database).
Moreover, I tried DBCA transaction and it doesn't exist. Can you please forward your document to me ? and explain to me how to check what is wrong (DBCO, RFC, TCP/IP...) ?
Mail: avanpeene@fiveslille.com
Thanks,
Arni