Oracle SQL template to create re-usable DDL/DML Scripts for Oracle database

Hi,
I have a requirement to put together a Oracle SQL template to create re-usable DDL/DML Scripts for Oracle databases.
Only the Oracle DBA will be running the scripts so permissions is not an issue.
The workflow for any DDL is as follows:-
1) New Table
a. Check if the table exists from the system/admin views.
b. If table exists then give message "Table Exists"
c. If table does not exist then execute DDL code
2) Add Column
a. Check if Column exists for a given table from system/admin views
b. If column exists in the specified table,
b1. backup table.
b2. alter table to make changes to the column
b3. verify data or execute dml script convert from backup to the new change.
c. If Column does not exist
c1. backup table
c2. alter table to add column
c3. execute dml to populate column with default value.
The DML scripts are for populating base tables with data required for business operations.
3) Add new row
a. check if row exists by comparing old values of each column with new values to be added for the new record.
b. If exists, give message row exists
c. If not exists, add new record.
4) Update existing record (We have createtime columns in these tables so changes can be tracked)
a. check if row exists using primary key.
b. If exists,
b1. deactivate the record using the "active" column of the table
b2. Add new record with the changes required.
c. If does not exist, add new record with the changes required.
Could you please help with some ideas which can get this done accurately?
I have tried several ways, but I am not able to put together something that fulfills all requirements.
Thank you,

First let me address your question. (This is the easy part.)
1. The existence of tables can be found in DBA_TABLES. Query it and and then use conditional logic and execute immediate to process the DDL.
2. The existence of table columns is found in DBA_TAB_COLUMNS. Query it and then conditionally execute your DDL. You can copy the "before picture" of the table using that same dba view, or even better, use DBMS_METADATA.
As for your DML scripts, they should be restartable, reversible, and re-run-able. They should "fail gracefully" on error, be written in such a way that they can run twice in a row without creating duplicate changes.
3. Adding appropriate constraints can prevent invalid duplicate rows. Also, you can usually add to the where clause so that the DML does only what it needs to do without even relying on the constraint (but the constraint is there as a safeguard). Look up the MERGE statement to learn how to do an UPSERT (update/insert), which will let you conditionally "deactivate" (update) or insert a record. Anything that you cannot do in SQL can be done with simple procedural code.
Now, to the heart of the matter...
You think I did not understand your requirements?
Please be respectful of people's comments. Many of us are professionals with decades of experience working with databases and Oracle technology. We volunteer our valuable time and knowledge here for free. It is extremely common for someone to post what they feel is an easy SQL or PL/SQL question without stating the real goal--the business objective. Experienced people will spot that the "wrong question" has been asked, and then cut to the chase.
We have some good questions for you. Not questions we need answers from, but questions you need to ask yourself and your team. You need to reexamine this post and deduce what those questions are. But I'll give you some hints: Why do you need to do what you are asking? And will this construct you are asking for even solve the root cause of your problems?
Then ponder the following quotations about asking the right question:
Good questions outrank easy answers.
— Paul Samuelson
The only interesting answers are those which destroy the questions.
— Susan Sontag
The scientific mind does not so much provide the right answers as ask the right questions.
— Claude Levi-Strauss
You can tell whether a man is clever by his answers. You can tell whether a man is wise by his questions.
— Mahfouz Naguib
One hears only those questions for which one is able to find answers.
— Friedrich Nietzsche
Be patient towards all that is unresolved in your heart and try to love the questions themselves.
— Rainer Maria Rilke
What people think of as the moment of discovery is really the discovery of the question.
— Jonas Salk
Judge a man by his questions rather than his answers.
— Voltaire
The ability to ask the right question is more than half the battle of finding the answer.
— Thomas J. Watson

Similar Messages

  • 404 error when downloading Oracle SQL Developer 2.1 (2.1.0.63.73) for Mac

    Greetings,
    I'm getting a 404 error when I try to download the Mac OS X version of Oracle SQL Developer. The download page is at
    http://www.oracle.com/technology/software/products/sql/index.html
    And it links to the Mac version at:
    http://download.oracle.com/otn/java/sqldeveloper/sqldeveloper-2.1.0.63.73-macosx.tar.gz
    Which doesn't exist.
    Is this the correct forum to report this problem?
    Thanks
    Mick

    I don't know what to say: I went to this link
    http://www.oracle.com/technology/products/database/sql_developer/index.html
    Clicked on Download in the upper right corner, re-accepted the whatever-they-wanted-me-to-accept and then the OSX download suddenly worked. Give it a spin and see if a circuit like that works for you.
    Good luck!

  • Test scripts for oracle applications using qtp testing tool

    hi
    i want some test scripts for oracle applications using qtp testing tool
    regards

    You will need to create separate scripts for Load testing. The functional scripts cannot be used in OLT. The exceptions to this would be the "General" items (Java Code Script & Web Services) which can also be used in OLT.
    e.g. Instead of selecting "Functional Testing - Oracle EBS/Forms"
    select "Load Testing (Protocol Automation) - Oracle EBS/Forms"
    Once you get into load testing you'll realise that you want to create very specific scripts and won't want to try re-using functional scripts. I know a lot of such tools are 'sold' on the fact that functional scripts can be re-used for load, but when it comes down to it you'll want to design your load scripts seperately anyway!

  • Rational Robot Test Scripts for Oracle Application Vanilla Instance

    Hi,
    Does anybody have Rational Robot Test Scripts for Oracle Applications Vanilla Instance. We are in the process of automating testing. But for the same, we need to have the test scripts for the standard functionalities/flows.
    Any help would be highly appreciated.
    kanjurm

    Hi;
    I belive there is no sch a script as you mention. Please log a SR for your request
    Regard
    Helios

  • Shell scripting for oracle DBs

    looking for good source for shell scripting for oracle DBs

    Just buy 'Classic Shell Scripting' and 'the Unix Desktop Reference' both published by O'Reilly and you have it all.
    But if you want a platform agnostic scripting language use Perl. Comes with Oracle.
    However both bash and kornshell are a lot easier compared to Perl.
    Sybrand Bakker
    Senior Oracle DBA

  • Can anybody provide AIX shell script for Oracle Apps R12 instance backup

    Hi
    Can anybody provide AIX shell script for Oracle Apps R12 instance backup? Manually, i am able to backup but i donot have shell script to schedule through crontab.
    Help me please.
    Thanks

    Rman can be used for Database, not for Application tier. Again, I assumed you are looking for a script to backup the database. For the application tier, you can simply do a filesystem backup.
    I still do not understand your concern? Is it about using crontab? If so, then check here --> man crontab <--

  • How to create a DSN (Data Source Name) for "Oracle 10g XE" on SUSE 10??

    Hii Friends,
    I am new Linux user.I installed SUSE Linux 10.2. I am planning to do my project on Linux with J2EE,Oracle technologies. I installed Oracle 10g Express Edition. But unfortunately i have no provider name for oracle in the Providers List in SUSE/Gnome Desktop/System/Data Access points/ dsn list. I am unable to understand what actually happened. Should i install any other libraries, or Odbc drivers (I mean aren't they not given by Oracle XE Setup, as in MS Windows XP) ? Any one please help me. I need this immediately.
    Waiting for a reply,
    Mahidhar Chaluvadi
    CS Engg. Student
    Vizag.

    I am planning to do my project on Linux with J2EE,Oracle technologies.You don't need to set up a DSN. Just use a JDBC connect string such as jdbc:oracle:thin:@localhost:1521:xe
    ~Jer

  • Running a oracle script for multible database on same server

    Hello friends
    I am thinking of creating a script in HP UX which will run a SQL script on multiple oracle in same server. I can do this for one oracle but i'm unable to do it for multiple database.
    I need to do newid oraSID user every time for diff. database .. can u suggest something..
    regards
    Ashish

    Hi Markus,
    Its not working .. When i run this script from my ID, it says SQLPLUS not found. see this .. i have created 1 sql file and 1 script file to call it with exporting ORACLE_HOME & ORACE_SID for one of the system E40.
    Can you suggest something ..
    er3asu82:(/tmp)(xchason)#ll /tmp/testsql.sql /tmp/testscr.dat
    -rwxrwxrwx   1 xchason    dba            109 Aug  9 11:10 /tmp/testscr.dat
    -rwxrwxrwx   1 xchason    dba             32 Aug  9 11:08 /tmp/testsql.sql
    er3asu82:(/tmp)(xchason)#cat /tmp/testsql.sql
    select * from v$instance;
    quit
    er3asu82:(/tmp)(xchason)#cat /tmp/testscr.dat
    #! /bin/ksh
    export ORACLE_HOME=/oracle/E40/102_64
    export ORACE_SID=E40
    sqlplus "/as sysdba" @testsql.sql
    er3asu82:(/tmp)(xchason)#/tmp/testscr.dat
    /tmp/testscr.dat[5]: sqlplus:  not found
    Again when i try to run this from other orasid, it does not work as well..
    er3asu82:oraq52 1> /tmp/testscr.dat
    Error 6 initializing SQL*Plus
    Message file sp1<lang>.msb not found
    SP2-0750: You may need to set ORACLE_HOME to your Oracle software directory
    thanks
    ashish

  • Test Scripts for Oracle Account Recievable app using QTP tool

    Hi
    Please send me some QTP sample Script for testing Oracle AR application
    Thanks

    You will need to create separate scripts for Load testing. The functional scripts cannot be used in OLT. The exceptions to this would be the "General" items (Java Code Script & Web Services) which can also be used in OLT.
    e.g. Instead of selecting "Functional Testing - Oracle EBS/Forms"
    select "Load Testing (Protocol Automation) - Oracle EBS/Forms"
    Once you get into load testing you'll realise that you want to create very specific scripts and won't want to try re-using functional scripts. I know a lot of such tools are 'sold' on the fact that functional scripts can be re-used for load, but when it comes down to it you'll want to design your load scripts seperately anyway!

  • Anybody who wants to create a  small and simple Script for me?

    Hi,
    I am kind of new to Mac and totally AppleScript illiterate, but maybe there is a kind soul amongst all of you that can create an "easy" script for me?
    Well, here it goes:
    Every time I boot up my iMac, two things happen, the first is that I programed the "System Preferences" window to open automatically and display the "Energy Saver" section on the "Sleep" sub-section, so far so good and the second thing is that no matter what I have tried to avoid it, the "Customize" window for a program named "Butler" opens also.
    Now for the request:
    I would like the "System Preference window which displays the Energy Saver section" to change from "Sleep" to "Options" and while being there(in options), to tick(select) AND UN-tick(Un-select) immediately after the "Automatically reduce the brightness of the display before display sleep" Option.
    After doing all of this, the window should be closed.
    Now, is it possible to create a Script that performs all of the above and besides closes the "Butler" window afterwards?
    I know I am asking too much, but I know too that maybe there is someone with a heart of gold and the sufficient knowledge to help me.
    Thanks a lot
    Enrique Diazruanova

    ... Every time I boot up my iMac, two things happen, the first is that I programed the "System Preferences" window to open automatically and display the "Energy Saver" section on the "Sleep" sub-section, so far so good and the second thing is that no matter what I have tried to avoid it, the "Customize" window for a program named "Butler" opens also ...
    From your initial post, it appears that you have the Butler application running and have used it to access one of the Energy Saver opptions already. I don't have that particular application or a laptop to test, but if you've gotten it to access one option it should be able to access another one.

  • How to Create EAR File by Ant Script for ADF Application

    Hi,
    I want to deploy my ADF Application by EAR.
    I refer this blog:- http://jdeveloperfaq.blogspot.com/2010/01/faq-10-how-to-configure-ojdeploy-as-ant.html
    From this I am able to make WAR file but not EAR file and I want it should be EAR
    Can anyone suggest me any script or any process.
    Jdev Ver:- 11.0.0.3
    Thanks in Advance.
    Ramit
    Edited by: Ramit on May 31, 2011 3:54 AM

    Hi All,
    I am not able to run the adf application.In log I found this error message.please help me to resolve this
    javax.faces.FacesException: javax.el.PropertyNotFoundException: Missing Resource in EL implementation: ???propertyNotReadable???
         at com.sun.faces.application.ApplicationImpl.createComponent(ApplicationImpl.java:261)
         at javax.faces.webapp.UIComponentELTag.createComponent(UIComponentELTag.java:222)
         at javax.faces.webapp.UIComponentClassicTagBase.createChild(UIComponentClassicTagBase.java:513)
         at javax.faces.webapp.UIComponentClassicTagBase.findComponent(UIComponentClassicTagBase.java:782)
         at javax.faces.webapp.UIComponentClassicTagBase.doStartTag(UIComponentClassicTagBase.java:1354)
         at org.apache.myfaces.trinidad.webapp.UIXComponentELTag.doStartTag(UIXComponentELTag.java:71)
         at oracle.adfinternal.view.faces.unified.taglib.layout.UnifiedPanelGroupLayoutTag.doStartTag(UnifiedPanelGroupLayoutTag.java:50)
         at oracle.jsp.runtime.tree.OracleJspBodyTagNode.executeHandler(OracleJspBodyTagNode.java:50)
         at oracle.jsp.runtime.tree.OracleJspCustomTagNode.execute(OracleJspCustomTagNode.java:261)
         at oracle.jsp.runtime.tree.OracleJspNode.execute(OracleJspNode.java:89)
         at oracle.jsp.runtimev2.ShortCutServlet._jspService(ShortCutServlet.java:89)
         at oracle.jsp.runtime.OracleJspBase.service(OracleJspBase.java:29)
         at oracle.jsp.runtimev2.JspPageTable.compileAndServe(JspPageTable.java:665)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:385)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:802)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:726)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:183)
         at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:523)
         at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:444)
         at weblogic.servlet.jsp.PageContextImpl.include(PageContextImpl.java:163)
         at weblogic.servlet.jsp.PageContextImpl.include(PageContextImpl.java:184)
         at oracle.adfinternal.view.faces.taglib.region.IncludeTag.__include(IncludeTag.java:440)
         at oracle.adfinternal.view.faces.taglib.region.RegionTag$1.call(RegionTag.java:153)
         at oracle.adfinternal.view.faces.taglib.region.RegionTag$1.call(RegionTag.java:128)
         at oracle.adf.view.rich.component.fragment.UIXRegion.processRegion(UIXRegion.java:503)
         at oracle.adfinternal.view.faces.taglib.region.RegionTag.doStartTag(RegionTag.java:127)
         at oracle.jsp.runtime.tree.OracleJspBodyTagNode.executeHandler(OracleJspBodyTagNode.java:50)
         at oracle.jsp.runtime.tree.OracleJspCustomTagNode.execute(OracleJspCustomTagNode.java:261)
         at oracle.jsp.runtime.tree.OracleJspClassicTagNode.evalBody(OracleJspClassicTagNode.java:87)
         at oracle.jsp.runtime.tree.OracleJspBodyTagNode.executeHandler(OracleJspBodyTagNode.java:58)
         at oracle.jsp.runtime.tree.OracleJspCustomTagNode.execute(OracleJspCustomTagNode.java:261)
         at oracle.jsp.runtime.tree.OracleJspClassicTagNode.evalBody(OracleJspClassicTagNode.java:87)
         at oracle.jsp.runtime.tree.OracleJspBodyTagNode.executeHandler(OracleJspBodyTagNode.java:58)
         at oracle.jsp.runtime.tree.OracleJspCustomTagNode.execute(OracleJspCustomTagNode.java:261)
         at oracle.jsp.runtime.tree.OracleJspClassicTagNode.evalBody(OracleJspClassicTagNode.java:87)
         at oracle.jsp.runtime.tree.OracleJspBodyTagNode.executeHandler(OracleJspBodyTagNode.java:58)
         at oracle.jsp.runtime.tree.OracleJspCustomTagNode.execute(OracleJspCustomTagNode.java:261)
         at oracle.jsp.runtime.tree.OracleJspClassicTagNode.evalBody(OracleJspClassicTagNode.java:87)
         at oracle.jsp.runtime.tree.OracleJspBodyTagNode.executeHandler(OracleJspBodyTagNode.java:58)
         at oracle.jsp.runtime.tree.OracleJspCustomTagNode.execute(OracleJspCustomTagNode.java:261)
         at oracle.jsp.runtime.tree.OracleJspClassicTagNode.evalBody(OracleJspClassicTagNode.java:87)
         at oracle.jsp.runtime.tree.OracleJspBodyTagNode.executeHandler(OracleJspBodyTagNode.java:58)
         at oracle.jsp.runtime.tree.OracleJspCustomTagNode.execute(OracleJspCustomTagNode.java:261)
         at oracle.jsp.runtime.tree.OracleJspClassicTagNode.evalBody(OracleJspClassicTagNode.java:87)
         at oracle.jsp.runtime.tree.OracleJspBodyTagNode.executeHandler(OracleJspBodyTagNode.java:58)
         at oracle.jsp.runtime.tree.OracleJspCustomTagNode.execute(OracleJspCustomTagNode.java:261)
         at oracle.jsp.runtime.tree.OracleJspNode.execute(OracleJspNode.java:89)
         at oracle.jsp.runtimev2.ShortCutServlet._jspService(ShortCutServlet.java:89)
         at oracle.jsp.runtime.OracleJspBase.service(OracleJspBase.java:29)
         at oracle.jsp.runtimev2.JspPageTable.compileAndServe(JspPageTable.java:665)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:385)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:802)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:726)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:175)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:524)
         at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:253)
         at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:410)
         at org.apache.myfaces.trinidad.context.ExternalContextDecorator.dispatch(ExternalContextDecorator.java:44)
         at org.apache.myfaces.trinidad.context.ExternalContextDecorator.dispatch(ExternalContextDecorator.java:44)
         at oracle.adfinternal.view.faces.config.rich.RecordRequestAttributesDuringDispatch.dispatch(RecordRequestAttributesDuringDispatch.java:44)
         at org.apache.myfaces.trinidad.context.ExternalContextDecorator.dispatch(ExternalContextDecorator.java:44)
         at org.apache.myfaces.trinidad.context.ExternalContextDecorator.dispatch(ExternalContextDecorator.java:44)
         at org.apache.myfaces.trinidad.context.ExternalContextDecorator.dispatch(ExternalContextDecorator.java:44)
         at org.apache.myfaces.trinidadinternal.context.FacesContextFactoryImpl$OverrideDispatch.dispatch(FacesContextFactoryImpl.java:267)
         at com.sun.faces.application.ViewHandlerImpl.executePageToBuildView(ViewHandlerImpl.java:469)
         at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:140)
         at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:189)
         at org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:193)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._renderResponse(LifecycleImpl.java:777)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:293)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:213)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:205)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:106)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
         at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:271)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:177)
         at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:175)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
         at java.security.AccessController.doPrivileged(Native Method)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
         at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
         at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)
         at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
         at java.security.AccessController.doPrivileged(Native Method)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
         at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
         at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)
         at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:136)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
         at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:528)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:176)
    thanks
    santosh

  • How to find the existing sql server backup plan/schedule is there a script for that?

    Friends,
    Is there a easy way to find out in SQLServer (for All DB's) what is the current backup plan/schedule ? is there a script for that?
    Thanks,
    Karthikeyan Jothi

    To check the database backup 
    Select
    SERVERPROPERTY('ServerName'),
    db.name,
    CONVERT(VARCHAR(10), b.backup_start_date, 103) + + convert(VARCHAR(8), b.backup_start_date, 14) backup_start_date,
    CONVERT(VARCHAR(10), b.backup_finish_date, 103) + + convert(VARCHAR(8), b.backup_finish_date, 14) backup_finish_date,
    case
    when (DATEDIFF(hour, b.backup_start_date, getdate())<24)then 'Success'
    when (DATEDIFF(hour, b.backup_start_date, getdate())>=24)then 'Failed'
    end Status,
    DATEDIFF(hh, b.backup_finish_date, GETDATE())BackupAgeInHours,
    (b.backup_size/1024/1024/1024 )BackupSize,
    case b.[type]
    WHEN 'D' THEN 'Full'
    WHEN 'I' THEN 'Differential'
    WHEN 'L' THEN 'Transaction Log'
    END Type,
    ISNULL(STR(ABS(DATEDIFF(day, GetDate(),(Backup_finish_date)))), 'NEVER')DaysSinceLastBackup
    FROM sys.sysdatabases db
    Left OUTER JOIN (SELECT * , ROW_NUMBER() OVER(PARTITION BY database_name ORDER BY backup_finish_date DESC) AS RNUM
    FROM msdb.dbo.backupset) b ON b.database_name = db.name AND RNUM = 1
    where dbid<>2
    OR
    SELECT
    DISTINCT
    a.Name AS DatabaseName ,
    CONVERT(SYSNAME, DATABASEPROPERTYEX(a.name, 'Recovery')) RecoveryModel ,
    COALESCE(( SELECT CONVERT(VARCHAR(12), MAX(backup_finish_date), 101)
    FROM msdb.dbo.backupset
    WHERE database_name = a.name
    AND type = 'd'
    AND is_copy_only = '0'
    ), 'No Full') AS 'Full' ,
    COALESCE(( SELECT CONVERT(VARCHAR(12), MAX(backup_finish_date), 101)
    FROM msdb.dbo.backupset
    WHERE database_name = a.name
    AND type = 'i'
    AND is_copy_only = '0'
    ), 'No Diff') AS 'Diff' ,
    COALESCE(( SELECT CONVERT(VARCHAR(20), MAX(backup_finish_date), 120)
    FROM msdb.dbo.backupset
    WHERE database_name = a.name
    AND type = 'l'
    ), 'No Log') AS 'LastLog' ,
    COALESCE(( SELECT CONVERT(VARCHAR(20), backup_finish_date, 120)
    FROM ( SELECT ROW_NUMBER() OVER ( ORDER BY backup_finish_date DESC ) AS 'rownum' ,
    backup_finish_date
    FROM msdb.dbo.backupset
    WHERE database_name = a.name
    AND type = 'l'
    ) withrownum
    WHERE rownum = 2
    ), 'No Log') AS 'LastLog2'
    FROM sys.databases a
    LEFT OUTER JOIN msdb.dbo.backupset b ON b.database_name = a.name
    WHERE a.name <> 'tempdb'
    AND a.state_desc = 'online'
    GROUP BY a.Name ,
    a.compatibility_level
    ORDER BY a.name
    To check the schedule you can try the below script
    https://gallery.technet.microsoft.com/SQL-Jobs-Complete-eabe0050
    --Prashanth

  • Regarding Preparation of Ant Scripts for Oracle BPM 10gR3

    Hi,
    Could you please provide any document so as to prepare the Ant Script for deployment of ALBPM projects(.exp files) on to the ALBPM Enterprise Server(StandAlone,J2EEWL). I found some threads in the forums but neither of them provides a consistent way to develop a ant script. Some or the other script provided in the forum is throwing some error when running on the command prompt.
    Regards,
    Abhishek

    Have you looked here?
    http://download.oracle.com/docs/cd/E13154_01/bpm/docs65/anttasks/index.html
    Take a look at the publish task.

  • PL/SQL block to create temporary table + load via cursor for loop

    Assume I have a table that contains a subset of data that I want to load into a temporary table within a cursor for-loop. Is it possible to have a single statement to create the table and load based on the results of the fetch?
    I was thinking something like:
    Declare CURSOR xyz is
    CREATE TABLE temp_table as
    select name, rank, serial number from
    HR table where rank = 'CAPTAIN'
    BEGIN
    OPEN xyz
    for name in xyz
    LOOP
    END LOOP
    What I see wrong with this is that the table would be created multiple times which is why this syntax is not acceptable. I'd prefer not to have to define the temporary table then load in two sepearte SQL statements and am hoping a single statement can be used.
    Thanks!

    What is the goal here?
    If you're just going to iterate over the rows that are returned in a cursor, a temporary table is unnecessary and only adds complexity. If you truly need a temporary table, you would declare it exactly once, at install time when you create all your other tables. You'd INSERT data into the temp table and the data would only be visible to the session that inserted it.
    Justin

  • Create mount point on Mac OS for Oracle 10g

    I am trying to install Oracle 10g on Mac OS. The current mount point is "/". But I want to create a mount point like "/u01" so that the Oracle home path will be /u03/app/oracle. The question is how to create this mount point /u01 on MAC OS? Please advise.
    Thanks
    S.

    Mount points are traditionally simple (and empty) directories.
    A directory becomes a mount point when it is used in the mount command. Typical *nix sequence is
    mkdir /u01
    mount <type information> <source disk> /u01 -o <options>
    What the docs are referring to is the Oracle (or Optimal) Flexible Architecture and the assumption is that you have additional drive partitions available. In that case
    mount -t ext3 /dev/sdb1 /u01
    would do the trick.
    In your case, assuming you have enough disk space on the root file system, and assuming this is not for a production environment, just stop at the 'mkdir /u01' and you;ll be fine. Then 'mkdir -p /u01/app/oracle' and 'chown -R oracle:oinstall /u01' so that you can use '/u01/app/oracle' as your ORACLE_BASE in the install, and '/u01/app/oracle/product/11.1.0/db_1' as the ORACLE_HOME (which will become the defaults if you set ORACLE_BASE=/u01/app/oracle before you start the installer)
    For a production system, it is generally insane to use one disk and put Oracle database & s/w on the root disk - 'eggs in one basket' kind-a thing.

Maybe you are looking for

  • Variavel de sistema no Crystal

    Como utilizo um campo variavel do sistema do SAP para o crystal Exemplo o campo de centro de Lucro numa Nota Fiscal de entrada. Estou fazendo um resumo da nota com todas retenções e impostos fretes e etc no crystal

  • Batch split issue --- vl31n

    While creating an Inbound delivery through Vl31n for a particular PO...there are some fields that need to be copied from PO to inbound delivery... i am trying to do that through the exit MV50AFZ1... The error arises when there is a batch split.... IF

  • Creating an embedded Konsole in KDE, need help with "Window Rules"

    Hey guys! I hate that my first post on here is asking for help, but here goes nothing: I've been working on creating an embedded konsole that sits on your desktop, without installing any 3rd party software. The konsole will have certain properties se

  • Enterprise Services and PI

    I am looking for some white papers / blogs on calling SAP Enterprise Services via PI. I would also like to get sdome idea of the following points: 1) A typical scenario using Enterprise Services 2) Is it possible to extend Enterprise Services as one

  • Cannot delete service pack in import queue

    Hi all, we restored our system and I want to apply some patches now. In SPAM I get an error that the queue is not empty. I checked STMS and found a support package stuck in the import queue which we tried to upload before we restored the system. I tr