Questions about where to Unbudle and Bundle

I have been wondering lately, as I clean up some code, how much it matters where clusters are unbudled and bundled. Please refer to these two pictures, and, if you could, provide your opinion. Thanks!
Diagram 1
Diagram 2
Richard

I don't think you will save much memory between a single large string and a cluster. You will however make the code more obtuse. I would recommend against using the string. I have often thought about the best approach for passing data around and have in the past used a "God cluster" which was a cluster of clusters. Each internal cluster had the data organized in a logical fashion and kept related items together. The "God" cluster was used primarily to provide a single wire through the state machine. Each state would only need to extract/update the data on the cluster that it needed but from a BD standpoint it reduced the clutter of wire. When I bundled/unbundled and I would not show the full name so it looked more like a wire with the single cluster.
I have been thinking more about an LVOOP option. A base class could be defined which provided the methods for setting/getting configuration parameters. The derived classes would implement the specific instances of the the data related to the specific configuration data. I would think this approach would use a name to do the lookup for the specific parameter. Some of the methods could include the means to read or write these parameters from an ini file. This approach would work fairly well for defined data types but I'm not sure how well it would work for typedefed data. I haven't had time to investigate this much further than a thought experiment. The one benefit of this is that it would provide a standard method for all of my applications. The downside though is that it might take a bit of BD space since it would require the code to specify the object type it was dealing with every time it acted on the class wire.
Mark Yedinak
"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot

Similar Messages

  • HT201263 What will i do?screenshot There is a problem with your iPhone. Please visit the Service Answer Center to find answers to all your questions about service options, warranty and other processes in your country. To find your nearest Apple Store, cli

    What will i do? ITune screenshot is as follows >
    There is a problem with your iPhone. Please visit the Service Answer Center to find answers to all your questions about service options, warranty and other processes in your country. To find your nearest Apple Store, click here.

    Do what it said to do.
    "Please visit the Service Answer Center to find answers to all your questions about service options, warranty and other processes in your country. "

  • TS1814 There is a problem with your iPhone. Please visit the Service Answer Center to find answers to all your questions about service options, warranty and other processes in your country. To find your nearest Apple Store, click here.

    There is a problem with your iPhone.
    Please visit the Service Answer Center to find answers to all your questions about service options, warranty and other processes in your country.
    To find your nearest Apple Store, click here.
    Please help me i can aktivate my phone imei 012423006333181.

    There is a problem with your iPhone.
    Please visit the Service Answer Center to find answers to all your questions about service options, warranty and other processes in your country.
    To find your nearest Apple Store
    no imei also

  • Some questions about Unity 4.0 and IPC

    I have a couple of questions and I was looking for "real world" answers, not specific answers from the design guide.
    1.What is this bandwidth requirement between Exchange and Unity and what is it used for?
    2. What sort of issues would we experience if we placed the Unity UM Server at the Colo and placed the Exchange server at the customer premise; with a single T1 between the sites?
    3.What else is involved with a Unity UM install vs. a Unity VM install?
    4.Does the Unity UM and Exchange servers have to be running AD?
    5. Can Unity or the Exchange box be the Domain Controller? Or does it need to be a separate server?
    6. Where does a vm message get streamed from? The Unity server or the Exchange server?

    No you do not pay for FaceTime. It uses your WiFi network, so if you have access to WiFi it is free.
    There is no server required for FaceTime, it will use a direct device to device protocol.
    I can't answer the question about using phones in different countries as that will depend on if you buy a phone that is locked to a carrier.
    If you buy a phone in Germany and it is locked to a German phone network then it will most likely not work with a SIM from Turkey. You would need to buy an unlocked phone which are very expensive as they do not have any carrier subsidy applied to the price.

  • Techie Question about iWeb, outbound links, and Google Analytics

    Hi,
    I have a kind of pretty technical question about using Google Analytics (GA) with iWeb sites to measure clicks on outbound links. Here's the setup:
    1) My website's online, and GA is working properly.
    2) I don't sell stuff directly, but I do have a "Purchase" page which contains a link to a specific Amazon page.
    3) I'm pretty sure I can measure how many people go to the Purchase page using GA, but how do I measure whether visitors click on the Amazon link? It would be interesting to me to be able to gauge what the conversion rate is; that is, how many people actually proceed to purchase the product at Amazon.
    I've checked the GA instructions and there's a page about manually tracking clicks on outbound links but it requires some code inputting. I know zero about coding, but I'm pretty sure that in iWeb you can't get access to the source code to input the required code.
    Am I wrong about this? And if I am, then does anyone here know how to measure the clickthrough rate?
    Anyway, hope you can help. Thanks in advance.

    I don't know about the link tracking but you could have the link take you to a redirect page which automatically sends them to Amazon.com after a preset time, 0 seconds to whatever you'd like. You can put a counter on that redirect page, like StatCounter. StatCounter can tell you how many, from where they came, i.e country and area, repeat visits, etc.
    Tutorials #12 & #13 describe how to put a visible counter on a page but with a redirect page you wouldn't have to bother since it wouldn't be seen. You can get all of your information from your account on the StatCounter site.
    The redirect page would be a simple plain text page titled redirect.html and would look like this:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="refresh"
    content="0; Destination URL">
    <title>Redirecting or whatever you'd like to appear at the top of the browser</title>
    </head>
    <body>
    </body>
    </html>
    0 Is the number of seconds to wait before redirecting the visitor. If set to zero the visitor would not know they were being redirected. Replace Destination URL with the Amazon URL you want them to go to.
    OT

  • Question about using 10g/11g and APEX ...

    Hi,
    I just recently learned of Oracle's APEX and have a few questions about using it.
    Can I use APEX with express, standard, and enterprise editions of 10g and 11g?
    Are all of these free to use?

    You might want to read about APEX rather than jumping into questions that are reasonably well documented. Info at http://www.oracle.com/technology/products/database/application_express/index.html
    Your specific questions:
    1) Apex is a package that can be installed into any properly licensed database.
    2) The price for the production license of the database varies by edition.
    The price for Express Edition is $0 for use in production. Part of the cost for that edition is 'no Oracle Support based support, no patches, data volume limitation, etc.'

  • Questions about JVC GZ HD7 and Final Cut

    i'm planning to buy a JVC GZ HD7, but i have some questions about it...
    My imac configuration is
    Imac 20" late 2006
    1 Gb Ram
    Leopard 10.5.2
    Final Cut Studio 2
    Ok
    So my questions are:
    1- When shooting the best setting for me is the 1440cbr, or 1920x1080
    is better? i would like to have progressive instead of interlaced
    moviefiles, but for what i have read the JVC HD7 only shoots interlaced...is possible to turn them into progressive after working in final cut?
    2- In Final Cut Pro what are the sequence settings and the video
    settings for a video shoot from this camera?
    I would like to know the best settings possible for me,
    regarding that i would like to edit in real time, no rendering needed,
    and to have the best image quality that this camera can offer...

    FCE is designed to work with DV/HDV files. It cannot work natively with MPEG2 files. You will need something like MPEG Streamclip to convert your files to a format that FCE understands
    Streamclip is free but you need to buy Apple's MPEG Playback Component to make it work

  • I just have questions about the AirPort Express and how it works.

    My household Wi-Fi is not the strongest in  my room and I found out about the AirPort Express and I read the overvie, but I still have some questions on how it works, how its setup and other questions as well.

    The AirPort Express will not wirelessly extend the signal from another router unless that router is also an Apple product.
    Not sure what other questions you might have, but we'll try to answer if you want to ask.

  • Question about suitability of iPhone and specific comparisons

    I like the Verizon network (for which I'm considering upgrading to the Omnia II) but am thinking about biting the bullet and going to AT&T for the iPhone. I use Macs at home and at work. My main uses will be phonecalls (with reliable voice dialing from my car - bluetooth stereo and earpiece), mail (Exchange server access for calendar, mail, and addressbook), internet through the cellphone network (not wifi) - browsing, SFTP, VNC, etc., watching videos, photos, and listening to music, calendar reminders (as well as periodic sound reminders for missed calls, voicemails, etc.), opening PDF and Word documents, GPS (ideally with spoken driving directions),and Skype. Given these uses, can anyone advise me if there's anything here that is a problem for the iPhone?
    thanks,
    Mike

    "VNC"
    There are pretty nice VNC clients for the platform, the best being Jaadu VNC. (See my just-published "Everything you will ever want to know about the remote desktop controllers on the iPhone" for more info if interested; it's been cross-posted to several iPhone forums. Not this one - yet - as I still don't have Level 1.)
    watching videos
    The 3G S (but not the 3G!) is far better than current for example Windows Mobile or Symbian phones in that it can play back MPEG-4 / H.264 videos without excessive power consumption. That is, if all your videos are in this format, the 3G S is the way to go.
    Nevertheless, if your videos are in DivX, XviD or - even worse - WMV, you won't be able to natively play them back - you'll need to transcode them first.
    This, unfortunately, also means WMV streaming TV stations are far harder to watch than on, say, Windows Mobile. The only AppStore app ("Streamer") supporting them is really bad and delivers dismal performance, even on the 3G S.

  • Some questions about Java deployment steps and techniques

    All my java experience is coding and testing in my local machine (where, of course, a jre is available), but ... when I deploy to other people, they may not have a jre or they may have a different version of it than the one needed to run my application. I've read different stuff online including jars and java web start but still I have many questions.
    (1) first one first, Sun contradicts common sense, when it says that i can redistribute my own customized light version of their jre by taking out some files (java.sun.com/j2se/1.5.0/jre/README). there are two ways for me to get a jre: Way one is by downloading one from Sun, the download comes as an *.exe file and I don't see how I can take files out of it, so do you know how?. Way two would be by simply copying the set of files i choose (according to that Readme) from my current jre installation (the one on my \java\jdk\jre directory), does this make sense?, (if you're under windows) doesn't an installed version of a jre need a couple of dlls plus some new registry entries?, this contradicts common sense, if I'm not wrong, that Readme is a nonsense, but since that readme is at each of us jre installation \java\jdk1.x\jre\Readme, it can't be a nonsense, therefore I'm wrong, therefore the answer is either Way 1 or Way 2, HOW? ... or maybe there's a Way 3?
    (2) Say I never read that Readme so I download the jre (as an exe) to bundle it along with my application in a jar ... now I'll give my neighbor either a jar with two exes or two exes jars ... is there a way to make a jar so that two files get executed? ... if the answer is No and I have competition from a second neighbor, then I believe I'm asking my first neighbor to choose my application based on our friendship, that's not reasonable if we are doing business, so Java loses.
    (3) Say that my application is a single executable file like this,
    class X{
    public static void main(String[]$$$){
    System.out.println("Console, where are you?");
    At this point, say that my neighbor accepted the two executables, he executed the jre.exe and has jre6 in his system, now he double clicks on my X.jar ... it's a console application and jar files are not associated with the java.exe launcher since java 5, but with javaw which doesn't open any console ... how do i make it so a console opens and prints "Console, where are you?" ... do I ask my neighbor-customer to add a couple of lines to his path and open his console and (please) enter java -jar jarfile.jar? ... isn't it too much? ... i hope i'm wrong cause this is kind of discouraging
    (4) I've read that by installing a more recent version of a jre on a system that has an older jre (there to help other applications work), I might be causing a problem for the other applications to run ... I guess that's the reason why that Readme kind of encourage to redistribute a "private" version of a jre (one that doesn't come with a java.exe launcher ... any feedback on this?
    (5) I'm reading a lot of hype about Java Web Start ... it looks better than the traditional jar/jre deployment ... but setting up a MIME type to *.jnlp, it doesn't come with some free hosting I've checked ... somebody can recommend a free hosting service that allows to set a *.jnlp MIME? (I'll appreciate a suggestion here, cause I would like to test Web Start)... and, anyhow, how you people compare it with the paradigm of the single executable file?.
    Thanks. Your feedback is highly appreciated.

    jorgelbanda wrote:
    ..(5) I'm reading a lot of hype about Java Web Start ... It's gratifying to think that someone who wants to deploy apps., has the common sense to search first! You would not guess how I often I hear "I wanna' make an EXE" shortly followed by "What's webstart?".
    ...it looks better than the traditional jar/jre deployment ... but setting up a MIME type to .jnlp, it doesn't come with some free hosting I've checked ... OK. You cannot define new mime types, but perhaps the site already has it defined. An easy way to check is to upload 'any old file' that ends in .jnlp and use the [mime type checker|http://pscode.org/mime/] to see what content type it is served as.
    ..somebody can recommend a free hosting service that allows to set a .jnlp MIME? (I'll appreciate a suggestion here, cause I would like to test Web Start)... I'm pretty sure the Google based sites offer it.
    Note that I edited the asterisks out of your post, to avoid the forum software parsing half the reply as bold.

  • Questions about Assumption of Liability and device to be used for unlimited data plan

    This is my first post on here. I have an opportunity that someone I know is willing to transfer his smartphone plan with unlimited data to me. I have read extensively on here and other sites and gathered some information, and also heard of many complications and questionable losses of unlimited data plans when making various types of changes to devices or services. Some of what I read may be outdated as well if Verizon has made changes in their policies, so I will start with the most obvious question: as of this date, is an AOL possible while keeping the unlimited data plan intact?
    If so, here are some other questions I have:
    -Will I receive a new SIM card by mail or do I need to use my friend's old SIM card?
    -If my ultimate end goal is to use laptop, do I have to connect through a smartphone (and is there any additional charge for that, or would it change the plan), or can I put the SIM card in a mobile hotspot such as the MHS291L and use only the data portion of the plan?
    -After getting the plan, is there any way I can get TWO SIM cards - one for a mobile hotspot, and the other strictly for voice and text? If so, how much extra would that cost?
    -If we went to a Verizon store to do this transfer or AOL, how can we be absolutely certain it goes smoothly, that no one makes any unauthorized plan changes and does not lose the unlimited data? I have unfortunately read some horror stories of it being lost in similar situations, no one seems to be accountable, and it winds up costing someone countless hours of struggle with Verizon to try to get it back (whether they are successful or not I don't know).
    -If at some point the SIM card was lost (such as if I lost the device), can it be replaced without affecting the plan?
    For what it's worth (especially for those working for Verizon), I am not looking for a way to hog up absurd amounts of data but simply to be able to do the basic stuff I need to online and maybe watch a movie once in a while without having really huge bills. Even if I used the internet without giving data consumption a second thought, I doubt I'd go much over 25-30GB most months.
    Thanks to whoever can provide me with information.

    Hi NicandroN_VZW, sorry i did not see your reply in time but thank you just the same. I called the number for the AOL department and they were able to help me with it pretty easily and answer most of my questions
    I do have a couple other questions regarding the unlimited data plan on smartphones. I have seen various comments regarding these things online, and i can make a good guess about what "might work," but i'm really looking to know Verizon's official policy on these things, if one exists. In case any non-verizon employees are able to provide this information as well, if you have references to where i can find it in writing that would be helpful.
    First, i realize there is an optional $30 fee for mobile hotspot use. But does Verizon have any policy about whether this fee must be paid if i connect only via a USB cable (since it would not actually be a "hotspot," and could not connect multiple devices)?
    And my other question is, if i do opt to pay the $30 hotspot fee, is there any policy either for or against using that SIM card in a 4g hotspot such as the MHS291L?
    PS i am asking these things here rather than by PM because, given the wide range of opinions which can be found online and that others have looked into similar things, i am sure other people could also benefit from knowing Verizon's policy regarding these things.

  • A question about CPS (CPS processing) and CAPolicy.inf file.

    Hello All
    Can someone please help me with the following question.
    Background, I am building a 3-tier PKI infrastructure. offline Root, offline Policy (intermediate), online issuing.
    Now my first question is about CPS (certificate practice statement) for this example lets just call this the InternalIssuancePolicy as below.
    Basically I was thinking it is best not to set a given certificate (aka issuance) policy at the Root, the reason being I may wish to have different issuance policies at a latter date.
    For example right now I just want an issuance policy (CPS) for internal certificates only, therefore I am thinking set this at the Policy CA level, as below [InternalIssuancePolicy] (example OID) and then issuing CA certs from this Policy CA to the
    internal issuing CAs. If at a latter date I want a different policy (CPS) for issuance of external certificates I can build a new Policy CA under the existing Root with a different policy extension.
    Is the above logic sound?
    Questions:
    I am assuming from recent study that the CA cert issued to the Issuing CA will contain a single issuance policy "only" i.e. the one that was specified in the Policy CA 1.3.6.1.4.11111111.1.1.1.  If so I believe you cannot build a new
    issuing CA and submit the CSR to the Policy CA asking for a CA cert with any other certificate policy extension other than 1.3.6.1.4.11111111.1.1.1
    Is that correct?
    Also
    I saw a blog post which stated if are going to use certificate/issuance policies (other than all issuance policies) you should mark the extension as critical=true otherwise the policy just becomes glorified comment. I take the point but that leads me to
    two more questions
    1: How does the certificate changing engine or CryptoAPI enforce a certificate policy (as it is just a policy, e.g. written procedure). I am assuming all this means is it forces the client to process the extension and therefore check the certificate
    policy extension in the certificate does not violate the certificate chain but that is all it can do?
    2: If the certificate policy extension is set to critical and the URL referenced in the extension is not available (e.g. on a WEB Server and the client is working offline, but has a cached CRL), does setting the extension to critical also force the
    client to try and access the URL listed, or not (I am assuming not as you could just have a text block rather than URL).
    Any comments suggestions on my proposed three CAPolicy.inf files below for the 3-tier PKI (again offline Root and Policy)
    ** Root **
    [Version]
    Signature= "$Windows NT$"
    [Certsrv_Server]
    RenewalKeyLength=4096
    RenewalValidityPeriodUnits=Years
    RenewalValidityPeriod=20
    CRLPeriod=Years
    CRLPeriodUnits=1
    LoadDefaultTemplates=False
    AlternateSignatureAlgorithm=0
    [CRLDistributionPoint]
    [AuthorityInformationAccess]
    basicconstraintsextension]
    pathlength = 2
    critical=true
    PolicyStatementExtension]
    Policies = AllIssuancePolicy
    Critical = FALSE
    [AllIssuancePolicy]
    OID = 2.5.29.32.0
    ** Policy CA **
    [Version]
    Signature= "$Windows NT$"
    [Certsrv_Server]
    RenewalKeyLength=2048
    RenewalValidityPeriodUnits=Years
    RenewalValidityPeriod=10
    CRLPeriod=Years
    CRLPeriodUnits=1
    [PolicyStatementExtension]
    Policies = InternalIssuancePolicy
    Critical = False
    [InternalIssuancePolicy]
    OID = 1.3.6.1.4.11111111.1.1.1
    Notice = "Internal Certificate Policy"
    URL="http://pki.lab.local/Certenroll/CPS.txt"
    [AuthorityInformationAccess]
    URL=http://pki.lab.local/Certenroll/PolicyCA01.crt
    [CRLDistributionPoint]
    URL=http://pki.lab.local/Certenroll/PolicyCA01.crl
    [basicconstraintsextension]
    pathlength = 1
    critical=true
    ** Issuing CA **
    [Version]
    Signature= "$Windows NT$"
    [Certsrv_Server]
    RenewalKeyLength=2048
    RenewalValidityPeriodUnits=Years
    RenewalValidityPeriod=5
    CRLPeriod=Weeks
    CRLPeriodUnits=1
    CRLDeltaPeriod=Days
    CRLDeltaPeriodUnits=1
    LoadDefaultTemplates=False
    AlternateSignatureAlgorithm=0
    [AuthorityInformationAccess]
    URL=http://pki.lab.local/Certenroll/IssuingCA01.crt
    [CRLDistributionPoint]
    URL=http://pki.lab.local/Certenroll/IssuingCA01.crl
    [basicconstraintsextension]
    pathlength = 0
    critical=true
    Thanks All
    AAnotherUser__

    > Is the above logic sound?
    not that much. In this case 3-tier PKI could be reduced to 2-tier. Make default Offline Root CA and below it issuing CAs with desired policy OIDs. You will combine issuing CA with policy CA functionality. Additional tier will cost you a license, administration
    overhead and increased certificate chain processing delays. There is nothing wrong if you combine policy CAs with issuing.
    > I saw a blog post which stated if are going to use certificate/issuance policies (other than all issuance policies) you should mark the extension as critical=true
    where did you get this? Certificate policies should not be marked critical. Certificate chaining engine will take care of it, when application reqests CCE to validate desired policy.
    > does setting the extension to critical also force the client to try and access the URL listed
    no. Certificate chaining engine do not inspect policy qualifier URLs.
    > Any comments suggestions on my proposed three CAPolicy.inf files below for the 3-tier PKI (again offline Root and Policy)
    [CRLDistributionPoint]
    [AuthorityInformationAccess]
    [PolicyStatementExtension]
    Policies = AllIssuancePolicy
    Critical = FALSE
    [AllIssuancePolicy]
    OID = 2.5.29.32.0
    these sections are not required in root CA.
    [AuthorityInformationAccess]
    URL=http://pki.lab.local/Certenroll/PolicyCA01.crt
    [CRLDistributionPoint]
    URL=http://pki.lab.local/Certenroll/PolicyCA01.crl
    [basicconstraintsextension]
    pathlength = 1
    critical=true
    These sections are not required at policy CA. Afaik, CDP and AIA extensions are not supported in non-root CA configuration files. The same is with issuing CA. And your issuing CA is missing PolicyStatementExtension section.
    Vadims Podāns, aka PowerShell CryptoGuy
    My weblog: en-us.sysadmins.lv
    PowerShell PKI Module: pspki.codeplex.com
    PowerShell Cmdlet Help Editor pscmdlethelpeditor.codeplex.com
    Check out new: SSL Certificate Verifier
    Check out new:
    PowerShell File Checksum Integrity Verifier tool.

  • Question about AUTOTRACE, SP2-0618 and SP2-0611

    Good morning,
    I wanted to look at the execution plan(s) for some sample queries. I did a little research using Google, found out about autotrace, plan_table, plustrace role and utlxplan. I followed the instructions I found but the result isn't quite as expected.
    Here is an output of a freshly started session:
    0 01:50 [SS1TB Attic-Z] [5G] [750M] Z:\Documentation\Oracle\
    Oracle Concepts\Scripts>sqlplus hr/abc123
    SQL*Plus: Release 11.2.0.1.0 Production on Sun Aug 8 01:50:16 2010
    Copyright (c) 1982, 2010, Oracle.  All rights reserved.
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    SQL> select count(*) from plan_table;
      COUNT(*)
             2
    SQL> set autotrace on
    SP2-0618: Cannot find the Session Identifier.  Check PLUSTRACE role is enabled
    SP2-0611: Error enabling STATISTICS report
    SQL> select count(*) from plan_table;
      COUNT(*)
             2
    Execution Plan
    Plan hash value: 3662021055
    | Id  | Operation          | Name       | Rows  | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT   |            |     1 |     3   (0)| 00:00:01 |
    |   1 |  SORT AGGREGATE    |            |     1 |            |          |
    |   2 |   TABLE ACCESS FULL| PLAN_TABLE |     2 |     3   (0)| 00:00:01 |
    Note
       - dynamic sampling used for this statement (level=2)
    SQL>1. the first select is there to ensure I have a plan_table, that checks.
    2. When I set autotrace on, I get SP2-0618 and SP2-0611 for reasons that I cannot figure out.
    3. the second select is there to find out if the autotrace in step 2 had any effect. It did since now the explain plan is displayed.
    The question is: if it is working (as step 3 demonstrates) then why I am getting those errors in step 2 ? and what do I have to do to not get those errors anymore ?
    Thank you (again!) for your help,
    John.
    Note: I created the plustrace role, granted it select on v_$sesstat, v_$statname, v_$session, then I granted plustrace to hr. Was there something else needed ?

    Hi John,
    It looks like that, for PLUSTRACE it is important for the user to be logged out when the role is granted otherwise, it looks like there is a part of the process that doesn't "stick".That's not just with the PLustrace role. Any role would be working when the next time the user is going to log in. Please see below where using two sessions, I shall grant a user some privs and would see whether its working for the user or not.
    *Session1BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
    PL/SQL Release 11.2.0.1.0 - Production
    CORE    11.2.0.1.0      Production
    TNS for 32-bit Windows: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - Production
    SQL> create user john identified by john;
    User created.
    SQL> grant connect to john;
    Grant succeeded.
    SQL> create role dangerous ;
    Role created.
    SQL> grant drop any table,create any index to dangerous;
    Grant succeeded.
    SQL> conn john/john
    Connected.
    SQL> select * from session_privs;
    PRIVILEGE
    CREATE SESSIONSo far, what I did that I created a user John, granted him a direct priviledge. There is a role also that's prepared and would be granted to the user while still he being connected. See below, this is the second session,
    SQL*Plus: Release 11.2.0.1.0 Production on Sun Aug 8 15:33:09 2010
    Copyright (c) 1982, 2010, Oracle.  All rights reserved.
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    SQL> grant dangerous to john;
    Grant succeeded.I would check the available permissions for the user in the session. This command was entered in the first session where the user john was already connected.
    SQL> /
    PRIVILEGE
    CREATE SESSIONYou can see that there is no change in the session privs. Now, let's disconnect and connect again,
    SQL> disconn
    Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    SQL> conn john/john
    Connected.
    SQL> select * from session_privs;
    PRIVILEGE
    CREATE SESSION
    DROP ANY TABLE
    CREATE ANY INDEXAll he privs are active now for the user.
    Now, the privs in the role, if would be updated, would be reflecting right away in the user's currently connected session. I added one more priv to the role in the 2nd session and it was coming in the 1st session, see below please,
    session-2
    SQL> grant alter any table to dangerous;
    Grant succeeded.
    SQL>
    session-1
    SQL> /
    PRIVILEGE
    CREATE SESSION
    ALTER ANY TABLE
    DROP ANY TABLE
    CREATE ANY INDEX
    SQL>I copied extra lines I guess, deleted them now.
    Aman....
    Edited by: Aman.... on Aug 8, 2010 3:56 PM

  • [SOLVED]Questions about a shell program and about shell: files, regexp

    Hello, I'm writing this little program in shell:
    #!/bin/bash
    # Synopsis:
    # Read from an inputfile each line, which has the following format:
    # lllnn nnnnnnnnnnnnllll STRING lnnnlll n nnnn nnnnnnnnn nnnnnnnnnnnnnnnnnnnn ll ll
    # where:
    # n is a <positive int>
    # l is a <char> (no special chars)
    # the last set of ll ll could be:
    # - NV
    # - PV
    # Ex:
    # AVO01 000060229651AVON FOOD OF ARKHAM C A S060GER 0 1110 000000022 00031433680006534689 NV PV
    # The program should check, for each line of the file, the following:
    # I) If the nn of character lllnn (beggining the line) is numeric,
    # this is, <int>
    # II) If the character ll ll is NV (just one set of ll) then
    # copy that line in an outputfile, and add one to a counter.
    # III) If the character ll ll is NP (just one set of ll) then
    # copy that line in an outputfile, and add one to a counter.
    # NOTICE: could be just one ll. Ex: [...] NV [...]
    # [...] PV [...]
    # or both Ex: [...] NV PV [...]
    # Execution (after generating the executable):
    # ./ inputfile outputfileNOM outputfilePGP
    # Check the number of arguments that could be passed.
    if [[ ${#@} != 3 ]]; then
    echo "Error...must be: myShellprogram <inputfile> <outputfileNOM> <outputfilePGP>\n"
    exit
    fi
    #Inputfile: is in position 1 on the ARGS
    inputfile=$1
    #OutputfileNOM: is in position 2 on the ARGS
    outputfileNOM=$2
    #OutputfilePGP: is in position 3 on the ARGS
    outputfilePGP=$3
    #Main variables. Change if needed.
    # Flags the could appear in the <inputfile>
    # ATTENTION!!!: notice that there is a white space
    # before the characters, this is important when using
    # the regular expression in the conditional:
    # if [[ $line =~ $NOM ]]; then [...]
    # If the white space is NOT there it would match things like:
    # ABCNV ... which is wrong!!
    NOM=" NV"
    PGP=" PV"
    #Counters of ocurrences
    countNOM=0;
    countPGP=0;
    #Check if the files exists and have the write/read permissions
    if [[ -r $inputfile && -w $outputfileNOM && -w $outputfilePGP ]]; then
    #Read all the lines of the file.
    while read -r line
    do
    code=${line:3:2} #Store the code (the nnn) of the "llnnn" char set of the inputfile
    #Check if the code is numeric
    if [[ $code =~ ^[0-9]+$ ]] ; then
    #Check if the actual line has the NOM flag
    if [[ $line =~ $NOM ]]; then
    echo "$line" >> "$outputfileNOM"
    (( ++countNOM ))
    fi
    #Check if the actual line has the PGP flag
    if [[ $line =~ $PGP ]]; then
    echo "$line" >> "$outputfilePGP"
    (( ++countPGP ))
    fi
    else
    echo "$code is not numeric"
    exit
    fi
    done < "$inputfile"
    echo "COUN NON $countNOM"
    echo "COUN PGP $countPGP"
    else
    echo "FILE: $inputfile does not exist or does not have read permissions"
    echo "FILE: $outputfileNOM does not exist or does not have write permissions"
    echo "FILE: $outputfilePGP does not exist or does not have write permissions"
    fi
    I have some questions:
    I) When I do:
    if [[ -r $inputfile && -w $outputfileNOM && -w $outputfilePGP ]]; then
    else
    echo "FILE: $inputfile does not exist or does not have read permissions"
    echo "FILE: $outputfileNOM does not exist or does not have write permissions"
    echo "FILE: $outputfilePGP does not exist or does not have write permissions"
    fi
    I would like to print the things on the else, accordingly, this is, print the right message. Ex: if "$outputfileNOM" did not have the write permission, just print that error. BUT, I don't want to put a lot of if/else, Ex:
    if [[ -r $inputfile ]]; then
    if [[-w $outputfileNOM ]] then
    else
    For the READ permission, and the other for the WRITE
    Is there a way to do it, without using a nesting approach, and that maintains the readability. 
    II) About the:
    if [[ -r $inputfile && -w $outputfileNOM && -w $outputfilePGP ]]
    is OK if I use the flag "-x" instead of -r or -w. I don;t have a clear definition of what is the meaning of:
    -x FILE
    FILE exists and execute (or search) permission is granted
    III) Notice the ATTENTION label in my code. I notice that there are some possibilities, for ex: having white spaces before, after or before or after. I'm believing in the consistency of the input files, but if they change, it will explode. What could I do in this case? Is there an elegant way to manage it? (exceptions?)
    Thank you very much!
    EDIT: corrected what rockin turtle wrote bellow about the format. Thank you.
    Last edited by gromlok (2011-10-09 18:39:03)

    I) Regarding your if statement, you could do something like this:
    estr='FILE: %s does not exist or does not have %s permissions.\n'
    [ -r $inputfile ] || ( printf "$estr" "$inputfile" "read" && exit 1 )
    [ -w $outputfileNOM ] || ( printf "$estr" "$outputfileNOM" "write" && exit 1 )
    [ -w $outputfilePGP ] || ( printf "$estr" "$outputfilePGP" "write" && exit 1 )
    II)The -r/-w/-x mean that the file has the read/write/execute bit set. Do a
    $ man chmod
    for details.
    III) You should be able to do
    if [[ "$line" =~ .*\<NV\> ]]; then
    echo "..."
    (( countNOM++ ))
    fi
    but that didn't work for me when I tried it.  I don't know if this is a bug in bash, or (more likely) something that I am doing wrong.
    Regardless, I would write your script like this:
    #!/bin/bash
    file=$(egrep '^[A-Z]..[0-9]{2}' "$1")
    grep '\<NV\>' <<< "$file" > "$2"
    grep '\<PV\>' <<< "$file" > "$3"
    echo 'Count NON:' $(wc -l < "$2")
    echo 'Count PGP:' $(wc -l < "$3")
    Note: In reading your script, your comments imply that each line of the input file starts with 'llnnn' but the example line you gave starts with 'lllnn'.  That is, there are 3 letters (AVO) followed by 2 numbers (01). The above script assumes that lines start with 'lllnn'

  • Question about evictor, application performance, and log growth

    Hello,
    I've got an application that using two BDB environments, one with critical data and one with data that can be reconstructed, just for the sake of backup convenience. For a while, I was getting OutOfMemoryErrors with increasing frequency. This caused the app to crash without closing the databases or the environment until the recovery time was around 30 minutes. After reading through many of the posts here and trying various workarounds, I got to a state where that stopped happening. I think that what did that fixed is was decreased the cache sizes.
    Then, I was seeing what appeared to be evictor deadlocks. The application would hang for thirty minutes before a monitoring script that I've got would detect that no work was being done and would restart the application. Another round of searching ensued and I seem to have gotten it to a state where it doesn't run out of memory or deadlock anymore.
    After getting rid of all these issues and letting it run for four or five days, the size of one of the critical BDB environment was 550GB. Since it was almost filling the drive, I moved it aside and created a new BDB for the app to use. Now, I'm trying to figure out what happened. It looks like the BDB contains about 15G of actual data.
    It seems like everything starts out fine and then, somehow, it starts to collapse under the weight of itself. I'd like to figure out what type of abuse I may be guilty of that could cause this.
    Here's a little bit about my application:
    First (critical) BDB environment:
    - add only, no deletes
    - two databases
    - average data sizes are 1k and 11k respectively
    - average key sizes are around 80 and 16 bytes respectively
    - almost no locality of reference to access pattern in either
    - minimal lookups, mostly used as an archive
    - cache size is 1MB
    - 8 threads reading/writing, 40 threads reading only
    Second (reconstructable) BDB environment:
    - six databases
    - five databases are mostly add with purges of two-week-old data
    - one database has frequent adds and deletes
    - lots of lookups, things are likely to be looked up shortly after they're added
    - cache size is 64MB
    - 40 threads reading/writing
    On both environments,I've set je.evictor.forcedYield=true.
    I'm running the JVM with:
    -Xmx1800m
    -Dje.adler32.chunkSize=8192
    -XX:+UseMembar
    JVM version is:
    java version "1.6.0_01"
    Java(TM) SE Runtime Environment (build 1.6.0_01-b06)
    Java HotSpot(TM) Server VM (build 1.6.0_01-b06, mixed mode)
    BDB version is 3.2.23
    OS/Kernel is:
    Linux app2 2.6.9-42.0.10.ELsmp #1 SMP Fri Feb 16 17:17:21 EST 2007 i686 i686 i386 GNU/Linux
    So, my question is:
    What could cause the critical database (especially with no deletes) to grow to 550GB when there's only 15GB of data in it? It was my understanding that the cleaner should take care of any unused log file cruft. It seems like the log files grow faster as the performance gets worse. I have no idea which is the cause or the effect.
    And, I guess the real question is how can I prevent this in the future?
    Thanks,
    -Justin

    For the record, the problem was that the user's cache size was too small for the size of the database thereby creating a large number of records in the log when eviction of dirty records occurred. The cleaner was unable to keep up with the log load.
    Note to readers: eviction of dirty records causes records to be written to the log. JE has to evict to somewhere and the log is what it uses.
    Charles Lamb

Maybe you are looking for