Query on ALTER SYSTEM SET


Hello

I was under the impression that

"PFILE has limitation to change settings for initialization of dynamically. If any initialization parameter must be changed, we can edit the pfile parameter changes take effect with the next restart of the system

To work around this limitation, Oracle has created the concept of the SPFILE initialization parameter can be changed dynamically using ALTER SYSTEM SET statement. »

But, today, I started my test using PFILE database and run the following command to change the setting of the memory_target from 300 to 290 M.

ALTER SYSTEM SET memory_target = 290 M;

And to my surprise, this statement executed correctly without errors and memory_target parameter has been set to the new value (of course, in memory).

Isn't it change the init dynamically using PFILE itself?

Please clarify my doubt and correct my understanding.

Kind regards

Bharath

bharathDBA wrote:

Hello

I was under the impression that

"PFILE has limitation to change settings for initialization of dynamically. If any initialization parameter must be changed, we can edit the pfile parameter changes take effect with the next restart of the system

To work around this limitation, Oracle has created the concept of the SPFILE initialization parameter can be changed dynamically using ALTER SYSTEM SET statement. »

But, today, I started my test using PFILE database and run the following command to change the setting of the memory_target from 300 to 290 M.

ALTER SYSTEM SET memory_target = 290 M;

And to my surprise, this statement executed correctly without errors and memory_target parameter has been set to the new value (of course, in memory).

Isn't it change the init dynamically using PFILE itself?

Please clarify my doubt and correct my understanding.

Kind regards

Bharath

You have a bad mixing on the genesis of the SPFILE. Yes, it is a binary file and all this but remember, isn't the SPFILE which makes a dynamic parameter or a PFILE that makes static, but it is the nature of the setting itself which allows to happen. Yes, the difference in the PFILE and SPFILE parameter would be obvious when you change a dynamic parameter, and would give a rebound to the db. Since the PFILE file has not been updated (it's a text file must be updated manually), with the next restart, the setting would take the same value as it has in the PFILE file. But with the SPFILE, depending on what you have set in SCOPE, the parameter should behave accordingly.

HTH

Aman...

Tags: Database

Similar Questions

  • ALTER system set events

    Hi all

    I use a 10.2.0.4 Oracle version.

    My colleague trace active generation using: alter system set events 942 trace name errorstack level 3';

    How will I know if it is active now? And how can I turn it off?

    Kind regards
    dbajug

    How will I know if it is active now?

    For all the events that are defined at the system level, try and check the trace file created in USER_DUMP_DEST directory:

    alter system set events 'immediate trace name events level 4';
    

    And how can I turn it off?

    Try:

    alter system set events '942 trace name errorstack off';
    
  • ALTER SYSTEM SET SGA_TARGET

    Hello
    in 10g R2 should I power of database when I change sGA_TARGET:

    ALTER SYSTEM SET SGA_TARGET = value [SCOPE = {SPFILE |}] MEMORY | BOTH}]

    Thank you.

    user522961 wrote:
    Hello
    in 10g R2 should I power of database when I change sGA_TARGET:

    ALTER SYSTEM SET SGA_TARGET = value [SCOPE = {SPFILE |}] MEMORY | BOTH}]

    Thank you.

    You don't need to restart the database for this change.

    http://download.Oracle.com/docs/CD/B19306_01/server.102/b14237/initparams193.htm

  • ALTER SYSTEM SET _awr_flush_threshold_metrics = REAL SCOPE is MΘMOIRE;.

    Hello
    our database in 10g R2 on Win 2003 server has restarted all of a sudden with this message in alertlog:
    ALTER SYSTEM SET awrflush_threshold_metrics = TRUE SCOPE = MΘMOIRE;

    I searched this parameter in the oracle documentation, I found not.
    1 - What is this setting for?
    2. How do I see which connection of the user changed this setting?
    Thank you.

    It is used to toggle the Flushing AWR Workload Metrics

    Published by: SKU on January 28, 2009 02:17

  • Hi, I have installed Oracle 11 g database express edition on my PC so that I can study and prepare for my certification exam. I was practicing and I published the following command.  'Alter system set Cluster_Database = True Scope = spfile' it worked grea

    SQL * more: Production of release 11.2.0.1.0 Mar 5 13:28:10 Aug 2014

    Copyright (c) 1982, 2010, Oracle.  All rights reserved.

    Enter the user name: sys as sysdba

    Enter the password:

    Connect to an instance is idle.

    SQL > bootable media.

    ORA-00439: feature not enabled: Real Application Clusters

    SQL >

    If the database does not start with the current settings, you will need to manually correct the server parameter file (spfile). This is untested so at your own risk:

    SQL > conn / as sysdba

    SQL > shutdown immediate

    SQL > create spfile from pfile;

    This will create the file pfile C:\oraclexe\app\oracle\product\11.2.0\server\database\initXE.ora

    Make a copy of the pfile as backup

    Edit the pfile origin, remove the line with cluster_database inside and save the file

    SQL > create spfile from pfile;

    SQL > startup

  • Do we need apostrophes when you set values with ALTER SYSTEM?

    DB version: 11.2, 10.2
    Version: AIX

    What logs the values of character with ALTER SYSTEM, do I have to enclose the value within single quotes.


    Both the below worked. So I'm a bit confused.
    SQL> ALTER system set audit_trail=NONE scope=spfile;
    
    System altered.
    
    -- Tested with single quotes on another DB
    SQL> ALTER system set audit_trail='NONE' scope=spfile;
    
    System altered.

    What logs the values of character with ALTER SYSTEM, do I have to enclose the value within single quotes.

    When you pass several parameters, you can use single quotes, in other cases sound option.

    If you have multiple databases on hold, you must configure by separating with single quotes.
    For example,.
    (1) fal_client = "STBY1", "STBY2", "STBY3" and so on.
    (2) log_archive_dest_2 = "service = stby lgwr async... '

    If you see under SPFILE settings, here, some are mentioned with single quotes & SEC_CASE_SESITIVE_LOGIN is not in quotes. But the value is always the same.

    From SPFILE;

    *.remote_login_passwordfile='EXCLUSIVE'
    *.sec_case_sensitive_logon=FALSE                                       "used NO QUOTES"
    *.sga_max_size=16106127360
    *.star_transformation_enabled='TRUE'                                        "QUOTES"
    
    SQL> show parameter remote_login
    
    NAME                                 TYPE        VALUE
    ------------------------------------ ----------- ------------------------------
    remote_login_passwordfile            string      EXCLUSIVE
    SQL> show parameter sec_case
    
    NAME                                 TYPE        VALUE
    ------------------------------------ ----------- ------------------------------
    sec_case_sensitive_logon             boolean     FALSE                                     "used NO QUOTES"
    SQL> show parameter sga_max_
    
    NAME                                 TYPE        VALUE
    ------------------------------------ ----------- ------------------------------
    sga_max_size                         big integer 15G
    SQL> show parameter star_tran
    
    NAME                                 TYPE        VALUE
    ------------------------------------ ----------- ------------------------------
    star_transformation_enabled          string      TRUE                                         "QUOTES"
    SQL>
    
  • Bad system setting, cannot start the database

    Hello, I have problem with start my database

    C:\Users\Raw>sqlplus "/ as sysdba"
    
    
    SQL*Plus: Release 11.2.0.1.0 Production on Thu May 28 15:23:34 2015
    
    
    Copyright (c) 1982, 2010, Oracle.  All rights reserved.
    
    
    Connected to an idle instance.
    
    SQL> startup
    ORACLE instance started.
    
    
    Total System Global Area 1068937216 bytes
    Fixed Size                  2182592 bytes
    Variable Size             587203136 bytes
    Database Buffers          473956352 bytes
    Redo Buffers                5595136 bytes
    Database mounted.
    ORA-01092: ORACLE instance terminated. Disconnection forced
    ORA-30012: undo tablespace 'UNDOTS3' does not exist or of wrong type
    Process ID: 2716
    Session ID: 5 Serial number: 3
    
    SQL> startup mount
    ORACLE instance started.
    
    
    Total System Global Area 1068937216 bytes
    Fixed Size                  2182592 bytes
    Variable Size             587203136 bytes
    Database Buffers          473956352 bytes
    Redo Buffers                5595136 bytes
    Database mounted.
    SQL> show parameter undo
    
    
    NAME                                 TYPE        VALUE
    ------------------------------------ ----------- ------------------------------
    undo_management                      string      AUTO
    undo_retention                       integer     900
    undo_tablespace                      string      UNDOTS3
    SQL> select * from v$tablespace;
    
    
           TS# NAME                           INC BIG FLA ENC
    ---------- ------------------------------ --- --- --- ---
             0 SYSTEM                         YES NO  YES
             1 SYSAUX                         YES NO  YES
             2 UNDOTBS1                       YES NO  YES
             4 USERS                          YES NO  YES
             3 TEMP                           NO  NO  YES
             6 ARB_TABLESPACE                 YES NO  YES
             7 ARB2_TABLESPACE                YES NO  YES
             5 UNDOTBS2                       YES NO  YES
             8 TEMP2                          NO  NO  YES
             9 UNDOTBS3                       YES NO  YES
    
    
    10 rows selected.
    
    
    SQL> alter system set undo_tablespace=UNDOTBS3 scope=both;
    alter system set undo_tablespace=UNDOTBS3 scope=both
    *
    ERROR at line 1:
    ORA-02097: parameter cannot be modified because specified value is invalid
    ORA-01219: database not open: queries allowed on fixed tables/views only
    
    SQL> alter database open
      2  ;
    alter database open
    *
    ERROR at line 1:
    ORA-01092: ORACLE instance terminated. Disconnection forced
    ORA-30012: undo tablespace 'UNDOTS3' does not exist or of wrong type
    Process ID: 1128
    Session ID: 5 Serial number: 3
    
    SQL>
    
    

    When I have a parameter not valid, the I often resolve when the database does not open is to simply create a pfile the spfile file:

    sqlplus

    Connect / as sysdba

    create pfile='/home/oracle/pfile.txt 'to spfile='/u01/app/oracle/product/12.1.0.2/dbs/spfileorcl.ora ';

    Then use a text editor to fix the value of the parameter. When done, save the changes. Then create spfile from pfile this and you should be able to start the instance.

    create spfile='/u01/app/oracle/product/12.1.0.2/dbs/spfileorcl.ora 'to pfile='/home/oracle/pfile.txt ';

    startup

    HTH,

    Brian

  • alter system switch logfile crashes

    Hi Experts,

    Please help me determine the above error.

    Recently, I was told to take one of our EBS environment in archivelog mode. While doing this activity, I coped 'ORA-16014.

    The steps that I follow are listed below:

    SQL > alter system set log_archive_dest_1 = ' location = / mnt/DEVarchive/trcdev ' scope = spfile;

    Modified system.

    SQL > alter system set log_archive_format='TRCDEV_%s_%t_%r.arc' scope = spfile;

    Modified system.

    SQL > shutdown immediate;

    The database is closed.

    The database is dismounted.

    ORACLE instance stops.

    SQL > startup mount

    ORACLE instance started.

    Total System Global Area 4275781632 bytes

    Bytes of size 2235208 fixed

    989856952 variable size bytes

    3271557120 of database buffers bytes

    Redo buffers 12132352 bytes

    Mounted database.

    SQL > alter archivelog database;

    Database altered.

    SQL > list of archive logs

    Database log mode Archive Mode

    Active AutoArchive

    Archives/mnt/DEVarchive/trcdev of destination

    More old sequence of journal online 9

    Log sequence archive 11

    Current log sequence 11

    SQL > alter database open;

    Database altered.

    SQL > alter system switch logfile;

    Modified system.

    SQL > /.

    Modified system.

    SQL > /.

    Now, the session hangs then I checked my alert log file and found the details below

    ARCH: Stopped archiving, error occurred. Will continue to retry

    TRCDEV ORACLE instance - error check-in

    ORA-16014: connect 2 sequence # 11 not archived, not available destinations

    ORA-00312: wire 2 1 online journal: ' / mnt/DEVdata/trcdev/redo02a.log'

    ORA-00312: wire 2 1 online journal: ' / mnt/DEVdata/trcdev/redo02b.log'

    After reading the newspaper to alert carefully, it is clear that it is not able to archive the logs and archiving is hung.

    The reason could be my destination Archive got filled, but in my case, my destination archive has a free space of about 24 G.


    Please tell me how to troubleshoot further, a quick response will be highly appreciated.


    -Thank you

    @John

    I checked log_archive_dest_2 and it is set to null. And I think it would be better if I leave it in its default state.

    @Mustafa

    Db_recovery_file_dest is also set to null.

    Further, I disabled the archivelog mode and erase all the settings that I did for archiving logs (parameter as log_archive_dest_1 log_archive_format).

    I have another session close immediately and started the database in editing mode. After that, I activated all the setting again and activated the archivelog mode for my database.

    SQL > alter database open;

    Did bounce my DB once again, and then manually change logfiles 2 - 3 times and BOOM everything seems to work fine now. No more no hung sessions and archives are generated too.

    A big thanks to everyone in this thread.

  • UTL_FILE alter system

    Hi expert,

    I try to use UTL_FILE.

    In the first time, I run only these commands:

    SQL > CREATE DIRECTORY MIGR'EUROP AS ' / tmp/MIGR'EUROP /';
    SQL > GRANT READ, WRITE ON DIRECTORY RAHUL DBA;

    but to use utl_file, I am obliged to execute it "alter system set utl_file_dir =...". »

    is this true? Can I not put the utl_file_dir to use UTL_FILE?

    See you soon,.
    Lain

    oracle@mauri-laptop:/tmp/MIGR$ sqlplus / as sysdba
    
    SQL*Plus: Release 11.2.0.1.0 Production on Thu Feb 24 16:31:25 2011
    
    Copyright (c) 1982, 2009, Oracle.  All rights reserved.
    
    
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    
    SQL> CREATE DIRECTORY MIGR AS '/tmp/MIGR/'; 
    SQL> GRANT READ, WRITE ON DIRECTORY MIGR TO DBA; 
    SQL> host cat /tmp/MIGR/Report.txt
     test
    SQL> DECLARE 
      V1 VARCHAR2(32767); 
      F1 UTL_FILE.FILE_TYPE; 
    BEGIN 
      F1 := UTL_FILE.FOPEN('MIGR','Report.txt','R',256); 
      UTL_FILE.GET_LINE(F1,V1,32767); 
      UTL_FILE.FCLOSE(F1); 
    END;
      2    3    4    5    6    7    8    9  
     10  /
    DECLARE
    *
    ERROR at line 1:
    ORA-29283: invalid file operation
    ORA-06512: at "SYS.UTL_FILE", line 536
    ORA-29283: invalid file operation
    ORA-06512: at line 5
    
    
    SQL> select * from all_directory;
    select * from all_directory
                  *
    ERROR at line 1:
    ORA-00942: table or view does not exist
    
    
    SQL> select * from all_directories;
    
    OWNER                      DIRECTORY_NAME
    ------------------------------ ------------------------------
    DIRECTORY_PATH
    --------------------------------------------------------------------------------
    SYS                      MIGR
    /tmp/MIGR
    
    SYS                      SUBDIR
    /u01/app/oracle/product/11.2.0/dbhome_1/demo/schema/order_entry//2002/Sep
    
    SYS                      SS_OE_XMLDIR
    /u01/app/oracle/product/11.2.0/dbhome_1/demo/schema/order_entry/
    
    
    OWNER                      DIRECTORY_NAME
    ------------------------------ ------------------------------
    DIRECTORY_PATH
    --------------------------------------------------------------------------------
    SYS                      LOG_FILE_DIR
    /u01/app/oracle/product/11.2.0/dbhome_1/demo/schema/log/
    
    SYS                      DATA_FILE_DIR
    /u01/app/oracle/product/11.2.0/dbhome_1/demo/schema/sales_history/
    
    SYS                      XMLDIR
    /ade/b/2125410156/oracle/rdbms/xml
    
    
    OWNER                      DIRECTORY_NAME
    ------------------------------ ------------------------------
    DIRECTORY_PATH
    --------------------------------------------------------------------------------
    SYS                      MEDIA_DIR
    /u01/app/oracle/product/11.2.0/dbhome_1/demo/schema/product_media/
    
    SYS                      DATA_PUMP_DIR
    /u01/app/oracle/admin/localdb/dpdump/
    
    SYS                      ORACLE_OCM_CONFIG_DIR
    /u01/app/oracle/product/11.2.0/dbhome_1/ccr/state
    
    
    9 rows selected.
    
    SQL> 
    SQL> 
    SQL> show parameter utl_file;
    
    NAME                         TYPE      VALUE
    ------------------------------------ ----------- ------------------------------
    utl_file_dir                    string      
    
    SQL>
    SQL> alter system set utl_file_dir='/tmp/MIGR','/u01/app/oracle/product/11.2.0/dbhome_1/MIGR/' scope=spfile
      2  ;
    
    System altered.
    
    SQL> 
    SQL> 
    SQL>       
    SQL> shutdown
    
    Database closed.
    Database dismounted.
    
    ORACLE instance shut down.
    SQL> SQL> SQL> 
    SQL> 
    SQL> 
    SQL> 
    SQL> startup
    ORACLE instance started.
    
    Total System Global Area 3290345472 bytes
    Fixed Size              2217832 bytes
    Variable Size           1795164312 bytes
    Database Buffers      1476395008 bytes
    Redo Buffers             16568320 bytes
    Database mounted.
    Database opened.
    SQL> 
    SQL> show parameter utl_file
    
    NAME                         TYPE      VALUE
    ------------------------------------ ----------- ------------------------------
    utl_file_dir                    string      /tmp/MIGR, /u01/app/oracle/pro
                                   duct/11.2.0/dbhome_1/MIGR/
    
    SQL>
    SQL> SET SERVEROUT ON
    
    declare
    v_buff VARCHAR2(2000);
    fhandle UTL_FILE.FILE_TYPE;
    begin
    dbms_output.put_line('WRITE');
    fhandle:= UTL_FILE.FOPEN('MIGR','Report.txt','W');
    UTL_FILE.put_line(fhandle,' Attempt to write');
    UTL_FILE.FCLOSE(fhandle);
    end;
    /SQL> SQL>   2    3    4    5    6    7    8    9   10  
    WRITE
    
    PL/SQL procedure successfully completed.

    chmod 777/tmp/RAHUL r /.

    Published by: sb92075 on February 24, 2011 08:14

  • How can I verify and change the system set trace events?

    Hi all:
    How can I check that the system set trace level events? I don't want the big alert_log.





    Concerning
    Terry

    To disable the use of the event

    ALTER SYSTEM SET EVENTS '20 trace name ERRORSTACK OFF';
    

    HTH
    Srini

  • Inverse of command 'ALTER SESSION SET.

    Hello

    I have a READER user and when I connected with this user that I can set the current session settings such as

    alter SESSION set smtp_out_server = '123.345.134.123';
    
    

    or

    alter session force parallel query parallel N;
    
    

    If it would be sysdba or any other user with grant on parameter $ v we could use:

    select value from v$parameter where name = 'smtp_out_server'
    
    

    Is it possible that I can get the current session settings without going through subsidies on the parameter $ v?

    PS: it seems strange, that we have the setter (alter session set), but haven't Get accessor.

    Maybe the function dbms_utility.get_parameter_value, assuming that you have the privileges.

  • Method to identify the user isuing ALTER SYSTEM

    Hi all
    We have a database of test in which APPS (a power user) access is given to all developers. We had kept TIMED_STATISTIC to false in this case, so that the load is reduced to the minimum. From these last days, we change this value at the level of the system, and we are unable to identify the person.

    Is there a way I can write a database trigger to capture this specific ALTER SYSTEM event? Any help in this regard is highly appreciated.

    Kind regards
    Lucette

    Lucette wrote:
    Hi Keita,
    My mistake, I do not pay attention on behalf of the author. Forgive me for my doubts; they may be stupid - I'm not a DBA, but I'm a preparer SQL.

    If I use audit_sys_operations - he will capture all ALTER SYSTEM orders by any user. Then narrow it down us to the test user by issuing ALTER AUDIT test SYSTEM. Please correct me if I'm wrong.

    In my PB, there are at least 300 developers work at the moment - is possible to limit this information to a specific event to ALTER SYSTEM? In addition, we are in a WINDOWs environment. If cron does not work. It would be much better if I could device a method to write the details of the session incriminated at a table.

    Do you think below would work?

    create or replace TRIGGER UNI. USYSTEM_B_ALTER_SYS_AUDIT_TRIG
    FRONT
    CREATE OR CHANGE OR DROP OR TRUNCATE
    ON THE SYSTEM. SCHEMA
    declare
    ......

    Kind regards
    Lucette

    Published by: lollipop on October 12, 2009 12:18

    You don't need to set the parameter audit_sys_operations . What you need is that one specific user to AUDIT

  • RMAN alert log Message: ALTER SYSTEM ARCHIVE LOG

    Creates a new database Oracle 10.2.0.4 and now see "ALTER SYSTEM ARCHIVE LOG" in the journal of the alerts that when online RMAN backup is executed:
    Wed Sep 26 21:52:03 2009
    ALTER SYSTEM ARCHIVE LOG
    Wed Sep 26 21:52:03 2009
    Thread 1 Advanced to record the sequence of 35 (switch LGWR)
    Currently Journal # 2 seq # 35 mem # 0: /u01/app/oracle/oradata/aatest/redo02.log
    Currently Journal # 2 seq # 35 mem # 1: /u03/oradata/aatest/redo02a.log
    Wed Sep 26 21:53:37 2009
    ALTER SYSTEM ARCHIVE LOG
    Wed Sep 26 21:53:37 2009
    Thread 1 Advanced to record the sequence of 36 (switch LGWR)
    Currently Journal # 3 seq # 36 mem # 0: /u01/app/oracle/oradata/aatest/redo03.log
    Currently Journal # 3 seq # 36 mem # 1: /u03/oradata/aatest/redo03a.log
    Wed Sep 26 21:53:40 2009
    From control autobackup
    Autobackup written control disk device
    handle ' / u03/exports/backups/aatest/c-2538018370-20090826-00'.

    I not publish a swiitch log command. The RMAN commands, I am running are:
    CONFIGURE REDUNDANCY 2 RETENTION STRATEGY;
    CONFIGURE CONTROLFILE AUTOBACKUP ON;
    CONFIGURE CONTROLFILE AUTOBACKUP FORMAT for DEVICE TYPE DISK TO ' / u03/exports/backups/aatest/%F';
    SET UP THE DEVICE TYPE DISK TYPE OF BACKUP TO COMPRESSED BACKUPSET;
    CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT ' / u03/exports/backups/aatest/%d_%U';
    BACKUP DATABASE MORE ARCHIVELOG;
    DELETE NOPROMPT OBSOLETE;
    DELETE NOPROMPT ARCHIVELOG UNTIL ' SYSDATE-2';

    I do not see this message on any other 10.2.0.4 instances. Someone has seen this and if yes why it shows in the log?

    Thank you

    Curt Swartzlander

    There is no problem with the log command. Please refer to the documentation for more information on the syntax 'PLUS ARCHIVELOG '.

    http://download.Oracle.com/docs/CD/B19306_01/backup.102/b14192/bkup003.htm#sthref377

    Adding BACKUP... MORE ARCHIVELOG causes RMAN, follow these steps:

    * 1. Executes the ALTER SYSTEM ARCHIVE LOG CURRENT command.*

    * 2. All runs THE BACKUP ARCHIVELOG. Note that if backup optimization is enabled, then RMAN passes the newspapers that he has already saved to the specified device

    * 3. Backup the rest of the files specified in BACKUP command.*

    * 4. Executes the ALTER SYSTEM ARCHIVE LOG CURRENT command.*

    * 5. Backup of all remaining archived logs generated during the backup.*

    This ensures that backups of data taken when the command file is recoverable in a consistent state.

  • ALTER session set current_schema

    Hello

    We have multiple instances of the database (for example, MR01DEP, MR02DEP,...).

    Each instance is composed of more than stores (called schemas): for example, for MR01DEP, we have STORE1, Bank 2, 3, to MR02DEP we STORE5, STORE6,... and so on.

    Now, using developer PL/SQL, SQL Developer or even SQL Plus, when I connect to these databases, I connect using the user SUP_TMP (who has the privileges necessary for the actions that I have to do), and I have something like this:

    Conn SUP_TMP / < password > @STORE1 (I can connect like this and not with @MR01DEP; However, even @MR01DEP is correct).

    Today, all the tables are on these patterns (STORE1, STORE2,..), and when I connect with the SUP_TMP user, each time, at each meeting, I have to write:

    ALTER session set current_schema = STORE1, or

    ALTER session set current_schema = Bank 1

    At the beginning of every script that I have to run, I want to write a little routine so that I don't need every time to this «alter session set current_schema» statement

    If I connect with SUP_TMP / < password > @STORE1.

    so I see in the instance of v$, as the instance_name is (correct) MR01DEP.

    But I need to somehow get that banks '1', which I use when I connect to it (although, normally, I connect to a database, such as MR01DEP, but I'm specifying STORE1 in the connection string).

    So, in other words, I need that at the beginning of each script, to determine the current connection string I'm specifying after '@', and which is the current_schema.

    If I log in as SUP_TMP / < password > @STORE5, then I'll have something like immediate execution "alter session set current_schema = STORE5'."

    SUP_TMP user should be the I connect each time, but the current pattern of each script in each session, must come from the connection string.

    Is this possible?

    Thank you!

    I know, I specify the store, and it will automatically connect to the correct database (this is the case).

    No - NOT sure that connect you to the right base.

    As said ground that alias 'keep' is on the client and can be mapped to ANY DATABASE at all.

    Also - what you specify with is the DATABASE - this isn't a pattern.

    You're talking about two different things.

    You set the current schema - you connect to a database. TWO DIFFERENT THINGS.

    It may not even be a schema with the same name as the database.

    Do not use the same name for the databases and schemas. Oracle is NOT sql server.

    You can create a trigger AFTER the opening of SESSION to define the schema for you, but you must be able to know which schema must be defined.

  • Difference between Ready Boost with the virtual memory in Advance system setting

    forward-who knows the difference between Ready Boost with virtual memory, system setting, detail response, ex: ready boost improves memory VGA and RAM, virtual memory only for RAM< example,="" i="" need="" the="" real="" answer,="">

    Hi Kenny,

    Which is defined as virtual memory USB flash drive works as a battering ram. However, they are not as fast as the RAM memory installed real sticks. These flash drives operate much more quickly than the hard drive.

    Thank you.

Maybe you are looking for

  • video storage

    I have a lot of videos shot on my iphone, which are stored on my mac, and take lots of storage. Is there a way to store on the cloud, then remove from my mac to free up space?

  • Compaq CQ5101IT: processor upgrade

    Hello I want to spend my CPU, so I ask if on my mother M2N68 Council-(Narra5) I can get an AMD Phenom II X 4 810 CPU? Sorry for my English not so good, thank you. Roberto.

  • How to work on the coefficient of correlation of Pearson on the numbers

    Hi there, I was wondering how to determine the coefficient of a set of data in numbers. It's the set of data that I have. Thank you

  • How can I uninstall an illegal copy of Windows 7 and go back to XP or Vista?

    I asked this question before the past months, but it was never answered or solved by you. My son has an illegal copy of W7 in his laptop, it was installed by the dealer, that he bought, which will not exchange it, quite normal in this country corrupt

  • DeskJet 3050 has: Scan Options window

    Hello I have the DeskJet 3050 a printer and when I scan something it automatically scans in JPEG format. As I want to change my scans, I downloaded and installed the OCR software (I followed the instructions posted on the support forum HP, installati