Home » Infrastructure » Windows » How to manually deploy .NET function to database? (Oracle 21c XE, Windows 10)
How to manually deploy .NET function to database? [message #685497] Tue, 25 January 2022 06:16 Go to next message
win32nipuh
Messages: 2
Registered: January 2022
Junior Member
I am testing .NET functions/procs creating.
I have created the small function in VS2019. How can I deploy it to my XE pdb?
When I do it via VS2019->Deploy project then I cannot connect to the database because of
ORA-01017: Invalid username/password; logon denied.
But the same user/pwd can connect on the same workstation in SQL Developer.
Finally I want to deploy the .NET function manually.
What should I do?
Re: How to manually deploy .NET function to database? [message #685502 is a reply to message #685497] Tue, 25 January 2022 09:54 Go to previous messageGo to next message
win32nipuh
Messages: 2
Registered: January 2022
Junior Member
I have found a script and how to manually deploy
1. copy dlls to '$ORACLE_HOME\bin\clr\'
2. Execute
CREATE OR REPLACE LIBRARY PROJECT1_DLL AS '$ORACLE_HOME\bin\clr\Project1.dll';
GRANT EXECUTE ON PROJECT1_DLL TO SCART;
GRANT EXECUTE ON DBMS_CLRTYPE TO PUBLIC;
GRANT EXECUTE ON DBMS_CLRPARAMTABLE TO PUBLIC;
CREATE OR REPLACE FUNCTION SCART.GETMENGEVIAID(LOGID BINARY_INTEGER) RETURN BINARY_INTEGER;
This statement gives an error:
Function GETMENGEVIAID compiled

LINE/COL ERROR
--------- -------------------------------------------------------------
0/0 PLS-00378: invalid compilation unit for this release of PL/SQL
Errors: check compiler log

What is incorrect? how to fix it?
Re: How to manually deploy .NET function to database? [message #685505 is a reply to message #685502] Tue, 25 January 2022 10:51 Go to previous message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Description: invalid compilation unit for this release of PL/SQL
Cause: A compilation unit is a file containing PL/SQL source code that is 
       passed to the compiler. Only compilation units containing blocks, 
       declarations, statements, and subprograms are allowed. This error 
       occurs when some other language construct is passed to the compiler.
Action: Make sure the compilation unit contains only blocks, declarations, 
        statements, and subprograms. 
CREATE OR REPLACE FUNCTION SCART.GETMENGEVIAID(LOGID BINARY_INTEGER) RETURN BINARY_INTEGER;
The code is missing.

[Updated on: Tue, 25 January 2022 10:53]

Report message to a moderator

Previous Topic: DB Console does not start
Next Topic: problem installing oracle data access per .net
Goto Forum:
  


Current Time: Thu Mar 28 17:02:41 CDT 2024