title: PL/SQL - global variable isn't avaible in all Sessions
body: <p>I have a comprehension question with using global variables in PL/SQL packages. 
  I have declared a global variable in the spec of an package. </p>
  
  <p>--> g_processid       VARCHAR2 (30);</p>
  
  <p>In the body of the same package I initialize the variable in a procedure which is used first 
  in my process. This works well. The result of the variable isn't null. </p>
  
  <p>After that the main session starts a another procedure for 16 times. So I have
  16 parallel jobs doing the same thing. </p>
  
  <p>Snippet:</p>
  
  <pre><code>
  FOR i IN 1 .. p_process_count
        LOOP
           DBMS_JOB.submit (job            => v_job_sid,
                              what           =>    p_jobname
                                                || '('
                                                || i
                                                || ','
                                                || p_process_count
                                                || ');',
                            next_date      => SYSDATE,
                            no_parse       => FALSE
                           );
          ....
           v_job_counter := v_job_counter + 1;
           v_tab_kuba_jobs (v_job_counter) := v_job_sid;
           COMMIT;
           IF  p_process_count > 0
           AND i = 1 THEN
               -- 60 Sekunden Pause
               DBMS_LOCK.sleep (180);
           END IF;
        END LOOP;
  </code></pre>
  
  <p>In the procedure which is used by the threads I want to use my global variable. 
  I call the variable in this way: . 
  My problem is that the variable in the Thread is empty. </p>
  
  <p>Maybe it's because the processes aren't using the same instance of my package. 
  What do I have to do to make my variable usable for all my sessions. </p>
  
  <p>Thank you for your recommendation. I appriciate any kind of advise. </p>
  
  <p>Best regards
  Jörn</p>