Jdbc creation using ANT
Hi All,
If any one knows the ANT Script to create datasource along with jndi name plz let me know...Plz ASAP
Thanks in Advance,
:)
I didnt used ORADIM in the script. here is the script that I am using .
<target name="create-db-oracle" >
<echo>creating database ([${database.name}])</echo>
<exec dir="${target.script.dir}" executable="sqlplus" output="${target.log.dir}/create-db.log" failonerror="true">
<arg line="/nolog @create-db_${database.flavor}.sql" />
</exec>
</target>
with following connection properties
<properties>
<db.version>1.0</db.version>
<liquibase.remote.db.prompt>true</liquibase.remote.db.prompt>
<db.migrate>all</db.migrate>
<database.driver>oracle.jdbc.driver.OracleDriver</database.driver>
<database.url>jdbc:oracle:thin:@${database.host}:${database.port}/${database.name}</database.url>
<database.user>santosh</database.user>
<database.schema.user>project</database.schema.user>
<database.admin.user>system</database.admin.user>
<database.flavor>oracle-11g</database.flavor>
<database.name>dcm</database.name>
</properties>
<properties>
<database.host>localhost</database.host>
<database.port>1521</database.port>
<database.password>A_Pass123</database.password>
<database.schema.password>projectpassword</database.schema.password>
<database.admin.password>oracle#</database.admin.password>
</properties>
Edited by: user548284 on Jan 12, 2011 5:56 PM
Similar Messages
-
Database creation using ant/maven/liqubase
Dear ALL:
I am creating the database instance using the ant/maven scripts and following are the things I tried but some how it is not creating the database.
I have installed the 64bit oracle 11gR2 on windows 7 and configured the default database (ORCL). after installation I opened up the command prompt and tried sqlplus and it get connected and I can see the tables. However when I tries to do it using the build script it fails. Following are few things I tried out.
I plan to created 'orcl as the database with sid=orclusing the ant command 'ant -Denv=dev clean create-db -d' but it failed saying orcl is already running and you need to shut down it and I think it is expected because I am creating the database named orcl which is already created. Then I changed database name to dms and sid=dms then it throws error that you cant connect to the server with following error.
SQL*Plus: Release 11.2.0.1.0 Production on Wed Jan 12 16:17:11 2011
Copyright (c) 1982, 2010, Oracle. All rights reserved.
ERROR:
ORA-12560: TNS:protocol adapter error
SP2-0640: Not connected
ORA-12560: TNS:protocol adapter error
more information about listener: the output of - lsnrctl stat
LSNRCTL for 64-bit Windows: Version 11.2.0.1.0 - Production on 12-JAN-2011 16:18:04
Copyright (c) 1991, 2010, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
STATUS of the LISTENER
Alias LISTENER
Version TNSLSNR for 64-bit Windows: Version 11.2.0.1.0 - Production
Start Date 12-JAN-2011 16:16:51
Uptime 0 days 0 hr. 1 min. 13 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File C:\oracle\santosh\product\11.2.0\dbhome_1\network\admin\listener.ora
Listener Log File c:\oracle\santosh\diag\tnslsnr\unknown\listener\alert\log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1521ipc)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))
Services Summary...
Service "CLRExtProc" has 1 instance(s).
Instance "CLRExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "orcl" has 1 instance(s).
Instance "orcl", status READY, has 2 handler(s) for this service...
Service "qc_dms" has 1 instance(s).
Instance "qcdms", status READY, has 1 handler(s) for this service...
Service "qcdmsXDB" has 1 instance(s).
Instance "qcdms", status READY, has 1 handler(s) for this service...
The command completed successfully
Can someone help me out ? how ever the same thing is working fine on the oracle virtual box running on ubuntu 10.04.
thank,
SantoshI didnt used ORADIM in the script. here is the script that I am using .
<target name="create-db-oracle" >
<echo>creating database ([${database.name}])</echo>
<exec dir="${target.script.dir}" executable="sqlplus" output="${target.log.dir}/create-db.log" failonerror="true">
<arg line="/nolog @create-db_${database.flavor}.sql" />
</exec>
</target>
with following connection properties
<properties>
<db.version>1.0</db.version>
<liquibase.remote.db.prompt>true</liquibase.remote.db.prompt>
<db.migrate>all</db.migrate>
<database.driver>oracle.jdbc.driver.OracleDriver</database.driver>
<database.url>jdbc:oracle:thin:@${database.host}:${database.port}/${database.name}</database.url>
<database.user>santosh</database.user>
<database.schema.user>project</database.schema.user>
<database.admin.user>system</database.admin.user>
<database.flavor>oracle-11g</database.flavor>
<database.name>dcm</database.name>
</properties>
<properties>
<database.host>localhost</database.host>
<database.port>1521</database.port>
<database.password>A_Pass123</database.password>
<database.schema.password>projectpassword</database.schema.password>
<database.admin.password>oracle#</database.admin.password>
</properties>
Edited by: user548284 on Jan 12, 2011 5:56 PM -
DataSource is getting created without desired JNDI Name using ANT task
Hi,
While referring to http://weblogic-wonders.com/weblogic/2010/07/24/datasource-creation-using-ant-task-wlconfig/ when we try to create a DataSource using ANT Task <taskdef name=”wlconfig” classname=”weblogic.ant.taskdefs.management.WLConfig”/>
We are unable to provide the Desired JNDI Name for our DataSource. It takes the DataSource Name itself as the JNDI Name of the DataSource. If we specify anyother JNDI Name then it doesnt reflect in the AdminConsole. But still the DataSource testing succeeds from the AmdinConsole.
Is there anything Missing in the Ant Script?
Thanks
Jay SenSharmaI think the attribute name should be JNDINames instead of JNDIName, this is also the name I always use in WLST (and is probably also used by wlconfig), for example,
videotheekDataSource = cmo.createJDBCSystemResource('VideotheekDataSource');
jdbcResource = videotheekDataSource.getJDBCResource();
names = ['jdbc/exampleDS'];
dataSourceParams = jdbcResource.getJDBCDataSourceParams();
dataSourceParams.setJNDINames(names);
Good luck and keep up the good work. -
JDBC Datasource creation via ANT doesn't expose the JNDI name
I'm using the wlconfig ANT task to create a Datasource (& JDBC connectionpool) on the weblogic server. The datasource is created fine, and I can test it using the console.
The problem is that the provided JNDI name isn't exposed in the JNDI tree. This seems to be related to the fact that the following element is generated in the config/jdbc/CP-PoolName-2164-jdbc.xml
<jdbc-data-source>
<name>PoolName</name>
<internal-properties>
*<property>*
*<name>LegacyType</name>*
*<value>1</value>*
*</property>*
When removing the LegacyType 1 property from the JDBC config xml, the JNDI name is exposed fine.
I've used the instructions located at [http://edocs.bea.com/wls/docs100/programming/ant_tasks.html] where an example of a JDBCConnectionPool creation is provided.
The 10.3 documentation doesn't include the example anymore, but I'm having the problem both on BEA Weblogic 10.0 and Oracle Weblogic 10.3
<wlconfig url="t3://localhost:7001" username="weblogic" password="weblogic">
bq. <query domain="base_domain" type="Server" name="AdminServer" property="adminserver"/>
bq. <create type="JDBCConnectionPool" name="MediumSecureOnlineNode1Pool" property="customPool1">
bq. bq. <set attribute="CapacityIncrement" value="1"/> \\ <set attribute="DriverName" value="oracle.jdbc.OracleDriver"/> \\ <set attribute="InitialCapacity" value="1"/> \\ <set attribute="MaxCapacity" value="10"/> \\ <set attribute="Password" value="pass"/> \\ <set attribute="Properties" value="user=username"/> \\ <set attribute="RefreshMinutes" value="0"/> \\ <set attribute="ShrinkPeriodMinutes" value="15"/> \\ <set attribute="ShrinkingEnabled" value="true"/> \\ <set attribute="TestConnectionsOnCreate" value="true"/> \\ <set attribute="TestConnectionsOnRelease" value="true"/> \\ <set attribute="TestConnectionsOnReserve" value="true"/> \\ <set attribute="TestTableName" value="SQL SELECT 1 FROM DUAL"/> \\ <set attribute="URL" value="jdbc:oracle:thin:@localhost:1521"/> \\ <set attribute="Targets" value="${adminserver}"/>
</create>
As we would like to automate the process of configuring our weblogic instances using ANT, is there a way to create JDBC datasources that don't have the LegacyType 1 element included in the config ?Curious if you were ever able to find a resolution to this issue?
I am facing the same thing now with our Ant scripts and WL10.3 connection pools/datasources.
I would like to either specify a different LegacyType or suppress it altogether. Any help would be appreciated.
Many thanks,
Steve -
Dynamic table creation using JDBC
hi all, i am working in JDBC and using prepared statements.the problem i have is i need to create and read from tables,dynamically and i should also create tables with keys dynamically,i.e the user gives the table name and i should create it using JDBC.the user does not enter the full query he just types the table name.i am using oracle as backend.i have tried prepared statements to retrieve datas from tables whose names r given dynamically like
"select * from ?"
and then using
setString(1,the variable which holds the table name);
but this doesnt seem to work.it says invalid table name.how can i do this.i shd also create tables the same way like
"create table ? ..."
is there a way out of this problem or is there any other type of statement that i can use.please give a detailed example.thanks in advance.Usually when I work with Oracle DBA's they get real excited when I suggest that the application could create the tables dynamically. Because this means that there is absolutely no chance that there is a coherent implemetation of table allocation.
Seemed like a good point to me. -
Error while Executing stored procedure using ant
Hi,
I am trying to execute a stored procedure using ant ..
My build.xml is like this...
<project name="myproject" default="db.build">
<target name="db.build">
<sql driver="oracle.jdbc.driver.OracleDriver"
url="jdbc:oracle:thin:@idm.orademo.com:1521:orcl"
userid="test"
password="oracle11g"
print="yes"
classpath="E:\\ojdbc14.jar"
src="E:\\upg_9102BP07.sql" />
<!--
<classpath>
<pathelement path=""\\>
<\\classpath> -->
</target>
</project>
I have my stored procedure in upg_9102BP07.sql as shown in above src..
When im executing ant cmd I got the following exception
E:\>ant -f test.xml
Buildfile: test.xml
db.build:
*[sql] Executing resource: E:\upg_9102BP07.sql*
*[sql] Failed to execute: declare cnt int*
BUILD FAILED
E:\test.xml:12: java.sql.SQLException: ORA-06550: line 1, column 15:
PLS-00103: Encountered the symbol "end-of-file" when expecting one of the following:
*:= . ( @ % ; not null range default character*
Total time: 44 seconds
I have no clue.. But this sql ran successfully when did manually..
Please help me in solving the issue...
-- MariasHere is my script bit lengthy...
Rem
Rem $Header: oim/server/Database/Oracle/Upgrade/Release91x/910x/List/9102_ddl_AddcolumnToRCE_Oracle.sql st_oim_devjain_bug-9003841/1 2009/10/09 02:24:19 devjain Exp $
Rem
Rem 9102_ddl_AddcolumnToRCE_Oracle.sql
Rem
Rem Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
Rem
Rem NAME
Rem 9102_ddl_AddcolumnToRCE_Oracle.sql - <one-line expansion of the name>
Rem
Rem DESCRIPTION
Rem Create a new column 'RCE_DELETE' in RCE table
Rem
Rem MODIFIED (MM/DD/YY)
Rem blaksham 09/30/09 - Created
Rem
declare cnt int;
Begin
Select Count(1) into cnt From User_Tab_Columns Where TABLE_NAME='RCM' And COLUMN_NAME='RCM_DELETE';
IF cnt=0 Then
Begin
Execute Immediate 'ALTER TABLE RCM ADD RCM_DELETE VARCHAR2(1)';
End;
Else
DBMS_OUTPUT.PUT_LINE('Column already exists in the DB');
End IF;
End;
Rem
Rem $Header: oim/server/Database/Oracle/Upgrade/Release91x/910x/List/9102_dml_odf_source_name.sql st_oim_devjain_bug-9003841/1 2009/10/09 02:44:45 devjain Exp $
Rem
Rem 9103_dml_odf_source_name.sql
Rem
Rem Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
Rem
Rem NAME
Rem 9103_dml_odf_source_name.sql - <one-line expansion of the name>
Rem
Rem DESCRIPTION
Rem <short description of component this file declares/defines>
Rem
Rem NOTES
Rem <other useful comments, qualifications, etc.>
Rem
Rem MODIFIED (MM/DD/YY)
Rem vpotukuc 09/17/09 - Bug8796435: Increase the size of odf_source-name
Rem vpotukuc 09/17/09 - Created
Rem
SET ECHO ON
SET FEEDBACK 1
SET NUMWIDTH 10
SET LINESIZE 80
SET TRIMSPOOL ON
SET TAB OFF
SET PAGESIZE 100
declare
collen NUMBER := 0;
begin
select char_length into collen from user_tab_columns where table_name = 'ODF' and column_name = 'ODF_SOURCE_NAME';
IF (collen < 400) then
execute immediate 'alter table ODF modify ODF_SOURCE_NAME varchar2(400)';
END IF;
END;
File name: 91_dml_update_reviewers_With_NoEmail_attestation.sql
Purpose: Modify the email template to replace the 'Delegated By Last Name' with 'Reviewer Last Name' and 'Delegated By User Id' to 'Reviewer User Id'.
Author: Babu Lakshamanaiah
Description: Modify the email template 'Attestation Reviewers With No E-mail Addresses Defined'
declare
cnt int;
begin
Select Count(1) into cnt From emd Where emd_name='Attestation Reviewers With No E-mail Addresses Defined' and emd_language='en' and emd_country='US';
IF cnt=0 Then
Begin
DBMS_OUTPUT.PUT_LINE('There is no record with emd_name Attestation Reviewers With No E-mail Addresses Defined ');
End;
Else
update emd set emd_body='The following attestation reviewers do not have email addresses defined. Attestation requests have been generated for these reviewers and can be accessed by loging in to Oracle Identity Manager. However, notification emails were not sent.' ||chr(10) || chr(10) ||
'Attestation process: <Attestation Definition.Process Name>' || chr(10) ||
'Attestation Request ID: request <Attestation Request.Request Id>' || chr(10) ||
'Request date: <Attestation Request.Request Creation Date>' || chr(10) || chr(10) ||
'Reviewers Without E-mail Address: <reviewers> ' || chr(10) ||
'<Attestation Task.Reviewer First Name> <Attestation Task.Reviewer Last Name> [<Attestation Task.Reviewer User Id>]' Where emd_name='Attestation Reviewers With No E-mail Addresses Defined' and emd_language='en' and emd_country='US';
End IF;
commit;
end;
Please help me out.....
--Marias -
WLST Domain Creation using JRF template throws SQLRecoverableException
I am working on domain creation using templates and included the JRF template to use OPSS functionality.
I have run the RCU utility to create the required components that will have necessary tables to host OPSS data and also tested that it works with CC_STB user that i will use to connect from WLS.
I am able to ping the database server having RCU components from the VM where i want to create and configure the domain but when i configure the LocalSvcTblDataSource with the same ip address and try to setup the OPSS datasources, it gives me "Internal Exception: java.sql.SQLRecoverableException: IO Error: Unknown host specified Error Code: 17002"
Below is my WLST python script:
#=======================================================================================
# Open a domain template.
#=======================================================================================
readTemplate("/u01/app/mw/Oracle_Home/wlserver/common/templates/wls/wls.jar")
#=======================================================================================
# Update the domain to enable the WebLogic Server domain with JRF and EM.
#=======================================================================================
addTemplate('/u01/app/mw/Oracle_Home/oracle_common/common/templates/wls/oracle.jrf_template_12.1.2.jar')
addTemplate('/u01/app/mw/Oracle_Home/em/common/templates/wls/oracle.em_wls_template_12.1.2.jar')
#=======================================================================================
# Configure the Administration Server and SSL port.
# To enable access by both local and remote processes, you should not set the
# listen address for the server instance (that is, it should be left blank or not set).
# In this case, the server instance will determine the address of the machine and
# listen on it.
#=======================================================================================
cd('Servers/AdminServer')
set('ListenAddress','')
set('ListenPort', 7001)
create('AdminServer','SSL')
cd('SSL/AdminServer')
set('Enabled', 'True')
set('ListenPort', 7002)
#=======================================================================================
# Define the user password for weblogic.
#=======================================================================================
cd('/')
cd('Security/base_domain/User/weblogic')
# Please set password here before using this script, e.g. cmo.setPassword('value')
cmo.setPassword('password')
#=======================================================================================
# Create and configure a JDBC Data Source, and sets the JDBC user.
#=======================================================================================
# Get RCU Configuration using RCU service table (STB) schema credentials
cd('/')
cd('JDBCSystemResource/LocalSvcTblDataSource/JdbcResource/LocalSvcTblDataSource')
cd('JDBCDriverParams/NO_NAME_0')
set('DriverName','oracle.jdbc.OracleDriver')
set('URL','jdbc:oracle:thin:@XX.XX.XX.XX:15210/xe')
set('PasswordEncrypted', 'password')
set('UseXADataSourceInterface', 'false')
cd('Properties/NO_NAME_0')
cd('Property/user')
cmo.setValue('CC_STB')
getDatabaseDefaults()
#=======================================================================================
# Write the domain and close the domain template.
#=======================================================================================
setOption('OverwriteDomain', 'true')
writeDomain('/u01/data/user_projects/domains/cc_domain')
closeTemplate()
#=======================================================================================
# Exit WLST.
#=======================================================================================
exit()
And the complete exception trace.
Internal Exception: java.sql.SQLRecoverableException: IO Error: Unknown host specified
Error Code: 17002
Error: writeDomain() failed. Do dumpStack() to see details.
wls:/offline/base_domain>dumpStack();
com.oracle.cie.domain.script.jython.WLSTException: com.oracle.cie.domain.script.ScriptException: Domain Creation Failed!
Domain Location: /u01/data/user_projects/domains/cc_domain
Reason: oracle.security.opss.tools.lifecycle.LifecycleException: oracle.security.jps.service.policystore.PolicyStoreException: javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.4.2.v20130514-5956486): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLRecoverableException: IO Error: Unknown host specified
Error Code: 17002
Exception:
oracle.security.opss.tools.lifecycle.LifecycleException: oracle.security.jps.service.policystore.PolicyStoreException: javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.4.2.v20130514-5956486): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLRecoverableException: IO Error: Unknown host specified
Error Code: 17002
at com.oracle.cie.domain.script.jython.CommandExceptionHandler.handleException(CommandExceptionHandler.java:55)
at com.oracle.cie.domain.script.jython.WLScriptContext.handleException(WLScriptContext.java:1967)
at com.oracle.cie.domain.script.jython.WLScriptContext.writeDomain(WLScriptContext.java:1126)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.python.core.PyReflectedFunction.__call__(Unknown Source)
at org.python.core.PyMethod.__call__(Unknown Source)
at org.python.core.PyObject.__call__(Unknown Source)
at org.python.core.PyInstance.invoke(Unknown Source)
at org.python.pycode._pyx5.writeDomain$15(/tmp/WLSTOfflineIni4846195865917165143.py:73)
at org.python.pycode._pyx5.call_function(/tmp/WLSTOfflineIni4846195865917165143.py)
at org.python.core.PyTableCode.call(Unknown Source)
at org.python.core.PyTableCode.call(Unknown Source)
at org.python.core.PyFunction.__call__(Unknown Source)
at org.python.pycode._pyx93.f$0(<console>:1)
at org.python.pycode._pyx93.call_function(<console>)
at org.python.core.PyTableCode.call(Unknown Source)
at org.python.core.PyCode.call(Unknown Source)
at org.python.core.Py.runCode(Unknown Source)
at org.python.core.Py.exec(Unknown Source)
at org.python.util.PythonInterpreter.exec(Unknown Source)
at org.python.util.InteractiveInterpreter.runcode(Unknown Source)
at org.python.util.InteractiveInterpreter.runsource(Unknown Source)
at org.python.util.InteractiveInterpreter.runsource(Unknown Source)
at weblogic.management.scripting.WLST.main(WLST.java:219)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at weblogic.WLST.main(WLST.java:29)
Caused by: com.oracle.cie.domain.script.ScriptException: Domain Creation Failed!
Domain Location: /u01/data/user_projects/domains/cc_domain
Reason: oracle.security.opss.tools.lifecycle.LifecycleException: oracle.security.jps.service.policystore.PolicyStoreException: javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.4.2.v20130514-5956486): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLRecoverableException: IO Error: Unknown host specified
Error Code: 17002
Exception:
oracle.security.opss.tools.lifecycle.LifecycleException: oracle.security.jps.service.policystore.PolicyStoreException: javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.4.2.v20130514-5956486): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLRecoverableException: IO Error: Unknown host specified
Error Code: 17002
at com.oracle.cie.domain.script.ScriptExecutor.runGenerator(ScriptExecutor.java:3706)
at com.oracle.cie.domain.script.ScriptExecutor.writeDomain(ScriptExecutor.java:991)
at com.oracle.cie.domain.script.jython.WLScriptContext.writeDomain(WLScriptContext.java:1117)
... 29 more
Caused by: com.oracle.cie.domain.security.external.ConfigSecurityException: oracle.security.opss.tools.lifecycle.LifecycleException: oracle.security.jps.service.policystore.PolicyStoreException: javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.4.2.v20130514-5956486): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLRecoverableException: IO Error: Unknown host specified
Error Code: 17002
at oracle.security.opss.tools.lifecycle.cie.OpssSecurityConfiguration.initializeSubsystem(OpssSecurityConfiguration.java:129)
at com.oracle.cie.domain.DomainGenerator.run(DomainGenerator.java:315)
at java.lang.Thread.run(Thread.java:744)
Caused by: oracle.security.opss.tools.lifecycle.LifecycleException: oracle.security.jps.service.policystore.PolicyStoreException: javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.4.2.v20130514-5956486): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLRecoverableException: IO Error: Unknown host specified
Error Code: 17002
at oracle.security.opss.tools.lifecycle.OpssDomainConfigImpl.checkIfFarmExists(OpssDomainConfigImpl.java:708)
at oracle.security.opss.tools.lifecycle.OpssDomainConfigImpl.configureDBSecurityStore(OpssDomainConfigImpl.java:339)
at oracle.security.opss.tools.lifecycle.OpssDomainConfigImpl.initializeSubsystem(OpssDomainConfigImpl.java:166)
at oracle.security.opss.tools.lifecycle.cie.OpssSecurityConfiguration.initializeSubsystem(OpssSecurityConfiguration.java:126)
... 2 more
Caused by: oracle.security.jps.service.policystore.PolicyStoreException: javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.4.2.v20130514-5956486): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLRecoverableException: IO Error: Unknown host specified
Error Code: 17002
at oracle.security.jps.internal.policystore.rdbms.JpsDBDataManager.processJPAException(JpsDBDataManager.java:2088)
at oracle.security.jps.internal.policystore.rdbms.JpsDBDataManager.init(JpsDBDataManager.java:955)
at oracle.security.jps.internal.policystore.rdbms.JpsDBDataManager.beginTransaction(JpsDBDataManager.java:1459)
at oracle.security.jps.internal.policystore.rdbms.JpsDBDataManager.beginTransaction(JpsDBDataManager.java:1455)
at oracle.security.jps.internal.common.rdbms.util.JpsDbBootstrapImpl.<init>(JpsDbBootstrapImpl.java:162)
at oracle.security.opss.tools.lifecycle.OpssDomainConfigImpl.checkIfFarmExists(OpssDomainConfigImpl.java:679)
... 5 more
Caused by: javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.4.2.v20130514-5956486): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLRecoverableException: IO Error: Unknown host specified
Error Code: 17002
at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:614)
at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.getDatabaseSession(EntityManagerFactoryDelegate.java:186)
at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.createEntityManagerImpl(EntityManagerFactoryDelegate.java:278)
at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:304)
at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:282)
at oracle.security.jps.internal.policystore.rdbms.JpsDBDataManager.getVersion(JpsDBDataManager.java:1027)
at oracle.security.jps.internal.policystore.rdbms.JpsDBDataManager.getEMFAndSubject(JpsDBDataManager.java:1124)
at oracle.security.jps.internal.policystore.rdbms.JpsDBDataManager.init(JpsDBDataManager.java:907)
... 9 more
Caused by: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.4.2.v20130514-5956486): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLRecoverableException: IO Error: Unknown host specified
Error Code: 17002
at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:324)
at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:319)
at org.eclipse.persistence.sessions.DefaultConnector.connect(DefaultConnector.java:138)
at org.eclipse.persistence.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:162)
at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:690)
at org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:215)
at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:554)
... 16 more
Caused by: java.sql.SQLRecoverableException: IO Error: Unknown host specified
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:465)
at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:546)
at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:232)
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:521)
at java.sql.DriverManager.getConnection(DriverManager.java:571)
at java.sql.DriverManager.getConnection(DriverManager.java:187)
at org.eclipse.persistence.sessions.DefaultConnector.connect(DefaultConnector.java:98)
... 20 more
Caused by: oracle.net.ns.NetException: Unknown host specified
at oracle.net.resolver.HostnameNamingAdapter.resolve(HostnameNamingAdapter.java:191)
at oracle.net.resolver.NameResolver.resolveName(NameResolver.java:133)
at oracle.net.resolver.AddrResolution.resolveAndExecute(AddrResolution.java:416)
at oracle.net.ns.NSProtocol.establishConnection(NSProtocol.java:687)
at oracle.net.ns.NSProtocol.connect(NSProtocol.java:247)
at oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:1109)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:316)
... 27 more
Any help/pointers/hints will be helpful
Thanks,
SantoshHi Micheal,
Thanks a Lot for your response.
We have checked the OS requirements :
System Itanium 11i (11.31) B.11.31.0803.318a Base Quality Pack Bundle for HP-UX 11i v3, March 2008+
Response:
======
We have the higher version installed for this quality pack.
QPKBASE B.11.31.1109.367a Base Quality Pack Bundle for HP-UX 11i v3, September 2011
2) Required Packages : HPDesktopDev (version B.11.31.01)
Response:
=======
This package is also installed.
X11MotifDevKit B.11.31.01 HP-UX Desktop Developer's Toolkit - X11, Motif, and Imake
3) Required Operating System Patches
PHKL_36248
PHKL_36249
PHSS_37202
PHSS_37501
PHCO_38050
PHSS_38139
Response:
========
We have the supersets for these patches installed. The installation logs also confirm these patches at the OS level.
Check Name:Patches
Check Description:This is a prerequisite condition to test whether the patches recommended for installing the product are available on the system.
Checking for PHKL_36248; found PHKL_36248. Passed
Checking for PHKL_36249; found PHKL_36249. Passed
Checking for PHSS_37202; found PHSS_37202. Passed
Checking for PHSS_37501; found PHSS_37501. Passed
Checking for PHCO_38050; found PHCO_38050. Passed
Checking for PHSS_38139; found PHSS_38139. Passed
Check complete. The overall result of this check is: Passed
Regards
Sumit Kapila -
How to deploy jar file in WLS using ant script
Hi,
Im trying to deploy a jar file in weblogic 10.3 using ant script and am running into the below error.
+[wldeploy] weblogic.management.DeploymentException: [J2EE:160177]The application at "/u01//RSJBObjects.jar" was not recognized as a valid application type. If this is an EAR file, please ensure the META-INF/application.xml exists. EJB-JARs should have a META-INF/ejb-jar.xml or corresponding annotations exist. If this is an exploded WAR, the name of directory must be end with ".war". RARs require a META-INF/ra.xml. A JMS deployment should be an XML file whose name ends with "-jms.xml". A JDBC deployment should be an XML file whose name ends with "-jdbc.xml". For other application types, please consult the WebLogic Server documentation.+
When i try to deploy the same manually from the console, i get a warning stating that WLS thought this as a library and hence proceeding to deploy as a library. After this warning the deployment continues and completes.
Problem is when i try to deploy using ant, it breaks at this point.
Is there any means that we can deploy a jar to WLS using ant script. This has to be deployed as a library as other apps would be using this jar.
Im unable to create a ear file for this single jar file.
If there is any suggestion on can this be done, please share.
Thanks,
Vijay.Hi Sunil,
Thanks for the reply, it worked.
Another doubt on the same lines. Now that the jar has been deployed as a library in WLS, when i try to deploy a WAR which refers to this deployed jar library, im unable to. I run into and error stating that the library is inaccessible.
I have to bounce the server and before doing that, i have to manually copy the library.jar from <WLS_domain>/servers/AdminServer/upload/ directory to <WLS_domain>/lib/ directory, once copied i then try to deploy the WAR, then the deployment goes fine.
Is there any means that this deployed library jar be made available soon after deployment and also to avoid copying the file.
Thanks,
Vijay. -
Creating Datasource in WLS 10.x using ant script
All,
We need to create datasource using ant script which uses wlconfig, has anyone done it before? tried the below script, it creates the datasource and connection pool seperately. In WLS 10.x the connection pool entries are part of the datasource itself but the script creating seperately.
<?xml version="1.0" encoding="windows-1252" ?>
<project name="deploy" default="all" basedir=".">
<!-- master build.properties -->
<property file="../../build/build.properties"/>
<property file="build.properties"/>
<echo> ${wls.home} </echo>
<echo> ${wls.url} </echo>
<path id="library.WL">
<pathelement location="${wls.home}/server/lib/weblogic.jar"/>
<pathelement location="${wls.home}/../modules/features/weblogic.server.modules_10.3.1.0.jar"/>
<pathelement location="${wls.home}/server/lib/webservices.jar"/>
<pathelement location="${wls.home}/../modules/org.apache.ant_1.7.0/lib/ant-all.jar"/>
<pathelement location="${wls.home}/../modules/net.sf.antcontrib_1.0.0.0_1-0b2/lib/ant-contrib.jar"/>
</path>
<taskdef name="wldeploy" classpathref="library.WL"
classname="weblogic.ant.taskdefs.management.WLDeploy"/>
<taskdef name="wlconfig" classpathref="library.WL"
classname="weblogic.ant.taskdefs.management.WLConfig"/>
<target name="init">
<wlconfig username="${server.user}" password="${server.password}"
url="${wls.url}">
<query domain="base_domain" type="Server" name="soa_server1" property="soaServer"/>
<query domain="base_domain" type="Server" name="soa_server1" property="soaServers"/>
<create type="JDBCConnectionPool" name="${pool.name}"
property="pool">
<set attribute="CapacityIncrement" value="1"/>
<set attribute="DriverName" value="${database.driver}"/>
<set attribute="InitialCapacity" value="1"/>
<set attribute="MaxCapacity" value="10"/>
<set attribute="Password" value="${database.password}"/>
<set attribute="Properties" value="user=${database.user}"/>
<set attribute="RefreshMinutes" value="0"/>
<set attribute="ShrinkPeriodMinutes" value="15"/>
<set attribute="ShrinkingEnabled" value="true"/>
<set attribute="TestConnectionsOnRelease" value="false"/>
<set attribute="TestConnectionsOnReserve" value="false"/>
<set attribute="URL" value="${database.connectString}"/>
<set attribute="Targets" value="${soaServer}"/>
</create>
<create type="JDBCTxDataSource" name="${datasource.name}">
<set attribute="JNDIName" value="${datasource.jndi.name}"/>
<set attribute="PoolName" value="${pool}"/>
<set attribute="Targets" value="${soaServers}"/>
</create>
</wlconfig>
</target>
<target name="deploy" depends="init"></target>
</project>
database.connectString=jdbc:rmi://localhost/jdbc:odbc:RoosterDSN
database.user=admin
database.password=admin
database.driver=org.objectweb.rmijdbc.Driver
datasource.jndi.name=jdbc/MsAccessDataSource
datasource.name=MsAccessDataSource
pool.name=MsAccessDataSourcePool
Was wondering if anybody has done it? please let me know if it's possible.
Thanks in advance..Hi Girish,
Please go through with below post.
http://rocksolutions.wordpress.com/2010/03/29/creating-a-connection-pool-using-ant-in-weblogic/
Let me know in case any issues observed.
Thanks -
Problem JDBC Connection using OCI Driver on Weblogic Portal on Linux
Hi Team,
I want a JDBC connection using OCI Driver in Weblogic Portal 8.1 sp4 on Linux. When I had tested using JDBC connection using Plain Java Code it is working. Also when I create the OCI Connection Weblogic Connection Pool it is working.
But My Requirement is to create the connection using Java Code in Portal Application
But When I create OCI connection in the code it is throwing NO SUITABLE DRIVER Found.
---------- Code in Plain Java Code ------------ Same code is used in Weblogic Portal Application --------------------------------
public static void main(String[] args) throws Exception{
Class.forName("oracle.jdbc.driver.OracleDriver");
DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
String url="jdbc:oracle:oci8:@TESTDB";
Properties props = new Properties();
props.put("user","scott");
props.put("password","tiger");
conn=DriverManager.getConnection(url,props);
When I am using the same code in Weblogic Portal and Deployed on Weblogic Portal Server 8.1 SP4 it is throwing following error.
-------------- Exception on Server Log --------------------
java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getConnection(Ljava.lang.String;Ljava.util.Properties;Ljava.lang.ClassLoader;)Ljava.sql.Connection;(Unknown Source)
at java.sql.DriverManager.getConnection(Ljava.lang.String;Ljava.util.Properties;)Ljava.sql.Connection;(Unknown Source)
My Environment is
LINUX
Weblogic 8.1 SP4
Oracle 9i Client on Same Machine
Oracle 10g Server on Different Machine
My Environment Variables on the Linux Server also set properly as following
PATH=/apps/pmaaum/ant/apache-ant-1.6.5/bin:.:/apps/beahomedev/jdk142_05/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/apps/oracle/ora9i/product/9.2.0/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/apps/oracle/ora9i/bin
LD_LIBRARY_PATH=/usr/lib:/apps/oracle/ora9i/product/9.2.0/lib:/apps/oracle/ora9i/product/9.2.0/lib32:/apps/oracle/ora9i/product/9.2.0/rdbms/lib:/usr/openwin/lib:/apps/oracle/ora9i/product/9.2.0/jdbc/lib
JAVA_HOME=/apps/beahomedev/jdk142_05
JDBC_LIB=/apps/oracle/ora9i/product/9.2.0/jdbc/lib
CLASSPATH=:.:/apps/beahomedev/jdk142_05/lib/rt.jar:/apps/oracle/ora9i/product/9.2.0/jdbc/lib/classes12.jar
Please help me, Let me know if you required anything.
Thanks in Advance
Vishnu
Edited by: vishnuk on Oct 23, 2009 4:07 AM
Edited by: vishnuk on Oct 23, 2009 4:10 AMHi Vishnu
Looks like a classloader issue. BEA class loader is very tricky. Any jar added manually in classpath, will end up loading only those classes. Any imports that we have in any of those classes do not get loaded. Anyhow, coming to your point, add classes12.jar inside your portal web project Web-Inf/lib folder and see if that helps. Usually thats where we put all the JARs for 8.1 SPxx applications. If this still breaks, then remove the jar from web-inf/lib folder and add under your portal app App-Inf/lib folder. First try with app-inf/lib folder having this jar. If not then with web-inf/lib. Basically web-inf is specific to that web app only. If you have a different app having this jdbc code, then put under app-inf/lib folder. Make sure that you remove the classes12.jar that you added in classpath either in env variable or in setdomainenv.cmd file.
When weblogic uses native OCI Drivers, it refers to jars at this location: ....\beawlp814\weblogic81\server\ext\jdbc\oracle\10g or 9g. Try using one of these jars and see if that works. Most of the times I used these jars only for oracle specific native drivers.
Word of caution. Try to use Connection Pool and a DataSource created in weblogic console for your jdbc code. This Datasource can still use the Oracle drivers that you want (instead of BEA Weblogic wrapper oci drivers) located in above location. Use JNDI Lookup and get Datasource and then connection. This is more recommended approach with many advantages then using DriverManager approach..
Goud -
I am trying to create tables using Ant build scripts for deployment purposes. I am able to create the schema and the sequences. It seems to be able to create tables except for triggers. I cannot create triggers after creating the tables. Ant displays an error whenever it reaches the part of a script which involves the trigger part. I am using the Oracle JDBC thin driver with Ant. Am I missing any files that should be included to support triggers? Is there a work-aorund? I appreciate the help...
Thanks!First of all, for me, this is a complete wrong approach. You should just issue a "drop table <your_tablename>;" and then look if it succeded or not. You can catch the exception and handle it, so the build will not fail.
If you really want do it with PL/SQL, then never do it the way you have tried to do it. Read the net about SQL injection.
Remember, dbms_output will write to an output buffer on the server, not on your client. The client had to read from the buffer.
set serveroutput on is a SQL*Plus command, it will fail if not issued there.
It would probably make sense to return a value, indicating if the command succeeded or not. So you could code something like:
SQL> get t
1 create or replace function sidd ( p_tablename in varchar2 ) return varchar2 as
2 begin
3 for rec in ( select table_name
4 from user_tables
5 where table_name = p_tablename
6 ) loop
7 begin
8 execute immediate 'drop table ' || rec.table_name;
9 dbms_output.put_line( 'table ' || rec.table_name || ' dropped.' );
10 return 'SUCCEEDED';
11 exception
12 when others then
13 dbms_output.put_line( 'table ' || rec.table_name || ' coud not be dropped.' );
14 return 'FAILED';
15 end;
16 end loop;
17 return 'FAILED';
18* end;
SQL> /
Function created.
SQL> exec :ret := sidd ( 'my_t1' );
PL/SQL procedure successfully completed.
RET
FAILED
SQL> exec :ret := sidd ( 'MY_T1' );
table MY_T1 dropped.
PL/SQL procedure successfully completed.
RET
SUCCEEDED
SQL> -
Hi,
I am using ant tasks wlserver and wlconfig to configure my weblogic server. while creating a connection pool as shown below
<target name="jdbcinfo">
<wlconfig password="weblogic"
username="weblogic"
url="${url}"
<query domain="mydomain" type="Server"
name="myserver" property="serverbean"
/>
<create type="JDBCConnectionPool"
name="jdbcpoolA"
property="jdbcPoolProp">
<set value="false"
attribute="ShrinkingEnabled"
<set value
attribute="
<set value="${serverbean}"
attribute="Targets"/>
The JDBCConnectionPool is created as long as I don't specified the attribute "Targets"
Once I add the target I get the following error
<JDBC> <BEA-001129> <Received exception while creating connection for pool "poolname" invalid arguments in call>
Please any help will be greatly appreciated.
ThanksIn your applicaion module configurations check if you are using 'JDBC URL' or 'JDBC DataSource'. You should use JDBC DataSource. Then make sure that your deployment descriptor (menu 'Application->Application Properties->Deployment) has the 'Auto Generate ...' checkbox set.
Timo -
Using Ant to execute WLST setAppMetadataRepository command
I am having a problem using Ant to execute the setAppMetadataRepository WLST command. This command puts an entry in adf-config.xml that points to the MDS datasource.
This is the ant task that I'm using. These commands work from the WLST tool, but when using them with Ant, I get the error below.
<target name="setAppMetadataRepositoryUsingWlst">
<wlst debug="true" failonerror="true">
<script>
archive = getMDSArchiveConfig(fromLocation='C:/ADE/michande_platSavedSearch/commsplatform/ri/dist/comms-ri.ear')
archive.setAppMetadataRepository(repository='mds-commsRepository',partition='riPartition', type='DB', jndi='jdbc/mds/commsRepository')
archive.save()
</script>
</wlst>
</target>Here is the error that I get (NameError: getMDSArchiveConfig). This is saying that getMDSArchiveConfig isn't a recognized command. Other commands (like connect(...)) work ok from ant, but not these MDS commands. Is this a bug or am I doing something wrong here?
[wlst] <WLSTTask> All lines will be trimmed by 12
[wlst] <WLSTTask> Line: archive = getMDSArchiveConfig(fromLocation='C:/ADE/michande_platSavedSearch/commsplatform/ri/dist/comms-ri.ear'). Final trim length: 12, String length: 124
[wlst] <WLSTTask> Line: archive.setAppMetadataRepository(repository='mds-commsRepository',partition='riPartition', type='DB', jndi='jdbc/mds/commsRepository') . Final trim length: 12,
String length: 147
[wlst] <WLSTTask> Line: archive.save(). Final trim length: 12, String length: 26
[wlst] <WLSTTask> The script that will be executed
[wlst] archive = getMDSArchiveConfig(fromLocation='C:/ADE/michande_platSavedSearch/commsplatform/ri/dist/comms-ri.ear')
[wlst] archive.setAppMetadataRepository(repository='mds-commsRepository',partition='riPartition', type='DB', jndi='jdbc/mds/commsRepository')
[wlst] archive.save()
[wlst]
[wlst] Error: Error executing the script snippet
[wlst] archive = getMDSArchiveConfig(fromLocation='C:/ADE/michande_platSavedSearch/commsplatform/ri/dist/comms-ri.ear')
[wlst] archive.setAppMetadataRepository(repository='mds-commsRepository',partition='riPartition', type='DB', jndi='jdbc/mds/commsRepository')
[wlst] archive.save()
[wlst]
[wlst] due to:
[wlst] Traceback (innermost last):
[wlst] File "<string>", line 1, in ?
{color:red} [wlst] NameError: getMDSArchiveConfig{color}
Thanks,
MikeNot all WLST installations are equivalent. Have a read of [http://www.oracle.com/technetwork/articles/adf/part10-085778.html]this, specifically the paragraph right after Figure 13 for something to try. Bottom line - the WLST that comes with the base WLS server install cannot do the MDS operations.
John -
Any way to create Execute Queues or set Load Order using ANT?
Hello All,
Does anyone know whether wlconfig or some other Ant tasks can be used
in order to automate the creation of specific Execute Queues? We'd like
to script and package this so as to avoid having the user configure
queues through the admin console.
I'd also like to find out if there is some way to set the application
Load Order through wlconfig or wldeploy.
I have looked at the WebLogic command reference here: http://e-
docs.bea.com/wls/docs81/admin_ref/ant_tasks.html but don't see anything
promising.
Am I missing something? I'm not too familiar with all the scripting
possibilities so any help would be much appreciated. We are using
WebLogic Server 8.1 SP3 on Windows and UNIX.
ThanksThanks Anilkumar, but I was trying to figure out how to create these using
Ant scripts and NOT the admin console which is what your link seems to be
pointing to.
<akari> wrote in message news:[email protected]..
Hi,
go through the following link,In that you will find information about how
to create execute Queues.
http://e-docs.bea.com/wls/docs81/perform/AppTuning.html#1105201
-----Anilkumar kari -
Can I use ant's api without using javascript ?
Can I use ant's api without using javascript and which tasks we cant do without javascript in ant's build file?
eq:
jar=project.createTask("jar");
jar.setDestFile(new java.io.File(project.getProperty("lib")+"/myJarFile.jar"));
jar.setBasedir(new java.io.File(project.getProperty("classes")));
jar.setIncludes(project.getProperty("GenericDirStructure")+"/**");
jar.setIncludes("META-INF/**");
jar.perform();
can I create above jar without using javascript i. e<script language="javascript"> in build.xml file.
Thanks,
ArchanArchana144 wrote:
hello georgemc
How to use ant's api without javascript in build.xml file because it gives error if I tries to do something like
project.createTak("echo").in build.xml..etc ..without including this in <script language="javascirpt">
And I cant use <jar> task directly because ..I want to crete multiple jar files depending on some configuration done in properties files..so I m doing this jar creation in loop.
Thanks,
Archan
Edited by: Archana144 on Aug 13, 2008 6:00 PMHave you read all the Ant documentation? The <script> task was only added in 1.7, before that, there was no using Javascript in build files
Maybe you are looking for
-
How can I change my e-mail on icloud to match my Apple id?
I have recently changed my phone and got a new Apple ID, unfortunately it keeps popping up to enter the password on i cloud for my old Apple id which I cant remeber..... how can i change it so its the same??
-
I am using an iMac and i am selling it tomorrow. So i am trying to back up all my files on my transcend external HD 500GB. I am not able to create a folder in the transcend and also even if I try to copy a file in the transcend folder. It just wont h
-
Hi Friends, I have done configuration for Balance Interest. When I am processing interest calculation for a vendor thru T.Code F.44, Batch Input Session is created. After processing the Batch Input Session without any errors, I find that no document
-
Performance appriasals -authorization objects
Hi all, Can anybody share with me all authorization objects of performance appraisals other then pernr ,hp_doc Regards, hema
-
Create table runs in Toad but not in Linux
Hello, I've just started writing in SQL 3 days ago so I would like to apologize in advance for the shabby code and the stupid question. I'm hoping that somebody can help me with my problem. Anyway, this has been bugging me for 2 days now and I can't