1. Get rid of all advertisements and get unlimited access to documents by upgrading to Premium Membership. Upgrade to Premium Now and also get a Premium Badge!

alter session parameters

Discussion in 'SQL PL/SQL' started by monkey, Jun 6, 2014.

  1. monkey

    monkey Long Term Member

    Messages:
    156
    Likes Received:
    0
    Trophy Points:
    230
  2. krasnoslobodtsev_si

    krasnoslobodtsev_si Forum Genius

    Messages:
    626
    Likes Received:
    129
    Trophy Points:
    810
    Location:
    Russian Federation
    Hi.
    For obtaining parameters which can be changed at the level of session it is necessary to execute simple query :
    Code (SQL):

    SELECT
        p.NAME,p.VALUE,p.ISDEFAULT,p.ISMODIFIED
    FROM v$parameter p
    WHERE p.ISSES_MODIFIABLE = 'TRUE';
     
     
    monkey likes this.
  3. monkey

    monkey Long Term Member

    Messages:
    156
    Likes Received:
    0
    Trophy Points:
    230
    Hello!
    Hm,hmn...I wrote:

    select * from v$parameter;

    and of course got anser: there is no such a VIEW!
    (view v$parameter)

    so I suppose ,view v$parameter is not a defaulot view, being created without me (user itself)?
    Many thanks!!!
     
  4. monkey

    monkey Long Term Member

    Messages:
    156
    Likes Received:
    0
    Trophy Points:
    230
    What is p?

    ...
    from v$parameter AS p?

    probably not...
     
  5. rajenb

    rajenb Forum Expert

    Messages:
    361
    Likes Received:
    114
    Trophy Points:
    655
    Location:
    Mauritius
    You don't need to create this view - it's created at database install time. But, it looks like you don't have access to it.
    You must request your DBA to grant you access to the view.

    I suppose you refer to post#2 - it's called "alias" : you can alias a table and reference it's column using "alias.column_name".
     
    monkey likes this.
  6. krasnoslobodtsev_si

    krasnoslobodtsev_si Forum Genius

    Messages:
    626
    Likes Received:
    129
    Trophy Points:
    810
    Location:
    Russian Federation
    P - this alias.

    By default the normal user has no access to V$ representations.
    For access to views of V$ it is necessary to issue additional privileges to the user
     
    monkey likes this.
  7. monkey

    monkey Long Term Member

    Messages:
    156
    Likes Received:
    0
    Trophy Points:
    230
    Hello!
    Just realised that have access to V$TIMEZONE_NAMES, but not to v$parameter (tried with capslock too!)
    and I managed to change the date format, using alter session set..., which, I suppose , is alo not always allowed...seems I have access to some and not to all...thank people!
     
  8. monkey

    monkey Long Term Member

    Messages:
    156
    Likes Received:
    0
    Trophy Points:
    230
    Hello!

    Code (SQL):
    FROM v$parameter p
    Code (SQL):
    FROM v$parameter AS p
    it means, we can easily to miss the "as"?
     
  9. rajenb

    rajenb Forum Expert

    Messages:
    361
    Likes Received:
    114
    Trophy Points:
    655
    Location:
    Mauritius
    No, for table alias, you don't put "AS" before alias (try it - it will error out).
    However, for column alias you can put "AS" - it's optional - with or without "AS" the alias would work.
     
    monkey likes this.
  10. monkey

    monkey Long Term Member

    Messages:
    156
    Likes Received:
    0
    Trophy Points:
    230
  11. rajenb

    rajenb Forum Expert

    Messages:
    361
    Likes Received:
    114
    Trophy Points:
    655
    Location:
    Mauritius
    I suppose this is for SQL Server or MySQL ...
     
    monkey likes this.
  12. monkey

    monkey Long Term Member

    Messages:
    156
    Likes Received:
    0
    Trophy Points:
    230
    Ok, I also supposed, just wanted to be sure...
    Many thanks!!!