# cd /etc/yum.repos.d
# mv ULN-Base.repo to ULN-Base.repo.old
# wget http://public-yum.oracle.com/public-yum-el5.repo
Open the public-yum-el5.repo file in a text-editor and change the enabled flag for the first repository to enabled=1
Examples, Annoyances and Peculiarities with Oracle, Java and BI Publisher
# cd /etc/yum.repos.d
# mv ULN-Base.repo to ULN-Base.repo.old
# wget http://public-yum.oracle.com/public-yum-el5.repo
select fk.owner, fk.table_name, fk.constraint_name, fkc.column_name
from all_constraints fk
, all_cons_columns fkc
where fk.owner = :owner
and fk.constraint_type = 'R'
and not exists ( select null
from all_indexes ind
where ind.index_name = fk.constraint_name
and ind.owner = fk.owner )
and fkc.owner = fk.owner
and fkc.table_name = fk.table_name
and fkc.constraint_name = fk.constraint_name
and not exists ( select null
from all_constraints pk
, all_cons_columns pkc
where pk.constraint_type = 'P'
and pk.owner = fk.owner
and pk.table_name = fk.table_name
and pkc.owner = pk.owner
and pkc.table_name = pk.table_name
and pkc.constraint_name = pk.constraint_name
and fkc.column_name = pkc.column_name )
order by owner, table_name, constraint_name;
CREATE TABLE ctas_test
( id NUMBER NOT NULL
, name VARCHAR2(30) NULL );
CREATE TABLE ctas_test_copy AS
SELECT * FROM ctas_test;
SELECT table_name, column_name, nullable
FROM all_tab_columns
WHERE table_name LIKE 'CTAS_TEST%'
ORDER BY table_name, column_name;
CREATE TABLE ctas_test_minus AS
SELECT * FROM ctas_test
MINUS
SELECT * FROM ctas_test;
SELECT table_name, column_name, nullable
FROM all_tab_columns
WHERE table_name LIKE 'CTAS_TEST%'
ORDER BY table_name, column_name;
public void bulkCreate(Collection<?> entities) {
// Open a Stateless Session (this doesn't have a persistence context cache and
// doesn't interact with any other second-level or query cache). Everything
// executed with a Stateless session results in an immediate SQL operation.
StatelessSession session = HibernateUtil.getSessionFactory().openStatelessSession();
session.beginTransaction();
Iterator<?> it = entities.iterator();
while (it.hasNext()) {
session.insert(it.next());
}
session.getTransaction().commit();
session.close();
}
$JBOSS_HOME/server/default/deploy
<server>
<mbean code="org.jboss.mail.MailService" name="jboss:service=Mail">
<attribute name="JNDIName">java:/Mail</attribute>
<attribute name="User">${username}@gmail.com</attribute>
<attribute name="Password">${password}</attribute>
<attribute name="Configuration">
<!-- A test configuration -->
<configuration>
<!-- Change to your mail server prototocol -->
<property name="mail.store.protocol" value="pop3" />
<property name="mail.transport.protocol" value="smtp" />
<!-- Change to the user who will receive mail -->
<property name="mail.user" value="${username}@gmail.com" />
<!-- Change to the mail server -->
<property name="mail.pop3.host" value="pop.gmail.com" />
<!-- Change to the SMTP gateway server -->
<property name="mail.smtp.host" value="smtp.gmail.com" />
<property name="mail.smtp.auth" value="true" />
<property name="mail.smtp.user" value="${username}@gmail.com" />
<property name="mail.smtp.password" value="${password}" />
<property name="mail.smtp.ssl.enable" value="true" />
<property name="mail.smtp.starttls.enable" value="true" />
<property name="mail.smtp.socketFactory.class"
value="javax.net.ssl.SSLSocketFactory" />
<!-- The mail server port -->
<property name="mail.smtp.port" value="465" />
<!-- Change the default address mail will be from -->
<property name="mail.from" value="${username}@gmail.com" />
<!-- Enable debugging output from the javamail classes -->
<property name="mail.debug" value="false" />
</configuration>
</attribute>
<depends>jboss:service=Naming</depends>
</mbean>
</server>
#!/bin/ksh
if [[ $1 = ?([+-])+([0-9]) ]]; then
echo "true";
else
echo "false";
fi
uuencode filename.txt.gz filename.txt.gz | mailx -s subject email_address
(cat message.txt; uuencode filename.txt.gz filename.txt.gz) | mailx -s subject email_address
(cat message.txt; uuencode filename01.txt.gz filename02.txt.gz && uuencode filename02.txt.gz filename02.txt.gz) | mailx -s subject email_address