Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to deploy .Net stored procedures ?

YounMay 24 2021 — edited May 24 2021

Hi community,
I have the following procedure written in .Net I'm trying to deploy to Oracle DB 18c

Public Class Class1
	Public Shared Function StoredProcedure1() As String
		Return "hi"
	End Function
End Class

I used Deploy feature on Visual Studio and the deployment was successful.
I configured TNSNames.ora as follows :

XE =
 (DESCRIPTION =
  (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
  (CONNECT_DATA =
   (SERVER = DEDICATED)
   (SERVICE_NAME = XE)
  )
 )

LISTENER_XE =
 (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))

ORACLR_CONNECTION_DATA =
 (DESCRIPTION =
  (ADDRESS_LIST =
   (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
  )
  (CONNECT_DATA =
   (SID = CLRExtProc)
   (PRESENTATION = RO)
  )
 )
EXTPROC_CONNECTION_DATA =
 (DESCRIPTION =
  (ADDRESS_LIST =
   (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
  )
  (CONNECT_DATA =
   (SID = PLSExtProc)
   (PRESENTATION = RO)
  )
 ) 

and Listener.ora as follows :

DEFAULT_SERVICE_LISTENER = XE

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
       (SID_NAME = PLSExtProc)
       (ORACLE_HOME = C:\app\Administrator\product\18.0.0\dbhomeXE)
       (PROGRAM = extproc)      
    )
   (SID_DESC =
      (SID_NAME = CLRExtProc)
      (ORACLE_HOME = C:\app\Administrator\product\18.0.0\dbhomeXE)
      (PROGRAM = extproc)
      (ENVS = "EXTPROC_DLLS=ONLY:C:\app\Administrator\product\18.0.0\dbhomeXE\bin\oraclr18.dll")
    )	
  )

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 172.101.34.51)(PORT = 1521))      
	  (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
	  (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
    )      	  
  )

I created OraClrAgnt using the default values :

oraclrctl.exe -new

The service was created successfully and running.
TNSNames.ora seems to be configured properly since when I check it using TNSPing the entries are resolved :

tnsping ORACLR_CONNECTION_DATA
tnsping EXTPROC_CONNECTION_DATA

However when using the procedure in SQL I'm getting the error : connection description for remote database not found.

select STOREDPROCEDURE1 from dual; 

ORA-02019: connection description for remote database not found
ORA-06512: at "SYS.DBMS_CLR", ligne 243
ORA-06512: at "SYS.DBMS_CLR", ligne 42
ORA-06512: at "SYS.DBMS_CLR", ligne 236
ORA-06512: at "SCHEMA.STOREDPROCEDURE1", ligne 6
02019. 00000 - "connection description for remote database not found"
Does anyone know how to solve that please ?
Thanks.

Comments

Srn87-Oracle

Hello,

    I am assuming you are trying to find out the costs of running oracle database on an AWS EC2 instance.

As far as i know,oracle database edition is free to use as long as it is used for non-production/non-commercial usages etc.Oracle licensing is not a straightforward topic and i doubt there is very little information in public domain on this.The licensing can be done based on many aspects,such as named users connecting to the db or based on db processors itself.Customer generally  has to work with Oracle sales to figure out a licensing plan that best suits their requirements.

Hence,I would suggest you to get in touch with your oracle sales representative who can give you the exact figures and conditions in terms of costing.

By the way,I think,running oracle on OCI could be far cheaper than running oracle on AWS EC2.

1 - 1

Post Details

Added on May 24 2021
1 comment
170 views