Username is null in DBA_AUDIT_TRAIL

Hello

During the monthly review of audit, I noticed column username as null for some records in DBA_AUDIT_TRAIL, these are not made to sys as SYSTEM events are recorded in the operating system * aud files.
Please let me know the possible reasons for username be set to null. There is no job database (dbms_scheduler or dba_jobs) in DB.

The OS usernameUsernameHost of the userName of the actionOwner of objName of the objReturn code
S/NVMCREATE TABLESALESMARKET_PRICE955
S/NVMDROP TABLESALESMARKET_PRICE0
S/NVMCREATE TABLESALESMARKET_PRICE0
S/NVMCREATE TABLESALESSALES_PRICE955
S/NVMDROP TABLESALESSALES_PRICE0
S/NVMCREATE TABLESALESSALES_PRICE0

PS: object modified and overview of host name

Thanks in advance for your time and help

Concerning

I thought that the entries were for impdp when table_exists_action = replace clause has been used.

Tags: Database

Similar Questions

  • Why the username is null V$ session?

    Hello

    I'm working on oracle XE installed on XP. Connected to the DB using SQL * more. When I ask what follows.

    Select the user name from V$ session;

    Output:

    Username
    SYS















    15 selected lines.

    Why it shows the values null for the username. I opened one time SQL * more. No other session or connection to the DB.

    can someone please suggest?

    Username is null for background processes http://download.oracle.com/docs/cd/B19306_01/server.102/b14220/intro.htm#sthref106

    Edited by: P. Forstmann on 16 September. 2010 19:05

  • problems with JAX - WS when you use security (e.g., username token profile)

    Hello
    I have a JAX - WS 2.1.5 deployed on weblogic 11g (10.3.1) with this policy:

    < wsp:UsingPolicy wssutil: required = "true" / >
    < wssutil:Id wsp = "Hdm-UserNameToken-Plain" >
    < ns1:SupportingTokens xmlns:ns1 = "http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200512" >
    < wsp >
    < ns1:UsernameToken ns1:IncludeToken = "http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200512/IncludeToken/AlwaysToRecipient" >
    < wsp >
    < ns1:WssUsernameToken10 / >
    < / wsp >
    < / ns1:UsernameToken >
    < / wsp >
    < / ns1:SupportingTokens >
    < / wsp >

    I have another web application as a client that uses a JAX - WS SOAP Manager to communicate with the web service
    and everything works fine when my client runs independently, i.e. in Eclipse (JDK 6) (anthentication traverse)

    My Manager handleMessage() method is shown here:
    public boolean handleMessage (SOAPMessageContext context) {}
    out final Boolean context.get (MessageContext.MESSAGE_OUTBOUND_PROPERTY) = (Boolean);
    If (outgoing)
    try {}
    Get the SOAP envelope
    final SOAPEnvelope envelope = context.getMessage () .getSOAPPart () .getEnvelope ();

    Header may or may not exist
    SOAPHeader header = envelope.getHeader ();
    If (header is nothing)
    Header = envelope.addHeader ();

    Add WSS Usertoken Element Tree
    final SOAPElement security = header.addChildElement ("security", "WSSE", "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd");
    final SOAPElement userToken = security.addChildElement ("UsernameToken", "WSSE");
    userToken.addChildElement ("Username", "wsse") .addTextNode (userName);
    userToken.addChildElement ("Password", "wsse") .addTextNode (password);

    }
    catch (exception-SOAPException ex) {}
    ex.printStackTrace ();
    Returns false;
    }

    Returns true;
    }

    but when I deploy the same client on weblogic server, it fails to communicate with my web service with this error:
    javax.xml.ws.soap.SOAPFaultException: failed to add the security for the identity, uri token = http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#UsernameToken token

    I noticed that Weblogic has a few packages to manage the security as:
    weblogic.wsee.security.unt.ClientUNTCredentialProvider
    weblogic.xml.crypto.wss.provider.CredentialProvider
    weblogic.xml.crypto.wss.WSSecurityContext

    So I added another mechanism using weblogic package to add the username password to SOAP header

    Map < String, Object > request = (proxy) .getRequestContext ((BindingProvider));
    If (connectInfo.get ("username")! = null & & connectInfo.get ("password")! = null) {}
    The list < CredentialProvider > credProviders = new ArrayList < CredentialProvider > ();
    client side UsernameToken credentials provider
    CredentialProvider cp = new ClientUNTCredentialProvider ((String) connectInfo.get ("username"),)
    ((String) connectInfo.get ("password"));
    credProviders.add (cp);
    Request.put (WSSecurityContext.CREDENTIAL_PROVIDER_LIST, credProviders);
    }

    It seems to be ok, but only for weblogic.

    I don't want to use weblogic propritery style in my client code, i.e. using API ClientUNTCredentialProvider, WSSecurityContext etc., because for the latter to use I would need to have the jar of Weblogic that would make me a more questions...

    Is it a matter the or am I missing something, please suggest how to add security to identity token in SOAPHeader without using the API specific Weblogic?

    I am happy that it worked, please check the pst that had helped so that it benefits others, I can only think of this solution. If you do not want to change the

    http://JAX-WS.Java.NET/articles/MessageContext.html
    http://tugdualgrall.blogspot.com/2009/02/JAX-WS-how-to-configure-service-end_17.html

    Kind regards
    Sunil P

  • What is the "best way" to see all the 'hooks' that affect the database?

    Hi all

    I'm responsible for exporting all schemas using the data pump and then re - import the scehmas, yet once so we can reorganize the real table spaces.

    I know that this can be done using grid 12 c, but I'm not sure I want to use this feature for this task.

    Anyone who has used the feature of grids to 'keep the tables' and then re - organize them while they are still online?

    I'll have to finally make it to the PROD database and I am concerned about the "break" out of jobs, items, ect, ect.

    What is the "best way" to do a proper verification of all database objects and or work, that the export/import might pipe upward?

    As I did for example, a simple count on all objects and of course excludes "SYS and SYSTEM" and the County was in close 60 000 objects.

    How do I know all 'hooks' that are inside the database? What is the way that do you?

    Thank you

    Lady Allora.

    Hi, Justin.

    I think that's what I'm going the way of...

    Select os_username, username, OWNER, dba_audit_trail SQL_TEXT

    where rownum<>

    where username <> 'SYSTEM '.

    and also have different variations all asking questions them the same point of view...

    Modes of verification do you find useful?

    Also I'm using something like this as well.

    Select "check standard", sessionid,

    proxy_sessionid statementid, entryid, extended_timestamp, global_uid,

    username, client_id, null, os_username, userhost, os_process, terminal,

    instance_number, owner, obj_name, null, new_owner,

    new_name, action, action_name, audit_option, transactionid, returncode,

    SNA, comment_text, sql_bind, sql_text,

    obj_privilege, sys_privilege, admin_option, dealer, priv_used,.

    ses_actions, logoff_time, logoff_lread, logoff_pread, logoff_lwrite,

    logoff_dlock, session_cpu

    Of

    dba_audit_trail

    where rownum<>

    order extended_timestamp;

    Thank you

    Lady Allora.

  • Audit of drop trigger instructions

    Hi all

    I want to review the status of any user drop trigger. I tested it by creating a generic user, a table and a trigger on the table. Then, I dropped the trigger and went to the notice of dba_audit_trail to check if there is no record this action. There is none.

    SQL> audit drop any trigger whenever successful;
    
    
    Audit succeeded.
    
    
    SQL> audit drop any trigger whenever not successful;
    
    
    Audit succeeded.
    
    
    SQL> create user test_trg identified by "test_trg123";
    
    
    User created.
    
    
    SQL> grant connect, resource, select_catalog_role to test_trg;
    
    
    Grant succeeded.
    
    
    SQL> conn test_trg/test_trg123
    Connected.
    SQL> create table t (id number primary key);
    
    
    Table created.
    
    
    SQL> create trigger test_trigger before insert on t for each row begin null; end;
      2  /
    
    
    Trigger created.
    
    
    SQL> drop trigger test_trigger;
    
    
    Trigger dropped.
    
    
    

    Then, I questioned the DBA_AUDIT_TRAIL and found no documents reflecting the DROP TRIGGER TEST_TRIGGER statement that I just executed.

    SQL> SELECT USERNAME, ACTION_NAME, TIMESTAMP FROM DBA_AUDIT_TRAIL WHERE ACTION_NAME NOT LIKE 'LOG%';
    
    
    USERNAME                       ACTION_NAME                  TIMESTAMP
    ------------------------------ ---------------------------- ---------
    SYSTEM                         DROP PUBLIC SYNONYM          26-FEB-15
    SYSTEM                         DROP PUBLIC SYNONYM          26-FEB-15
    SYSTEM                         CREATE PUBLIC SYNONYM        26-FEB-15
    SYSTEM                         CREATE PUBLIC SYNONYM        26-FEB-15
    

    Where is my mistake?

    Thank you.

    Martin

    You level DROP ANY TRIGGER, this been verified if TEST_TRG user deleted a trigger to another schema, not his own.

    turn on: trigger access check;

    -recreate the trigger in the test_trg schema

    -to connect with test_trg, put his own trigger

    -check the audit records

  • Support of cookie in OS5

    Please tell me the cookies are supported OS 5 via the document.cookie javascript property. From my experience, they don't work... anyone have experience here? Any official word?

    my experience in webworks is nothing problems when implementing cookies even the OS 5.

    Here's my javascript code functions that I always use to implement cookies and they work well:

    function getCookie(c_name)
    {
    if (document.cookie.length>0)
      {
      c_start=document.cookie.indexOf(c_name + "=");
      if (c_start!=-1)
        {
        c_start=c_start + c_name.length+1;
        c_end=document.cookie.indexOf(";",c_start);
        if (c_end==-1) c_end=document.cookie.length;
        return unescape(document.cookie.substring(c_start,c_end));
        }
      }
    return "";
    }
    
    function setCookie(c_name,value,expiredays)
    {
    var exdate=new Date();
    exdate.setDate(exdate.getDate()+expiredays);
    document.cookie=c_name+ "=" +escape(value)+
    ((expiredays==null) ? "" : ";expires="+exdate.toUTCString());
    }
    
    function checkCookie(c_name)
    {
    
    var username=getCookie(c_name);
    
    if (username != null && trim(username) != "")
      {
      return true;
      }
    else
      {
    
      if (username!=null && trim(username) != "")
        {
         return false;
        }
      }
    
    }
    
    function eraseCookie(name) {
        setCookie(name,"",-1);
    }
    
  • Consume Webservice - java.io.IOException: General socket error

    Hey,.

    I'm trying to consume a webservice ( www.webservicex.net, but also tried other forecasts) with a smart blackberry phone, but I still have a java.io.IOException.

    I generated stubs with the Java Wireless Toolkit 2.5.2. Now, I call the heel of the Java application.

    My MDS is running and are configured for use with my proxy. I can view each page with the built-in browser.

    The call of the stub works like this:

    public class BB_WeatherStart extends MainScreen {
    
       public BB_WeatherStart() throws RemoteException {
        com.weather.WeatherForecasts weather = null;
        WeatherForecastSoap_Stub stub = new WeatherForecastSoap_Stub();
        weather = stub.getWeatherByZipCode("10024");
    
        LabelField longi = new LabelField();
        longi.setText("Longitüde" + weather.getLongitude());
        add(longi);
    
        LabelField status = new LabelField();
        status.setText("Status" + weather.getStatus());
        add(status);
       }
    
    }
    

    The instantiation of the stub works, but the call of the method getWeatherByZipCode returns this exception.

    This is the code for the method:

    public com.weather.WeatherForecasts getWeatherByZipCode(java.lang.String zipCode) throws java.rmi.RemoteException {
    
       Object[] inputObject = new Object[1];
       inputObject[0] = zipCode;
    
       Operation op = Operation.newInstance(_qname_GetWeatherByZipCode, _type_GetWeatherByZipCode, _type_GetWeatherByZipCodeResponse);
       _prepOperation(op);
       op.setProperty(Operation.SOAPACTION_URI_PROPERTY, "http://209.162.186.60/GetWeatherByZipCode;deviceSide=true");
    
       Object resultObj;
       try {
          resultObj = op.invoke(inputObject);
       } catch (JAXRPCException e) {
        throw e;
       }
    
    //Snip.. the Rest of the method is never reached ;)
    
    }
    

    The Exception is thrown in the call to op.invoke (inputObject);

    I also tried the hostname instead of IP address, but then I get a j "" ava.io.IOException: bad DNS address "and if I try without the"; " deviceSide = true' I get the message "Local port: 19780 APN:"rim.net.gprs"APN username: password 'null' AFN: there is no connection"null"

    Thanks for your help

    Tina

    After watching a little I don't think that the original problem was with the connection I think it is related to a null value returned by the web service.  I generated a set of stubs from the web service, you were using and tried with the same result as you.  I got a version of 4.5 and made some settings (I don't specifically know who he was) and the error has become ' java.rmi.MarshalException: nillable not element of array in response type is not met. ".  Went up to version 4.7 and here it works very well.  If you run this with a test tool web service call, you see a null of WeatherData to the bottom element which is the likely culprit.  I read somewhere that BB do not have NULL values in some earlier versions.

    hope that helps.

    T

  • Redirect 302 get only when connected via BES loop

    Hello

    I have a problem when I am connected via BES, I get a server redirection loop (it returns a 302 with the originial URL response in the "location" header field). When it is connected via the BIS-B, WiFi or carrier, the server returns redirects as expected and the app works. However I require a BES connection and him give a priority when they are available.

    Note that I checked the connection returned by Networking.java string is correct (we add ";) (deviceside = false' when BES is to be using).

    Here's the network code I use:

    package [redacted]
    
    /*
     * Networking.java
     *
     * This code is based on the connection code developed by Mike Nelson of AccelGolf.
     * http://blog.accelgolf.com/2009/05/22/blackberry-cross-carrier-and-cross-network-http-connection
     *
     */
    
    import net.rim.device.api.system.CoverageInfo;
    import net.rim.device.api.system.DeviceInfo;
    import net.rim.device.api.system.WLANInfo;
    
    public class Networking
    {
        Networking()
        {
        }
    
    // Whether or not to the simulator should use MDS to connect.
    // By default this should be false, however if you are testing
    // in an environment where MDS will be the expected connection method,
    // set this to true to have the simulator attempt to use MDS.  This variable
    // has no effect on what happens on a real device.
        private static final boolean isMDS = false;
    
        // the timeout
        public static final int TIMEOUT = 30000;
    
        /**
         * Determines what connection type to use and returns the necessary string
         * to use it.
         *
         * @return A string with the connection info
         */
        public static String getConnectionString()
        {
    
            String connectionString = null;
    
            // Simulator behavior is controlled by the USE_MDS_IN_SIMULATOR variable.
            if (DeviceInfo.isSimulator())
            {
                if (isMDS)
                {
                    connectionString = ";ConnectionTimeout=" + TIMEOUT + ";deviceside=false";
                }
                else
                {
                    connectionString = ";ConnectionTimeout=" + TIMEOUT + ";deviceside=true";
                }
            }
    
            // Check for an MDS connection instead (BlackBerry Enterprise Server)
            else if ((CoverageInfo.getCoverageStatus() & CoverageInfo.COVERAGE_MDS) == CoverageInfo.COVERAGE_MDS)
            {
                System.out.println("MDS coverage found");
                connectionString = ";ConnectionTimeout=" + TIMEOUT + ";deviceside=false";
            }
    
            else if ((CoverageInfo.getCoverageStatus() & CoverageInfo.COVERAGE_BIS_B) == CoverageInfo.COVERAGE_BIS_B)
            {
                // otherwise, use the Uid to construct a valid carrier BIS-B request
                System.out.println("Using BIS");
                connectionString = ";ConnectionTimeout=" + TIMEOUT + ";deviceside=false;ConnectionType=[redacted]";
            }
    
            // Wifi is the preferred transmission method
            else if (WLANInfo.getWLANState() == WLANInfo.WLAN_STATE_CONNECTED)
            {
                System.out.println("Using WIFI");
                connectionString = ";interface=wifi";
            }
    
            // Is the carrier network the only way to connect?
            else if ((CoverageInfo.getCoverageStatus() & CoverageInfo.COVERAGE_DIRECT) == CoverageInfo.COVERAGE_DIRECT)
            {
    
                // Has carrier coverage, but not BIBS.  So use the carrier's TCP network
                System.out.println("Device is connected Direct");
                connectionString = ";ConnectionTimeout=" + TIMEOUT + ";deviceside=true";
    
            }
    
            // If there is no connection available abort to avoid bugging the user unnecssarily.
            else if (CoverageInfo.getCoverageStatus() == CoverageInfo.COVERAGE_NONE)
            {
                System.out.println("There is no available connection.");
            }
    
            // In theory, all bases are covered so this shouldn't be reachable.
            else
            {
                System.out.println("no other options found, assuming device.");
                connectionString = ";ConnectionTimeout=" + TIMEOUT + ";deviceside=true";
            }
    
            return connectionString;
        }
    }
    

    Here is sendRequest managed the connection method and the redirection:

    public HttpResponse sendRequest(HttpRequest request)
        {
            String url = request.getUrl();
            if (url == null)
            {
                HttpResponse result = new HttpResponse();
                result.responseCode = 404;
                result.responseMessage = "Not Found";
                return result;
            }
    
            ConnectionWrapper cw = connectionWrapperForRequest(request);
            if (cw == null)
            {
                return null;
            }
    
            boolean compressionEnabled = !request.disableCompression() && COMPRESSION_ENABLED;
    
            HttpResponse result = new HttpResponse();
            try
            {
                String finalURL = url.trim() + Networking.getConnectionString();
                cw.connection = (HttpConnection) Connector.open(finalURL, Connector.READ_WRITE, false);
                System.out.println("Connection string: " + Networking.getConnectionString());
                System.out.println("Full connec.  URL: " + finalURL);
    
                if (cw.connection == null)
                {
                    result.errorMessage = "Could not open a network connection.";
                    result.completedWithError = true;
                    return result;
                }
    
                cw.connection.setRequestMethod(request.getHttpMethod());
    
                if (compressionEnabled)
                {
                    cw.connection.setRequestProperty("Accept-Encoding", "gzip");
                }
    
                cw.connection.setRequestProperty("User-Agent",
                        "" + DeviceInfo.getManufacturerName() + "/" + DeviceInfo.getDeviceName() + "/" + Config.getVersionNumber());
                if (request.username() != null)
                {
                    cw.connection.setRequestProperty("Authorization", "Basic " + Utils.base64Encode(request.username() + ":" + request.password()));
                }
    
                // set this header so BES servers will not change the content of the headers
                cw.connection.setRequestProperty("x-rim-transcode-content", "none");
    
                //add cookies
                if (HttpCookieJar.getInstance().cookieCount() > 0)
                {
                    cw.connection.setRequestProperty("Cookie", HttpCookieJar.getInstance().getCookiesAsString());
                }
    
                //pull request headers from HttpRequest
    
                Hashtable headers = request.getHeaders();
                for (Enumeration e = headers.keys(); e.hasMoreElements();)
                {
                    String key = (String) e.nextElement();
                    cw.connection.setRequestProperty(key, (String) headers.get(key));
                }
    
                byte[] upstreamBytes = request.requestBytes();
                if (upstreamBytes != null && upstreamBytes.length > 0)
                {
                    Logger.getLogger().log(new String(upstreamBytes));
                    cw.connection.setRequestProperty(HttpProtocolConstants.HEADER_CONTENT_TYPE,
                            HttpProtocolConstants.CONTENT_TYPE_APPLICATION_X_WWW_FORM_URLENCODED);
                    cw.connection.setRequestProperty(HttpProtocolConstants.HEADER_CONTENT_LENGTH, String.valueOf(upstreamBytes.length));
                    cw.outputStream = cw.connection.openOutputStream();
                    cw.outputStream.write(upstreamBytes);
                }
    
                Logger.getLogger().log("Get response");
    
                result.responseCode = cw.connection.getResponseCode();
                result.responseMessage = cw.connection.getResponseMessage();
    
                Logger.getLogger().log("Status Code: " + result.responseCode);
                Logger.getLogger().log("Status Message: " + result.responseMessage);
    
                //suck out the cookies here
                int fieldNo = 0;
                String headerField;
                while ((headerField = cw.connection.getHeaderField(fieldNo)) != null)
                {
                    if (cw.connection.getHeaderFieldKey(fieldNo).equals("Set-Cookie"))
                    {
                        HttpCookieJar.getInstance().setCookie(headerField);
                    }
                    fieldNo++;
                }
    
                System.out.println("get redirect");
    
                //get redirect location
                String location;
                if ((location = cw.connection.getHeaderField("Location")) != null)
                {
                    if (location == url.trim())
                    {
                        Logger.getLogger().log("Redirect loop");
                    }
                    Logger.getLogger().log("Redirect: " + location);
                    result.redirectLocation = location.trim();
                }
                else
                    result.redirectLocation = null;
    
                byte[] buffer = new byte[HTTP_BUFFER_SIZE];
                int count;
    
                System.out.println("compression");
    
                cw.inputStream = cw.connection.openInputStream();
                if (compressionEnabled)
                {
                    String encoding = cw.connection.getEncoding();
                    if ("gzip".equalsIgnoreCase(encoding))
                    {
                        cw.inputStream = new GZIPInputStream(cw.inputStream);
                    }
                }
    
                cw.inputStream = new DataInputStream(cw.inputStream);
    
                System.out.println("output stream");
    
                ByteArrayOutputStream out = new ByteArrayOutputStream();
                try
                {
                    while ((count = cw.inputStream.read(buffer)) >= 0)
                    {
                        out.write(buffer, 0, count);
                    }
                    result.bytes = out.toByteArray();
                }
                finally
                {
                    out.close();
                }
                cw.close();
                Logger.getLogger().log("Response complete");
            }
            catch (IOException e)
            {
                result.errorMessage = e.getMessage();
                result.completedWithError = true;
                Logger.getLogger().log("ERROR!:" + e.getMessage());
            }
            finally
            {
                removeConnectionWrapper(cw);
            }
            return result;
        }
    

    Here's the whole HttpService.java for the context of the SendRequest method above:

    //#preprocess
    
    //package
    //imports
    
    public class HttpService
    {
        private static HttpService _instance;
    
        private static final boolean COMPRESSION_ENABLED = false;
        private static final int HTTP_BUFFER_SIZE = 1024;
    
        public static synchronized HttpService instance()
        {
            if (_instance == null)
            {
                _instance = new HttpService();
            }
            return _instance;
        }
    
        private WorkQueue _requestQueue = new WorkQueue(1024, 4);
        private Hashtable _connections = new Hashtable(10);
    
        private HttpService()
        {
            // singleton
        }
    
        private ConnectionWrapper connectionWrapperForRequest(HttpRequest request)
        {
            ConnectionWrapper cw = null;
            synchronized (request)
            {
                if (!request.cancelled())
                {
                    cw = new ConnectionWrapper(request);
                    synchronized (_connections)
                    {
                        _connections.put(request, cw);
                    }
                }
            }
            return cw;
        }
    
        private void removeConnectionWrapper(ConnectionWrapper cw)
        {
            synchronized (_connections)
            {
                _connections.remove(cw.request);
            }
            cw.close();
        }
    
        public void cancelRequest(HttpRequest request)
        {
            ConnectionWrapper cw = null;
            synchronized (request)
            {
                synchronized (_connections)
                {
                    cw = (ConnectionWrapper) _connections.remove(request);
                }
                request.setCancelled();
            }
            if (cw != null)
            {
                cw.close();
            }
        }
    
        public void executeRequest(final HttpRequest request)
        {
            _requestQueue.addWorkItem(new Runnable()
            {
                public void run()
                {
                    HttpResponse response = sendRequest(request);
                    if (!request.cancelled() && response != null)
                    {
                        request.completeRequest(response);
                    }
                };
            });
        }
    
        public HttpResponse sendRequest(HttpRequest request)
        {
            String url = request.getUrl();
            if (url == null)
            {
                HttpResponse result = new HttpResponse();
                result.responseCode = 404;
                result.responseMessage = "Not Found";
                return result;
            }
    
            ConnectionWrapper cw = connectionWrapperForRequest(request);
            if (cw == null)
            {
                return null;
            }
    
            boolean compressionEnabled = !request.disableCompression() && COMPRESSION_ENABLED;
    
            HttpResponse result = new HttpResponse();
            try
            {
                String finalURL = url.trim() + Networking.getConnectionString();
                cw.connection = (HttpConnection) Connector.open(finalURL, Connector.READ_WRITE, false);
                System.out.println("Connection string: " + Networking.getConnectionString());
                System.out.println("Full connec.  URL: " + finalURL);
    
                if (cw.connection == null)
                {
                    result.errorMessage = "Could not open a network connection.";
                    result.completedWithError = true;
                    return result;
                }
    
                cw.connection.setRequestMethod(request.getHttpMethod());
    
                if (compressionEnabled)
                {
                    cw.connection.setRequestProperty("Accept-Encoding", "gzip");
                }
    
                cw.connection.setRequestProperty("User-Agent",
                        "" + DeviceInfo.getManufacturerName() + "/" + DeviceInfo.getDeviceName() + "/" + Config.getVersionNumber());
                if (request.username() != null)
                {
                    cw.connection.setRequestProperty("Authorization", "Basic " + Utils.base64Encode(request.username() + ":" + request.password()));
                }
    
                // set this header so BES servers will not change the content of the headers
                cw.connection.setRequestProperty("x-rim-transcode-content", "none");
    
                //add cookies
                if (HttpCookieJar.getInstance().cookieCount() > 0)
                {
                    cw.connection.setRequestProperty("Cookie", HttpCookieJar.getInstance().getCookiesAsString());
                }
    
                //pull request headers from HttpRequest
    
                Hashtable headers = request.getHeaders();
                for (Enumeration e = headers.keys(); e.hasMoreElements();)
                {
                    String key = (String) e.nextElement();
                    cw.connection.setRequestProperty(key, (String) headers.get(key));
                }
    
                byte[] upstreamBytes = request.requestBytes();
                if (upstreamBytes != null && upstreamBytes.length > 0)
                {
                    Logger.getLogger().log(new String(upstreamBytes));
                    cw.connection.setRequestProperty(HttpProtocolConstants.HEADER_CONTENT_TYPE,
                            HttpProtocolConstants.CONTENT_TYPE_APPLICATION_X_WWW_FORM_URLENCODED);
                    cw.connection.setRequestProperty(HttpProtocolConstants.HEADER_CONTENT_LENGTH, String.valueOf(upstreamBytes.length));
                    cw.outputStream = cw.connection.openOutputStream();
                    cw.outputStream.write(upstreamBytes);
                }
    
                Logger.getLogger().log("Get response");
    
                result.responseCode = cw.connection.getResponseCode();
                result.responseMessage = cw.connection.getResponseMessage();
    
                Logger.getLogger().log("Status Code: " + result.responseCode);
                Logger.getLogger().log("Status Message: " + result.responseMessage);
    
                //suck out the cookies here
                int fieldNo = 0;
                String headerField;
                while ((headerField = cw.connection.getHeaderField(fieldNo)) != null)
                {
                    if (cw.connection.getHeaderFieldKey(fieldNo).equals("Set-Cookie"))
                    {
                        HttpCookieJar.getInstance().setCookie(headerField);
                    }
                    fieldNo++;
                }
    
                System.out.println("get redirect");
    
                //get redirect location
                String location;
                if ((location = cw.connection.getHeaderField("Location")) != null)
                {
                    if (location == url.trim())
                    {
                        Logger.getLogger().log("Redirect loop");
                    }
                    Logger.getLogger().log("Redirect: " + location);
                    result.redirectLocation = location.trim();
                }
    
                byte[] buffer = new byte[HTTP_BUFFER_SIZE];
                int count;
    
                System.out.println("compression");
    
                cw.inputStream = cw.connection.openInputStream();
                if (compressionEnabled)
                {
                    String encoding = cw.connection.getEncoding();
                    if ("gzip".equalsIgnoreCase(encoding))
                    {
                        cw.inputStream = new GZIPInputStream(cw.inputStream);
                    }
                }
    
                cw.inputStream = new DataInputStream(cw.inputStream);
    
                System.out.println("output stream");
    
                ByteArrayOutputStream out = new ByteArrayOutputStream();
                try
                {
                    while ((count = cw.inputStream.read(buffer)) >= 0)
                    {
                        out.write(buffer, 0, count);
                    }
                    result.bytes = out.toByteArray();
                }
                finally
                {
                    out.close();
                }
                cw.close();
                Logger.getLogger().log("Response complete");
            }
            catch (IOException e)
            {
                result.errorMessage = e.getMessage();
                result.completedWithError = true;
                Logger.getLogger().log("ERROR!:" + e.getMessage());
            }
            finally
            {
                removeConnectionWrapper(cw);
            }
            return result;
        }
    
        private static class ConnectionWrapper
        {
            final HttpRequest request;
            InputStream inputStream = null;
            OutputStream outputStream = null;
            HttpConnection connection = null;
    
            public ConnectionWrapper(HttpRequest request)
            {
                this.request = request;
            }
    
            public void close()
            {
                try
                {
                    if (outputStream != null)
                        outputStream.close();
                }
                catch (Exception e)
                {
                }
                try
                {
                    if (inputStream != null)
                        inputStream.close();
                }
                catch (Exception e)
                {
                }
                try
                {
                    if (connection != null)
                        connection.close();
                }
                catch (Exception e)
                {
                }
            }
        }
    }
    

    Sorry for the amount of code.

    I had our BES admin visit problematic page via a browser on the Server BES itself.

    Running, the Web server was an update of AJAX-style page that informs the user that they had no access to that particular content. Programmatically, see us all is "the page has been moved here" - but in a browser, it's a different story.

    Thanks again Peter for your insight!

  • 7.1.1 IPS Manager express can not add the device

    I am trying to add my sensors AIP - SSM IPS Manager 7.1.1 (new facility 2003 32bits).

    Java updated, direct connection. I can ping the sensors.

    Error is:

    Could not check config name of username/password [null]

    I can't connect my sensors with IDM 7.0 no problem with the same name of user and password I tried in the Manager of the IPS, but they do not seem to work.

    Any ideas what I am doing wrong?

    Thank you.

    Looks like you're hit bugID: CSCto03344

    http://Tools.Cisco.com/support/BugToolKit/search/getBugDetails.do?method=fetchBugDetails&bugId=CSCto03344

  • RESTRICTED SESSION

    Hello

    Someone at - it script to identify all users with the permission of "RESTRICTED SESSION", or I guess a variable binding permission?

    In addition, is the best way to expel users and this database is too restricted mode:

    1. immediate stop

    2. start limited

    Thank you

    Hello

    Oracle 11.2 or more, this query will display all the users who have the privilege of REGULATED SESSION system, directly or indirectly:

    WITH the beneficiaries (dealer, parent) AS

    (

    SELECT dealer

    Parent NULL AS

    OF dba_sys_privs

    WHERE a lien = "RESTRICTED SESSION".

    UNION ALL

    SELECT r.grantee

    r.granted_role AS a parent

    Dba_role_privs r

    JOIN beneficiaries g1 ON g1.grantee = r.granted_role

    )

    SELECT eff.*

    , NVL2 (u.username, 'USER', NULL) AS is_user

    BENEFICIARIES g

    LEFT OUTER JOIN u ON g.grantee = u.username dba_users

    ;

    The result I get is like this:

    IS_USER PARENT BENEFICIARY

    -------------------- -------------------- -------

    WKSYS                                     USER

    S/N

    SYS                                       USER

    USER SYS DBA

    USER DBA WEBDB

    USER DBA WKSYS

    USER SYS DBA

    SYSTEM DBA USER

    Your results will probably be a little different.

    In versions 11.1 and earlier versions, you can get the same results using a CONNECT BY query instead of a recursive WITH.

  • How can I recover the modules (phone, email, company, etc.) using UserProfile?

    Hello.

    I am using Ldap.

    How can I recover the modules (phone, email, company, etc.) using UserProfile?

    I used this code () .getSecurityContext () .getUserProfile () ADFContext.getCurrent with methods to get, but it will always return null.

    Kingsley_R , rohanwalia

    Guys I found how do!

    Copy the following code


    IdentityStore idmStore = null;

    SecurityContext secContext is ADFContext.getCurrent () .getSecurityContext ();.

    try {}

    JpsContextFactory ctxf = JpsContextFactory.getContextFactory ();

    JpsContext ctx = ctxf.getContext ();

    LdapIdentityStore ldapStore = (LdapIdentityStore) ctx.getServiceInstance (IdentityStoreService.class);

    idmStore = ldapStore.getIdmStore ();

    SimpleSearchFilter userNameSearchFilter = idmStore.getSimpleSearchFilter ("Username", 1, null);

    String userNamePattern = ' * ';

    System.out.println (replaceWildCardChar (userNamePattern, userNameSearchFilter.getWildCardChar ()));

    userNameSearchFilter.setValue (replaceWildCardChar (userNamePattern,

    (userNameSearchFilter.getWildCardChar ()));

    SearchParameters sp = new SearchParameters (userNameSearchFilter, SearchParameters.SEARCH_USERS_ONLY);

    SearchResponse sr = idmStore.searchUsers (sp);

    If (sr! = null) {}

    User user = null;

    While (sr.hasNext ()) {}

    user = (User) sr.next ();

    If (user.getName () .equals (secCntx.getUserName ())) {}

    System.out.Print ("User is" + user.getUserProfile () .getUserName () + "user undertaking is" +)

    (String) user.getUserProfile () .getPropertyVal ('company') + "user Department is" + (String) user.getUserProfile () .getPropertyVal ("department")); "."

    }

    }

    }

    } catch (JpsException ex) {}

    System.out.println ("Impossible to establish the context of jps!" + ex.getMessage ());

    } catch (IMException iex) {}

    System.out.println ("Impossible to establish the context of jps!" + iex.getMessage ());

    Logger.getLogger (Grnt_page.class.getName ()) .log (Level.SEVERE, null, iex);

    }

  • How do you know that a spesific procedure or function has been run by the user who and when?


    Hi all

    Suppose I have a procedure or a function whose name is MY_PROC. Is it possible to learn that the user who has been running this procedure and when?

    Thank you

    Hi NightWing,

    You need VERIFICATION for operations.

    11.2 docs: AUDIT

    For example:

    SQL> show parameter audit_trail;
    NAME                                 TYPE        VALUE
    ------------------------------------ ----------- ------------------------------
    audit_trail                          string      DB
    SQL>
    
    SQL> conn iarsov/iarsov
    Connected.
    SQL> create or replace function test_audit
      2  return date
      3  is
      4  begin
      5  return sysdate;
      6  end;
      7  /
    
    Function created.
    
    SQL> conn system
    Enter password:
    Connected.
    
    SQL> audit execute on iarsov.test_audit by access;
    Audit succeeded.
    
    SQL> select os_username,username,obj_name,owner from dba_audit_trail where obj_name = 'TEST_AUDIT';
    no rows selected
    
    SQL> conn iarsov/iarsov
    Connected.
    
    --call the function and trigger audit operation
    SQL> select test_audit from dual;
    TEST_AUDI
    ---------
    04-AUG-14
    
    SQL> conn system
    Enter password:
    Connected.
    
    SQL> select os_username,username,obj_name,owner,timestamp from dba_audit_trail where obj_name = 'TEST_AUDIT';
    
    OS_USERNAME          USERNAME                       OBJ_NAME             OWNER                TIMESTAMP
    -------------------- ------------------------------ -------------------- -------------------- ---------
    oracle               IARSOV                         TEST_AUDIT           IARSOV               04-AUG-14
    

    Kind regards

    Ivica

  • Continue the loop after the exception thrown in SQL

    How would continue the while loop in the code below after an exception was thrown?

    DECLARE    
    v_blob_data       BLOB;    
    v_blob_len        NUMBER;    
    v_position        NUMBER;    
    v_raw_chunk       RAW(10000);    
    v_char      CHAR(1);    
    c_chunk_len   number       := 1;    
    v_line        VARCHAR2 (32767)        := NULL;    
    v_data_array      wwv_flow_global.vc_arr2;    
    v_rows number;    
    v_sr_no number := 1;  
    v_first_line_done boolean := false;  
    v_error_cd number :=0;  
    v_quote_pos1 NUMBER;  
    v_quote_pos2 NUMBER;  
    v_enclosed_str VARCHAR(200);
    v_errmsg VARCHAR2(4000);
    
    BEGIN
    
     delete from TEMP_MM_UPDATE where username = :P1_USER_ID;
    
    -- Read data from wwv_flow_files</span>    
     select    
      blob_content    
     into v_blob_data    
     from wwv_flow_files    
     where name = :P2_FILE_UPLOAD; 
    
     v_blob_len := dbms_lob.getlength(v_blob_data);    
     v_position := 1;
    
    
    
     -- Read and convert binary to char</span>  
     WHILE ( v_position <= v_blob_len )    
     LOOP
    
    begin 
     
      v_raw_chunk := dbms_lob.substr(v_blob_data,c_chunk_len,v_position);    
      v_char :=  chr(hex_to_decimal(rawtohex(v_raw_chunk)));    
      v_line := v_line || v_char;    
      v_position := v_position + c_chunk_len;
      
     -- When a whole line is retrieved </span>   
     IF v_char = CHR(10) THEN
     
     LOOP  
      --Make sure there's something to replace  
      IF INSTR(v_line, '"', 1, 1) = 0 THEN  
      EXIT; -- If nothing to replace, exit loop and don't try  
      END IF;  
      --Find the position of the first and second quotes in the line of text  
      v_quote_pos1 := INSTR(v_line, '"', 1, 1);  
      v_quote_pos2 := INSTR(v_line, '"', 1, 2);  
      --Extract the inner string  
      v_enclosed_str := SUBSTR(v_line, v_quote_pos1 + 1, v_quote_pos2 - v_quote_pos1 - 1);  
      --perform the replacement  
      v_line := SUBSTR(v_line, 0, v_quote_pos1 - 1) || REPLACE(v_enclosed_str, ',', '<') || SUBSTR(v_line, v_quote_pos2 + 1);  
     END LOOP; 
      
     -- Convert comma to : to use wwv_flow_utilities </span>  
     v_line := REPLACE (v_line, ',', ':');  
     v_line := REPLACE (v_line, '<', ',');  
     v_line := REPLACE (trim(v_line), '-', NULL);  
     --v_line := REPLACE (trim(v_line), '"', NULL);  
     -- Convert each column separated by : into array of data </span>    
     v_data_array := wwv_flow_utilities.string_to_table (v_line);  
     --Check to see if the row of column headers has already been parsed through  
     IF(v_first_line_done != true)THEN   
      v_first_line_done := true;  
      --Check column order in spreadsheet  
      IF(v_data_array(1)   LIKE '%Username%' AND
        v_data_array(2)  LIKE '%NDN%' AND
        v_data_array(3)  LIKE '%PCFN%' ) THEN   
       v_error_cd := 0;  
       v_line := NULL;  
      ELSE  
       v_error_cd := 1;  
      END IF;  
     --If first line is done and the column order is correct then  
     ELSIF(v_first_line_done = true AND v_error_cd = 0) THEN   
     -- Insert data into target table </span>    
     EXECUTE IMMEDIATE 'insert into TEMP_MM_UPDATE   
     (USERNAME,
       RPT_FLAG,
      PCFN)
     values (:1,:2,:3)'   
       USING   
      v_data_array(1),   
      v_data_array(2),   
      v_data_array(3);
       -- Clear out    
      v_line := NULL; v_sr_no := v_sr_no + 1; 
     
     END IF;  
     END IF;
    
    exception
    WHEN OTHERS then
      v_errmsg := SQLERRM;
      insert into temp_mm_update (username,error_desc)
      values (:P1_USER_ID, v_errmsg);
    end;
      
     END LOOP;
    
    
     
    DELETE FROM WWV_FLOW_FILES where name = :P2_FILE_UPLOAD;
    DELETE FROM TEMP_MM_UPDATE WHERE USERNAME IS NULL AND PCFN IS NULL;  
     IF(v_error_cd = 1) THEN  
    INSERT INTO temp_mm_update (USERNAME, ERROR_DESC)  
    VALUES (:P1_USER_ID, 'Error. Please check column order in spreadsheet.');  
    END IF;
    EXCEPTION
        WHEN NO_DATA_FOUND THEN
            insert into temp_mm_update (username,error_desc)
      values (:P1_USER_ID, 'No Data Found.');
     WHEN OTHERS then
      v_errmsg := SQLERRM;
      insert into temp_mm_update (username,error_desc)
      values (:P1_USER_ID, v_errmsg);  
    
    END;
    
    

    When I set the exception inside the loop, as above, the procedure seems never to end, and I end up getting a 'NOWAIT' error when I try to remove the table or something like that.

    The code works fine if I remove the 'START' just after the loop and also out of the exception within the loop, but I want to be able to specify what's wrong with each record rather than deal with the correct records and then stop after that it is a record that has, for example, 9 values in a column that accepts only 6.

    Can anyone help with this?

    Thank you

    Steven

    Play with my code I found what was wrong.
    I needed to add in the following line in my code block of exception:
    v_line := NULL; v_sr_no := v_sr_no + 1;
    
    Final code:
    DECLARE
      v_blob_data       BLOB;
      v_blob_len        NUMBER;
      v_position        NUMBER;
      v_raw_chunk       RAW(10000);
      v_char      CHAR(1);
      c_chunk_len   number       := 1;
      v_line        VARCHAR2 (32767)        := NULL;
      v_data_array      wwv_flow_global.vc_arr2;
      v_rows number;
      v_sr_no number := 1;
      v_first_line_done boolean := false;
      v_error_cd number :=0;
      v_quote_pos1 NUMBER;
      v_quote_pos2 NUMBER;
      v_enclosed_str VARCHAR(200);
      v_errmsg VARCHAR2(4000);
    BEGIN
      delete from TEMP_MM_UPDATE where username = :P1_USER_ID;
    
      -- Read data from wwv_flow_files
      select
        blob_content
        into v_blob_data
        from wwv_flow_files
        where name = :P2_FILE_UPLOAD; 
    
      v_blob_len := dbms_lob.getlength(v_blob_data);
      v_position := 1; 
    
      -- Read and convert binary to char
      WHILE ( v_position <= v_blob_len )
      LOOP
        begin
            v_raw_chunk := dbms_lob.substr(v_blob_data,c_chunk_len,v_position);
            v_char :=  chr(hex_to_decimal(rawtohex(v_raw_chunk)));
            v_line := v_line || v_char;
            v_position := v_position + c_chunk_len;
    
          -- When a whole line is retrieved 
          IF v_char = CHR(10) THEN
            LOOP
              --Make sure there's something to replace
              IF INSTR(v_line, '"', 1, 1) = 0 THEN
                EXIT; -- If nothing to replace, exit loop and don't try
              END IF;
              --Find the position of the first and second quotes in the line of text
              v_quote_pos1 := INSTR(v_line, '"', 1, 1);
              v_quote_pos2 := INSTR(v_line, '"', 1, 2);
              --Extract the inner string
              v_enclosed_str := SUBSTR(v_line, v_quote_pos1 + 1, v_quote_pos2 - v_quote_pos1 - 1);
              --perform the replacement
              v_line := SUBSTR(v_line, 0, v_quote_pos1 - 1) || REPLACE(v_enclosed_str, ',', '<') || SUBSTR(v_line, v_quote_pos2 + 1);
            END LOOP; 
    
            -- Convert comma to : to use wwv_flow_utilities 
            v_line := REPLACE (v_line, ',', ':');
            v_line := REPLACE (v_line, '<', ',');
            v_line := REPLACE (trim(v_line), '-', NULL);
            --v_line := REPLACE (trim(v_line), '"', NULL);
            -- Convert each column separated by : into array of data 
            v_data_array := wwv_flow_utilities.string_to_table (v_line);
            --Check to see if the row of column headers has already been parsed through
            IF(v_first_line_done != true)THEN
              v_first_line_done := true;
              --Check column order in spreadsheet
              IF(v_data_array(1)    LIKE '%Username%' AND
                  v_data_array(2)  LIKE '%NDN%' AND
                  v_data_array(3)  LIKE '%PCFN%') THEN
                v_error_cd := 0;
                v_line := NULL;
              ELSE
                v_error_cd := 1;
              END IF;
            --If first line is done and the column order is correct then
            ELSIF(v_first_line_done = true AND v_error_cd = 0) THEN
              -- Insert data into target table 
              EXECUTE IMMEDIATE 'insert into TEMP_MM_UPDATE
              (USERNAME,
               RPT_FLAG,
               PCFN)
              values (:1,:2,:3)'
               USING
                v_data_array(1),
                v_data_array(2),
                v_data_array(3);
               -- Clear out
                v_line := NULL; v_sr_no := v_sr_no + 1;
            END IF;
          END IF;
        exception
          WHEN OTHERS then
            v_errmsg := SQLERRM;
            insert into temp_mm_update (username,error_desc)
            values (:P1_USER_ID, v_errmsg);
    v_line := NULL; v_sr_no := v_sr_no + 1;
      END;
      END LOOP;
    
      DELETE FROM WWV_FLOW_FILES where name = :P2_FILE_UPLOAD;
      DELETE FROM TEMP_MM_UPDATE WHERE USERNAME IS NULL AND PCFN IS NULL;
      IF(v_error_cd = 1) THEN
        INSERT INTO temp_mm_update (USERNAME, ERROR_DESC)
        VALUES (:P1_USER_ID, 'Error. Please check column order in spreadsheet.');
      END IF;
    EXCEPTION
      WHEN NO_DATA_FOUND THEN
        insert into temp_mm_update (username,error_desc)
        values (:P1_USER_ID, 'No Data Found.');
      WHEN OTHERS then
        v_errmsg := SQLERRM;
        insert into temp_mm_update (username,error_desc)
        values (:P1_USER_ID, v_errmsg);
    END;
    
  • Paste Excel files in Apex

    I searched the forums here and found a few examples how paste Excel data in an area of text and then transfer it to the database, but none that I've been able to edit for my personal use.

    An example (code below) is of Application Express: how to create a form to download data from spreadsheet which tells you how to create one from their code, but I was not able to edit the SQL code to change their table/info to my table/info.

    The following example works very well with their paintings, I just don't know how to edit.

    http://www.Oracle.com/technetwork/developer-tools/Apex/HOWTO-Create-upload-spreadsheet-for-087062.html

    TableName: TestTable

    Columns:

    ID

    Col1

    Col2

    COL3

    Any help is greatly appreciated!

    Steven

    ----------------------------------------------------------------------------------------------------------------------

    CREATE or REPLACE PACKAGE process_upload
    IS
    / * This is how to get worksheet data in the stage_cars table * /.

    PROCEDURE process_cars (p_upload IN VARCHAR2, o_partners OUT VARCHAR2);

    / * The tokenize_generic function is used in the following way:
    In the worksheet, there are many drop downs, which I use for purposes of consistency of data.
    However, in my application, the columns of the table of CARS are actually the numbers that are foreign keys
    pointing back to the lookup tables.  Therefore, I need some sort of way to convert TEXT data to the
    DIGITAL data that is in the table of CARS production / final * /.


    FUNCTION tokenize_generic (p_id in NUMBER, stage_column IN VARCHAR2, stage_table in varchar2, p_table in varchar2, p_column in varchar2)
    RETURN VARChar2;
    END process_upload;
    /

    CREATE or REPLACE PACKAGE process_upload BODY
    IS
    /*******************
    This is used for the following purpsose:
    IN HTML DB, when you have a multiple-selection list, the element box, the values are stored in the same column
    separated by a ':'.  I have maybe three columns in the spreadsheet that all end up by being stored in the same
    database column.  So, it allows me to take three values and create a string
    separated by a ':' which is the format that I need to use the features of table in HTML DB.

    Takes in an array and returns a string of values Ms would have a ':'
    ****/
    FUNCTION create_string_array (p_array wwv_flow_global.vc_arr2)
    RETURN VARCHAR2
    IS
    v_string VARCHAR2 (32000): = NULL;
    BEGIN
    -For the length of the array
    BECAUSE me in 1... p_array. COUNTY
    LOOP
    IF p_array (i) IS NOT NULL - user can have not filled all values in the worksheet
    THEN
    -Add to the next value in the table with a chain:
    v_string: = v_string | p_array (i) | ':';
    END IF;
    END LOOP;

    LENGTH of YEW (v_string) > 0
    THEN
    -Remove last: string
    v_string: = SUBSTR (v_string, 1, LENGTH (v_string) - 1);
    END IF;

    RETURN v_string;
    END create_string_array;

    PROCEDURE process_cars (p_upload IN VARCHAR2, o_partners OUT VARCHAR2)
    IS
    v_car_array wwv_flow_global.vc_arr2;
    empty_array wwv_flow_global.vc_arr2;
    v_array wwv_flow_global.vc_arr2;
    v_upload VARCHAR2 (32000): = NULL;
    v_line VARCHAR2 (32000): = NULL;
    bad_values EXCEPTION;
    v_colors VARCHAR2 (100): = NULL;
    BEGIN
    / * Remove the: go to the web address, so we can transform string into string of colon delimited to use the built in
    string to the table function * /.
    -SINCE ':' is the delimiter key character, I tried to delete any instance where I thought that it
    -could find themselves in a thong... the URL being the main choice

    v_upload: = REPLACE (p_upload, 'http://',' httpQQQ / /');
    / * Change the tabs in:'s in the string
    ******************/
    -Chr (09) is the tab key, replace it with a ':'

    v_upload: = REPLACE (v_upload, CHR (09), ' :');)
    / * PARSE THE LINES * /.


    While v_upload IS NOT NULL
    LOOP
    v_colors: = NULL;
    v_line: = SUBSTR (v_upload, 1, INSTR (v_upload, CHR (10))-1);
    / * SET THE ARRAY OF VALUES * /.
    v_car_array: = wwv_flow_utilities.string_to_table (v_line);

    -If for some reason we don't have all the 17 values expected
    IF v_car_array. COUNTY! = 8
    THEN
    RAISE bad_values;
    ON THE OTHER
    v_array: = empty_array;

    -There could be three columns of the spreadsheet that maps to a column in the database
    /*****
    In the worksheet, the order is as follows:
    Column 1 - name
    Column 2 - manufacturer
    Column 3 - Color1
    Column 4 - Color2
    Column 5 - Couleur3
    Column 6 - Trim
    Column 7 - MPG
    Column 8 - website

    If v_array match these numbers
    **************/
    v_array (1): = v_car_array (3);
    v_array (2): = v_car_array (4);
    v_array (3): = v_car_array (5);
    -combine them into a single string
    v_colors: = create_string_array (v_array);
    -INSERT IN THE TABLE STAGE_PARTNER
    BEGIN
    EXECUTE IMMEDIATE "insert into stage_cars (id, name of the manufacturer, color, trim, mpg, website) values
    (NULL,: 1:2:3: 4:5:6) "
    USING
    v_car_array (1),
    v_car_array (2),
    v_colors,
    v_car_array (6),
    v_car_array (7),
    REPLACE (v_car_array (8), "httpQQQ / / ','http://")
    ;
    -IF AN ERROR THEN ENTERED THE ERROR TABLE TO VIEW LATER
    EXCEPTION
    WHILE OTHERS
    THEN
    EXECUTE IMMEDIATE ' insert into stage_car_error (id, log, time, username) values (NULL,: 1: 2:3)'
    Using of v_line, SYSDATE, v ("APP_USER");
    END;

    v_upload: = SUBSTR (v_upload, INSTR (v_upload, CHR (10)) + 1);
    END IF;
    END LOOP;
    END process_cars;


    / * TOKENIZER GENERIC CODE * /.


    /***************
    P_ID - id of the table of the scene
    Stage_column - the column of the table of scene
    stage_table - the table of the scene
    p_table - the table of choice, we will use
    P_column - lookup table column the result will be held on

    The result of this would be take the column of COLORS that may have a value of:
    "Blue: Red: White.
    and turning them into:
    "2:3:5.
    who is the corresponding primary key values of the color table.
    ****************/


    FUNCTION tokenize_generic (p_id in NUMBER, stage_column IN VARCHAR2, stage_table in varchar2, p_table in varchar2, p_column in varchar2)
    return varchar2
    is
    v_array wwv_flow_global.vc_arr2;
    v_return VARCHAR2 (100);
    Start

    / * Retrieve the row that contains the column of multivalued, you turn into numbers * /.

    RUN IMMEDIATELY 'SELECT'. stage_column | »
    OF ' | stage_table | »
    WHERE ID =: 1' in v_return using p_id;

    / * Turn the string into an array. Each: separate value will be in a table separate slot * /.

    v_array: = wwv_flow_utilities.string_to_table (v_return);


    BECAUSE me in 1.v_array.count
    LOOP

    / * Query lookup table to retrieve primary key value * /.

    RUN IMMEDIATELY "SELECT ID FROM ' |" P_TABLE | ' WHERE ' | P_COLUMN |' =: 1' in v_array (i) using v_array (i);
    END LOOP;
    v_return: = htmldb_util.table_to_string (v_array);
    Return v_return;
    END tokenize_generic;

    END process_upload;
    /

    then... we meet again.

    quick answer: create the Page-> data loading

    This product actually a few pages in your application, as they act as a "Wizard" for (as the name suggests) the loading of data.

    1st page or download a csv file or copy + paste it into a text box allows you to

    2nd page checks the map "column in the csv to the column in the table.  You can also specify certain "formats" for data (for example, date formats)

    3rd page allows the end user to verify the data.

    4th page is the "Hey, I did this.  Here is what has been done. »

    MK

  • E-mail automatic script (dynamic wrapper)

    Hey everybody,

    I'm running workflow 'To move Virtual Machine disk' and would like that so he can generate a simple email indicating what VM and what data store, the new discs live in. The enlarged and in bold text is what I had added to the original screenplay 'send Notification '. I would like an email from own research without the stuff 'Dynamic Wraper' and Instance.

    Here is my script 'Send Email':

    var message = new EmailMessage();

    Replace the defaults if and only if the input parameter is defined

    If (smtpHost! = null & & smtpHost.length > 0) {}

    message.smtpHost = smtpHost;

    }

    If (smtpPort! = null & & smtpPort > 0) {}

    message.smtpPort = smtpPort;

    }

    If (username! = null & & username.length > 0) {}

    message.username = username;

    }

    If (password! = null & & password.length > 0) {}

    message.password = password;

    }

    If (fromName! = null & & fromName.length > 0) {}

    message.fromName = fromName;

    }

    If (fromAddress! = null & & fromAddress.length > 0) {}

    message.fromAddress = fromAddress;

    }

    message.toAddress = tosolve;

    message. Subject = subject;

    message.addMimePart ("Virtual Machine:" + vm + "moved to disk:" "+ datastore, ' text/html;") Charset = UTF-8 ");"

    System.log ("sending mail to host:" + message.smtpHost + ":" + message.smtpPort + "with user:" + message.username)

    + ", to:" + message.fromAddress + ", to:" + message.toAddress);

    message.sendMessage ();

    And here is the email that I get:

    VM: DynamicWrapper (Instance): [VcVirtualMachine]-[class com.vmware.vmo.plugin.vi4.model.VimVirtualMachine] - VALUE: disc VirtualMachine 'Test VM' Relocated to: DynamicWrapper (Instance): [VcDatastore]-[class com.vmware.vmo.plugin.vi4.model.VimDatastore] - VALUE: data store "Windows_Lab".

    Use vm.name and datastore.name.  Also for simple text formatting, you can use methods on the string.  So if you want the vm.name in "BOLD" and a font of 16 points you might say:

    VM. Name.Bold (.fontsize). (« 16 ») ;

    You can google the full list of options for javascript.  You can also simply include the markup in the chain, as you did above.

Maybe you are looking for