.NET Stored Proceedures: Reading Excel Files or Transferring SQL Server Tables into Oracle Tables - Deploying and testing Oracle based .NET CLR stored procedure using Visual Studio.NET
(Page 4 of 5 )
Once you complete all of the steps in the previous section, proceed with the following steps to deploy the .NET CLR based stored procedure using Visual Studio.NET.
- Press Ctrl+Alt+L to open “Solution Explorer.”
- Right click on “Sample2” project and select “Deploy.”
- Skip the welcome screen by clicking on “next.”
- Select the “data connection” you already created (you can even create a new connection by clicking on the “New Connection” button) and click “next.”
- In the next screen select the “Copy assembly and generate stored procedures” option and click “next.”
- Accept the defaults in the next screen and click “next.”
- Accept the defaults in the next screen and click “next.”
- Select all checkboxes in the “Available methods,” select “External” for security and click “finish.”
You need to select “External” as part of security, as we are trying to access “something outside” of the Oracle database. Thus it is considered to not be "safe." This is a bit different from what we saw in my first article.
I already introduced a way to test the stored procedure from within the Visual Studio.NET environment in my previous articles. To test the above stored procedure, I just proceed with iSQLPlus.
Open any browser and go to “http://server:port/isqlplus”. Provide “Username,” “password” and “connect identifier” according to your configuration and click “login.”
Once it opens workspace, just type the following code and press “execute."
Begin
readXL;
End;
That’s it. Actually, the above three lines are nothing but some simple PL/SQL statements, generally used to call (or execute) any stored procedure stored in the Oracle database.
Next: Understanding the .NET CLR Stored Procedure (working with SQL Server 2000 table) >>
More .NET Articles
More By Jagadish Chaterjee