I have a scenario where I need to send an email from my stored procedure in DB2.
However I have not been able to figure out any so far, apart from using Task Center or Query Patroller.
Can someone suggest me some pointers to this? I do not want to do it from any other language though. Thanks.
With 9.7, you can use the UTL_MAIL or UTL_SMTP built-in packages.
There is nothing built-in in DB2 to do that, like xp_sendmail in SQL Server.
You have to write your stored procedure in one of the hosted languages (Java, C++) and then use an API from that language to send the mail.
See this article on how to do it using Java.
Related
My objective is to email the data retrieved from Oracle PL/SQL Procedure. UTL_SMTP package has been disabled in my Office and I need to find an alternative way to do this.
It would be much appreciated If someone can guide me here.
Thanks,
Sekar
If UTL_SMTP is disabled, use UTL_MAIL instead.
Although, that's rather strange - you're required to send mails, but yet, package used to do that is disabled. How come?
I'm learning SQL. I've heard that it's not possible to get user input in SQL? How are login and sign-ups made then? I'd really like to know if I just heard wrong or if you have to use another language or something like that to get input. Please explain? Thanks.
SQL is a language that is used to communicate with relational databases. You cannot write a program in SQL, so you will have to use some other language for that. To interact with a database, use the database API of that language, which will allow you to send SQL statements to the database.
In my project I need to simulate social network community members and their activities. I think to represent the members as nodes and need to store the count of their postings, feedback etc. Can we store the data collected by executing tcl script into a database (PostgreSQL)? If yes can anyone explain how it is?
You could also use SQlite3, a much lighter alternative to a full Postgres installation.
see https://www.sqlite.org/tclsqlite.html
Try OpenACS - it's a social networking community software and is written using TCL and Postgresql (or Oracle if you prefer)
is there a way to connect to a postgreSQL Database? I've noticed that the PHP module doesn't have the postgres extensions and its not possible to load it dynamically.
Is there any other way? An external PHP scripts will be the worst solution.
Alex
I don't have direct experience with Tide, but reviewing their docs here are the places I would look:
Javascript-> PostgreSQL Is there a possibility of connecting postgreSQL directly to Javascript?
Python -> PostgreSQL, like psychopg.
If that fails, along with other similar languages, MAY be able to find another driver written fully in a language like this.
The PostgreSQL protocol is extensively documented and several implementations exist for it. You could probably adapt either the Javascript driver or implement in another language to give you a direct driver to PostgreSQL http://www.postgresql.org/docs/9.1/static/protocol-flow.html
I have to create an Xpage web application which directly inputs data in a PostgreSql database. I've never worked with a PostgreSql database so I have absolutely no idea on how to approach this.
The application will be used through a browser if that matters.
Any help would be highly appreciated.
or, if you do not want to use the extLib for this purpose only, take a look at http://www.eknori.de/2011-07-03/using-mysql-data-in-xpages/ The article describes, how to access MySQL, but you can use the same code even for PstGreSQL with the correct JDBC drive.
The article also contains a link to OpenNTF where you can download the full source code.
You need to use a JDBC connection to connect to PostgreSQL. Use the extension library. This library contains a demo application which connects to a sql database using JDBC. Please take a look at this question : How do I access SQL from XPages.