IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

PL/SQL Oracle Discussion :

Adresse IP et hostname du poste client


Sujet :

PL/SQL Oracle

  1. #1
    Futur Membre du Club
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Septembre 2013
    Messages
    9
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Burundi

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : Services à domicile

    Informations forums :
    Inscription : Septembre 2013
    Messages : 9
    Points : 6
    Points
    6
    Par défaut Adresse IP et hostname du poste client
    Bonjour,
    j'ai le même problème que dans cette discussion de récupérer l’adresse IP et le nom de l'ordinateur client (mon logiciel est sous PL/SQL).
    Merci pour l'intervention mais je ne sais pas comment fonctionne DBMS_APPLICATION_INFO.SET/READ_CLIENT_INFO. Quelqu’un qui peut nous expliquer comment récupérer l'adresse IP et hostname s'il vous plait, je vous en prie, moi aussi j'en ai besoin.
    Merci d'avance.

  2. #2
    Modérateur
    Avatar de al1_24
    Homme Profil pro
    Retraité
    Inscrit en
    Mai 2002
    Messages
    9 080
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 63
    Localisation : France, Val de Marne (Île de France)

    Informations professionnelles :
    Activité : Retraité
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Mai 2002
    Messages : 9 080
    Points : 30 803
    Points
    30 803
    Par défaut
    As-tu consulté les informations fournies par la documentation d'Oracle ?
    Modérateur Langage SQL
    Règles du forum Langage SQL à lire par tous, N'hésitez pas à consulter les cours SQL
    N'oubliez pas le bouton et pensez aux balises
    [code]
    Si une réponse vous a aidé à résoudre votre problème, n'oubliez pas de voter pour elle en cliquant sur
    Aide-toi et le forum t'aidera : Un problème exposé sans mentionner les tentatives de résolution infructueuses peut laisser supposer que le posteur attend qu'on fasse son travail à sa place... et ne donne pas envie d'y répondre.

  3. #3
    Futur Membre du Club
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Septembre 2013
    Messages
    9
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Burundi

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : Services à domicile

    Informations forums :
    Inscription : Septembre 2013
    Messages : 9
    Points : 6
    Points
    6
    Par défaut
    Merci pour les remarques et la correction.
    J'ai consulté tout ce que j'ai pu trouver. J'ai trouvé ceci: <SYS_CONTEXT('USERENV','IP_ADDRESS')> et <UTL_INADDR.GET_HOST_NAME('IP_ADDRESS')> mais ceux-ci me retourne respectivement <127.0.0.1> comme adresse IP et le nom du serveur . Alors que j'ai besoin de retourner l'adresse IP et le hostname de l'ordinateur qui est connecté.
    Merci.

  4. #4
    Modérateur
    Avatar de al1_24
    Homme Profil pro
    Retraité
    Inscrit en
    Mai 2002
    Messages
    9 080
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 63
    Localisation : France, Val de Marne (Île de France)

    Informations professionnelles :
    Activité : Retraité
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Mai 2002
    Messages : 9 080
    Points : 30 803
    Points
    30 803
    Par défaut
    Qu'appelles-tu "l'ordinateur qui est connecté" ?
    Les appels de la fonction SYSCONTEXT que tu utilises renvoient le nom et l'adresse du poste client qui exécute la fonction.
    Tu souhaites sans doute, depuis le serveur ou un autre poste client, connaître le nom du client associé à une session ?
    Il faut aller voir alors dans la vue V$SESSION...
    Modérateur Langage SQL
    Règles du forum Langage SQL à lire par tous, N'hésitez pas à consulter les cours SQL
    N'oubliez pas le bouton et pensez aux balises
    [code]
    Si une réponse vous a aidé à résoudre votre problème, n'oubliez pas de voter pour elle en cliquant sur
    Aide-toi et le forum t'aidera : Un problème exposé sans mentionner les tentatives de résolution infructueuses peut laisser supposer que le posteur attend qu'on fasse son travail à sa place... et ne donne pas envie d'y répondre.

  5. #5
    Futur Membre du Club
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Septembre 2013
    Messages
    9
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Burundi

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : Services à domicile

    Informations forums :
    Inscription : Septembre 2013
    Messages : 9
    Points : 6
    Points
    6
    Par défaut
    Merci beaucoup Moderateur pour ce replique. L'ordinateur connecté,je voulais dire poste client.
    Normalement je veux insérrer ces informations(IP et hostname du poste client) dans une autre table via un trigger, au lieu de me renvoyer l'adresse IP et le hostname du poste client, je reçois ceux du serveur. Les utilisaurs(users) ne sont pas crées directement dans la base de données, je les crée dans une table alors que v$session contient aussi les users.
    Voici, le trigger(CUACCTYY_REC_AUDIT_TRIGGER) que j'ai créé dans une table que j'ai appelé CUACCTYY_REC , si vous le copier dans toad il seras plus lisible:

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    242
    243
    244
    245
    246
    247
    248
    249
    250
    251
    252
    253
    254
    255
    256
    257
    258
    259
    260
    261
    262
    263
    264
    265
    266
    267
    268
    269
    270
    271
    272
    273
    274
    275
    276
    277
    278
    279
    280
    281
    282
    283
    284
    285
    286
    287
    288
    289
    290
    291
    292
    293
    294
    295
    296
    297
    298
    299
    300
    301
    302
    303
    304
    305
    306
    307
    308
    309
    310
    311
    312
    313
    314
    315
    316
    317
    318
    319
    320
    321
    322
    323
    324
    325
    326
    327
    328
    329
    330
    331
    332
    333
    334
    335
    336
    337
    338
    339
    340
    341
    342
    343
    344
    345
    346
    347
    348
    349
    350
    351
    352
    353
    354
    355
    356
    357
    358
    359
    360
    361
    362
    363
    364
    365
    366
    367
    368
    369
    370
    371
    372
    373
    374
    375
    376
    377
    378
    379
    380
    381
    382
    383
    384
    385
    386
    387
    388
    389
    390
    391
    392
    393
    394
    395
    396
    397
    398
    399
    400
    401
    402
    403
    404
    405
    406
    407
    408
    409
    410
    411
    412
    413
    414
    415
    416
    417
    418
    419
    420
    421
    422
    423
    424
    425
    426
    427
    428
    429
    430
    431
    432
    433
    434
    435
    436
    437
    438
    439
    440
    441
    442
    443
    444
    445
    446
    447
    448
    449
    450
    451
    452
    453
    454
    455
    456
    457
    458
    459
    460
    461
    462
    463
    464
    465
    466
    467
    CREATE OR REPLACE TRIGGER KAZOZA.CUACCTYY_REC_AUDIT_TRIG
     BEFORE DELETE OR UPDATE 
     ON KAZOZA.CUACCTYY_REC  REFERENCING NEW AS NEW OLD AS OLD   --(KAZOZA c'est le Schema)
     FOR EACH ROW
    DECLARE 
        TYPE aud$ IS RECORD (tab$ VARCHAR2(30), col$  VARCHAR2(30),  col_old VARCHAR2(500), col_new  VARCHAR2(500)); 
        TYPE REC_AUD  IS TABLE OF aud$ INDEX BY BINARY_INTEGER; 
        rec$   REC_AUD; 
        actionFlag      VARCHAR2(1);
     BEGIN 
    
       IF UPDATING THEN 
          actionFlag:='M';
       ELSIF DELETING THEN  
          actionFlag:='S';
       END IF;
     rec$(1).tab$:= 'CUACCTYY_REC';
     rec$(1).col$:= 'CUA_ID';
     rec$(1).col_old:= TO_CHAR(:OLD.CUA_ID);
     rec$(1).col_new:= TO_CHAR(:NEW.CUA_ID);
     rec$(2).tab$:= 'CUACCTYY_REC';
     rec$(2).col$:= 'CUA_ACC_INT';
     rec$(2).col_old:= TO_CHAR(:OLD.CUA_ACC_INT);
     rec$(2).col_new:= TO_CHAR(:NEW.CUA_ACC_INT);
     rec$(3).tab$:= 'CUACCTYY_REC';
     rec$(3).col$:= 'CUA_ACC_CUST';
     rec$(3).col_old:= TO_CHAR(:OLD.CUA_ACC_CUST);
     rec$(3).col_new:= TO_CHAR(:NEW.CUA_ACC_CUST);
     rec$(4).tab$:= 'CUACCTYY_REC';
     rec$(4).col$:= 'CUA_MATURITY_DATE';
     rec$(4).col_old:= TO_CHAR(:OLD.CUA_MATURITY_DATE);
     rec$(4).col_new:= TO_CHAR(:NEW.CUA_MATURITY_DATE);
     rec$(5).tab$:= 'CUACCTYY_REC';
     rec$(5).col$:= 'CUA_TYPE';
     rec$(5).col_old:= TO_CHAR(:OLD.CUA_TYPE);
     rec$(5).col_new:= TO_CHAR(:NEW.CUA_TYPE);
     rec$(6).tab$:= 'CUACCTYY_REC';
     rec$(6).col$:= 'CUA_RUBRIQUE';
     rec$(6).col_old:= TO_CHAR(:OLD.CUA_RUBRIQUE);
     rec$(6).col_new:= TO_CHAR(:NEW.CUA_RUBRIQUE);
     rec$(7).tab$:= 'CUACCTYY_REC';
     rec$(7).col$:= 'CUA_CAT_DEP';
     rec$(7).col_old:= TO_CHAR(:OLD.CUA_CAT_DEP);
     rec$(7).col_new:= TO_CHAR(:NEW.CUA_CAT_DEP);
     rec$(8).tab$:= 'CUACCTYY_REC';
     rec$(8).col$:= 'CUA_STATUS';
     rec$(8).col_old:= TO_CHAR(:OLD.CUA_STATUS);
     rec$(8).col_new:= TO_CHAR(:NEW.CUA_STATUS);
     rec$(9).tab$:= 'CUACCTYY_REC';
     rec$(9).col$:= 'CUA_MOTIF';
     rec$(9).col_old:= TO_CHAR(:OLD.CUA_MOTIF);
     rec$(9).col_new:= TO_CHAR(:NEW.CUA_MOTIF);
     rec$(10).tab$:= 'CUACCTYY_REC';
     rec$(10).col$:= 'CUA_EXT_FREQ';
     rec$(10).col_old:= TO_CHAR(:OLD.CUA_EXT_FREQ);
     rec$(10).col_new:= TO_CHAR(:NEW.CUA_EXT_FREQ);
     rec$(11).tab$:= 'CUACCTYY_REC';
     rec$(11).col$:= 'CUA_EXT_NUM';
     rec$(11).col_old:= TO_CHAR(:OLD.CUA_EXT_NUM);
     rec$(11).col_new:= TO_CHAR(:NEW.CUA_EXT_NUM);
     rec$(12).tab$:= 'CUACCTYY_REC';
     rec$(12).col$:= 'CUA_EXT_NO';
     rec$(12).col_old:= TO_CHAR(:OLD.CUA_EXT_NO);
     rec$(12).col_new:= TO_CHAR(:NEW.CUA_EXT_NO);
     rec$(13).tab$:= 'CUACCTYY_REC';
     rec$(13).col$:= 'CUA_STMT_FREQ';
     rec$(13).col_old:= TO_CHAR(:OLD.CUA_STMT_FREQ);
     rec$(13).col_new:= TO_CHAR(:NEW.CUA_STMT_FREQ);
     rec$(14).tab$:= 'CUACCTYY_REC';
     rec$(14).col$:= 'CUA_OPEN_DATE';
     rec$(14).col_old:= TO_CHAR(:OLD.CUA_OPEN_DATE);
     rec$(14).col_new:= TO_CHAR(:NEW.CUA_OPEN_DATE);
     rec$(15).tab$:= 'CUACCTYY_REC';
     rec$(15).col$:= 'CUA_LTR_DATE';
     rec$(15).col_old:= TO_CHAR(:OLD.CUA_LTR_DATE);
     rec$(15).col_new:= TO_CHAR(:NEW.CUA_LTR_DATE);
     rec$(16).tab$:= 'CUACCTYY_REC';
     rec$(16).col$:= 'CUA_LEXT_DATE';
     rec$(16).col_old:= TO_CHAR(:OLD.CUA_LEXT_DATE);
     rec$(16).col_new:= TO_CHAR(:NEW.CUA_LEXT_DATE);
     rec$(17).tab$:= 'CUACCTYY_REC';
     rec$(17).col$:= 'CUA_LSTMT_DATE';
     rec$(17).col_old:= TO_CHAR(:OLD.CUA_LSTMT_DATE);
     rec$(17).col_new:= TO_CHAR(:NEW.CUA_LSTMT_DATE);
     rec$(18).tab$:= 'CUACCTYY_REC';
     rec$(18).col$:= 'CUA_LINT_DATE';
     rec$(18).col_old:= TO_CHAR(:OLD.CUA_LINT_DATE);
     rec$(18).col_new:= TO_CHAR(:NEW.CUA_LINT_DATE);
     rec$(19).tab$:= 'CUACCTYY_REC';
     rec$(19).col$:= 'CUA_LOW_VALUE_DATE';
     rec$(19).col_old:= TO_CHAR(:OLD.CUA_LOW_VALUE_DATE);
     rec$(19).col_new:= TO_CHAR(:NEW.CUA_LOW_VALUE_DATE);
     rec$(20).tab$:= 'CUACCTYY_REC';
     rec$(20).col$:= 'CUA_RECOND';
     rec$(20).col_old:= TO_CHAR(:OLD.CUA_RECOND);
     rec$(20).col_new:= TO_CHAR(:NEW.CUA_RECOND);
     rec$(21).tab$:= 'CUACCTYY_REC';
     rec$(21).col$:= 'CUA_CHEQUIER';
     rec$(21).col_old:= TO_CHAR(:OLD.CUA_CHEQUIER);
     rec$(21).col_new:= TO_CHAR(:NEW.CUA_CHEQUIER);
     rec$(22).tab$:= 'CUACCTYY_REC';
     rec$(22).col$:= 'CUA_ORDER';
     rec$(22).col_old:= TO_CHAR(:OLD.CUA_ORDER);
     rec$(22).col_new:= TO_CHAR(:NEW.CUA_ORDER);
     rec$(23).tab$:= 'CUACCTYY_REC';
     rec$(23).col$:= 'CUA_RECEIPT';
     rec$(23).col_old:= TO_CHAR(:OLD.CUA_RECEIPT);
     rec$(23).col_new:= TO_CHAR(:NEW.CUA_RECEIPT);
     rec$(24).tab$:= 'CUACCTYY_REC';
     rec$(24).col$:= 'CUA_OFF_CODE';
     rec$(24).col_old:= TO_CHAR(:OLD.CUA_OFF_CODE);
     rec$(24).col_new:= TO_CHAR(:NEW.CUA_OFF_CODE);
     rec$(25).tab$:= 'CUACCTYY_REC';
     rec$(25).col$:= 'CUA_TAXE_CODE';
     rec$(25).col_old:= TO_CHAR(:OLD.CUA_TAXE_CODE);
     rec$(25).col_new:= TO_CHAR(:NEW.CUA_TAXE_CODE);
     rec$(26).tab$:= 'CUACCTYY_REC';
     rec$(26).col$:= 'CUA_INT_PAID';
     rec$(26).col_old:= TO_CHAR(:OLD.CUA_INT_PAID);
     rec$(26).col_new:= TO_CHAR(:NEW.CUA_INT_PAID);
     rec$(27).tab$:= 'CUACCTYY_REC';
     rec$(27).col$:= 'CUA_INDISP';
     rec$(27).col_old:= TO_CHAR(:OLD.CUA_INDISP);
     rec$(27).col_new:= TO_CHAR(:NEW.CUA_INDISP);
     rec$(28).tab$:= 'CUACCTYY_REC';
     rec$(28).col$:= 'CUA_DEBTOR';
     rec$(28).col_old:= TO_CHAR(:OLD.CUA_DEBTOR);
     rec$(28).col_new:= TO_CHAR(:NEW.CUA_DEBTOR);
     rec$(29).tab$:= 'CUACCTYY_REC';
     rec$(29).col$:= 'CUA_EMPL';
     rec$(29).col_old:= TO_CHAR(:OLD.CUA_EMPL);
     rec$(29).col_new:= TO_CHAR(:NEW.CUA_EMPL);
     rec$(30).tab$:= 'CUACCTYY_REC';
     rec$(30).col$:= 'CUA_MAIL';
     rec$(30).col_old:= TO_CHAR(:OLD.CUA_MAIL);
     rec$(30).col_new:= TO_CHAR(:NEW.CUA_MAIL);
     rec$(31).tab$:= 'CUACCTYY_REC';
     rec$(31).col$:= 'CUA_MVT';
     rec$(31).col_old:= TO_CHAR(:OLD.CUA_MVT);
     rec$(31).col_new:= TO_CHAR(:NEW.CUA_MVT);
     rec$(32).tab$:= 'CUACCTYY_REC';
     rec$(32).col$:= 'CUA_PLA_CRE';
     rec$(32).col_old:= TO_CHAR(:OLD.CUA_PLA_CRE);
     rec$(32).col_new:= TO_CHAR(:NEW.CUA_PLA_CRE);
     rec$(33).tab$:= 'CUACCTYY_REC';
     rec$(33).col$:= 'CUA_DAILY_PLA_CRE';
     rec$(33).col_old:= TO_CHAR(:OLD.CUA_DAILY_PLA_CRE);
     rec$(33).col_new:= TO_CHAR(:NEW.CUA_DAILY_PLA_CRE);
     rec$(34).tab$:= 'CUACCTYY_REC';
     rec$(34).col$:= 'CUA_PLAFOND_CRE';
     rec$(34).col_old:= TO_CHAR(:OLD.CUA_PLAFOND_CRE);
     rec$(34).col_new:= TO_CHAR(:NEW.CUA_PLAFOND_CRE);
     rec$(35).tab$:= 'CUACCTYY_REC';
     rec$(35).col$:= 'CUA_INT_ACC_INT';
     rec$(35).col_old:= TO_CHAR(:OLD.CUA_INT_ACC_INT);
     rec$(35).col_new:= TO_CHAR(:NEW.CUA_INT_ACC_INT);
     rec$(36).tab$:= 'CUACCTYY_REC';
     rec$(36).col$:= 'CUA_INT_ACC_CUST';
     rec$(36).col_old:= TO_CHAR(:OLD.CUA_INT_ACC_CUST);
     rec$(36).col_new:= TO_CHAR(:NEW.CUA_INT_ACC_CUST);
     rec$(37).tab$:= 'CUACCTYY_REC';
     rec$(37).col$:= 'CUA_INT_RATE_DB';
     rec$(37).col_old:= TO_CHAR(:OLD.CUA_INT_RATE_DB);
     rec$(37).col_new:= TO_CHAR(:NEW.CUA_INT_RATE_DB);
     rec$(38).tab$:= 'CUACCTYY_REC';
     rec$(38).col$:= 'CUA_INT_RATE_CR';
     rec$(38).col_old:= TO_CHAR(:OLD.CUA_INT_RATE_CR);
     rec$(38).col_new:= TO_CHAR(:NEW.CUA_INT_RATE_CR);
     rec$(39).tab$:= 'CUACCTYY_REC';
     rec$(39).col$:= 'CUA_HIGH_OVRDRAFT';
     rec$(39).col_old:= TO_CHAR(:OLD.CUA_HIGH_OVRDRAFT);
     rec$(39).col_new:= TO_CHAR(:NEW.CUA_HIGH_OVRDRAFT);
     rec$(40).tab$:= 'CUACCTYY_REC';
     rec$(40).col$:= 'CUA_LCLOSING_BAL';
     rec$(40).col_old:= TO_CHAR(:OLD.CUA_LCLOSING_BAL);
     rec$(40).col_new:= TO_CHAR(:NEW.CUA_LCLOSING_BAL);
     rec$(41).tab$:= 'CUACCTYY_REC';
     rec$(41).col$:= 'CUA_ACCR_TOT_ONT';
     rec$(41).col_old:= TO_CHAR(:OLD.CUA_ACCR_TOT_ONT);
     rec$(41).col_new:= TO_CHAR(:NEW.CUA_ACCR_TOT_ONT);
     rec$(42).tab$:= 'CUACCTYY_REC';
     rec$(42).col$:= 'CUA_RET_PER_PERIOD';
     rec$(42).col_old:= TO_CHAR(:OLD.CUA_RET_PER_PERIOD);
     rec$(42).col_new:= TO_CHAR(:NEW.CUA_RET_PER_PERIOD);
     rec$(43).tab$:= 'CUACCTYY_REC';
     rec$(43).col$:= 'CUA_AVAILABLE_BAL';
     rec$(43).col_old:= TO_CHAR(:OLD.CUA_AVAILABLE_BAL);
     rec$(43).col_new:= TO_CHAR(:NEW.CUA_AVAILABLE_BAL);
     rec$(44).tab$:= 'CUACCTYY_REC';
     rec$(44).col$:= 'CUA_POST_VALUE_BAL';
     rec$(44).col_old:= TO_CHAR(:OLD.CUA_POST_VALUE_BAL);
     rec$(44).col_new:= TO_CHAR(:NEW.CUA_POST_VALUE_BAL);
     rec$(45).tab$:= 'CUACCTYY_REC';
     rec$(45).col$:= 'CUA_RESERVE_BAL';
     rec$(45).col_old:= TO_CHAR(:OLD.CUA_RESERVE_BAL);
     rec$(45).col_new:= TO_CHAR(:NEW.CUA_RESERVE_BAL);
     rec$(46).tab$:= 'CUACCTYY_REC';
     rec$(46).col$:= 'CUA_LY_BAL';
     rec$(46).col_old:= TO_CHAR(:OLD.CUA_LY_BAL);
     rec$(46).col_new:= TO_CHAR(:NEW.CUA_LY_BAL);
     rec$(47).tab$:= 'CUACCTYY_REC';
     rec$(47).col$:= 'CUA_LEXT_BAL';
     rec$(47).col_old:= TO_CHAR(:OLD.CUA_LEXT_BAL);
     rec$(47).col_new:= TO_CHAR(:NEW.CUA_LEXT_BAL);
     rec$(48).tab$:= 'CUACCTYY_REC';
     rec$(48).col$:= 'CUA_YTD_DEBIT';
     rec$(48).col_old:= TO_CHAR(:OLD.CUA_YTD_DEBIT);
     rec$(48).col_new:= TO_CHAR(:NEW.CUA_YTD_DEBIT);
     rec$(49).tab$:= 'CUACCTYY_REC';
     rec$(49).col$:= 'CUA_YTD_CREDIT';
     rec$(49).col_old:= TO_CHAR(:OLD.CUA_YTD_CREDIT);
     rec$(49).col_new:= TO_CHAR(:NEW.CUA_YTD_CREDIT);
     rec$(50).tab$:= 'CUACCTYY_REC';
     rec$(50).col$:= 'CUA_CLR_BAL';
     rec$(50).col_old:= TO_CHAR(:OLD.CUA_CLR_BAL);
     rec$(50).col_new:= TO_CHAR(:NEW.CUA_CLR_BAL);
     rec$(51).tab$:= 'CUACCTYY_REC';
     rec$(51).col$:= 'CUA_MTD_CREDIT';
     rec$(51).col_old:= TO_CHAR(:OLD.CUA_MTD_CREDIT);
     rec$(51).col_new:= TO_CHAR(:NEW.CUA_MTD_CREDIT);
     rec$(52).tab$:= 'CUACCTYY_REC';
     rec$(52).col$:= 'CUA_NO_OF_DEBITS';
     rec$(52).col_old:= TO_CHAR(:OLD.CUA_NO_OF_DEBITS);
     rec$(52).col_new:= TO_CHAR(:NEW.CUA_NO_OF_DEBITS);
     rec$(53).tab$:= 'CUACCTYY_REC';
     rec$(53).col$:= 'CUA_NO_OF_CREDITS';
     rec$(53).col_old:= TO_CHAR(:OLD.CUA_NO_OF_CREDITS);
     rec$(53).col_new:= TO_CHAR(:NEW.CUA_NO_OF_CREDITS);
     rec$(54).tab$:= 'CUACCTYY_REC';
     rec$(54).col$:= 'CUA_ACCR_TOT_INT_LC';
     rec$(54).col_old:= TO_CHAR(:OLD.CUA_ACCR_TOT_INT_LC);
     rec$(54).col_new:= TO_CHAR(:NEW.CUA_ACCR_TOT_INT_LC);
     rec$(55).tab$:= 'CUACCTYY_REC';
     rec$(55).col$:= 'CUA_WAIT_BAL';
     rec$(55).col_old:= TO_CHAR(:OLD.CUA_WAIT_BAL);
     rec$(55).col_new:= TO_CHAR(:NEW.CUA_WAIT_BAL);
     rec$(56).tab$:= 'CUACCTYY_REC';
     rec$(56).col$:= 'CUA_MTD_DEBIT';
     rec$(56).col_old:= TO_CHAR(:OLD.CUA_MTD_DEBIT);
     rec$(56).col_new:= TO_CHAR(:NEW.CUA_MTD_DEBIT);
     rec$(57).tab$:= 'CUACCTYY_REC';
     rec$(57).col$:= 'CUA_LMOD_DATE';
     rec$(57).col_old:= TO_CHAR(:OLD.CUA_LMOD_DATE);
     rec$(57).col_new:= TO_CHAR(:NEW.CUA_LMOD_DATE);
     rec$(58).tab$:= 'CUACCTYY_REC';
     rec$(58).col$:= 'CUA_EMET_OPER';
     rec$(58).col_old:= TO_CHAR(:OLD.CUA_EMET_OPER);
     rec$(58).col_new:= TO_CHAR(:NEW.CUA_EMET_OPER);
     rec$(59).tab$:= 'CUACCTYY_REC';
     rec$(59).col$:= 'CUA_ENCOD_OPER';
     rec$(59).col_old:= TO_CHAR(:OLD.CUA_ENCOD_OPER);
     rec$(59).col_new:= TO_CHAR(:NEW.CUA_ENCOD_OPER);
     rec$(60).tab$:= 'CUACCTYY_REC';
     rec$(60).col$:= 'CUA_LIM_EXP_DATE';
     rec$(60).col_old:= TO_CHAR(:OLD.CUA_LIM_EXP_DATE);
     rec$(60).col_new:= TO_CHAR(:NEW.CUA_LIM_EXP_DATE);
     rec$(61).tab$:= 'CUACCTYY_REC';
     rec$(61).col$:= 'CUA_PLA_DB';
     rec$(61).col_old:= TO_CHAR(:OLD.CUA_PLA_DB);
     rec$(61).col_new:= TO_CHAR(:NEW.CUA_PLA_DB);
     rec$(62).tab$:= 'CUACCTYY_REC';
     rec$(62).col$:= 'CUA_DAILY_PLA_DB';
     rec$(62).col_old:= TO_CHAR(:OLD.CUA_DAILY_PLA_DB);
     rec$(62).col_new:= TO_CHAR(:NEW.CUA_DAILY_PLA_DB);
     rec$(63).tab$:= 'CUACCTYY_REC';
     rec$(63).col$:= 'CUA_PLAFOND_DB';
     rec$(63).col_old:= TO_CHAR(:OLD.CUA_PLAFOND_DB);
     rec$(63).col_new:= TO_CHAR(:NEW.CUA_PLAFOND_DB);
     rec$(64).tab$:= 'CUACCTYY_REC';
     rec$(64).col$:= 'CUA_ATTEST';
     rec$(64).col_old:= TO_CHAR(:OLD.CUA_ATTEST);
     rec$(64).col_new:= TO_CHAR(:NEW.CUA_ATTEST);
     rec$(65).tab$:= 'CUACCTYY_REC';
     rec$(65).col$:= 'CUA_USING_CODE';
     rec$(65).col_old:= TO_CHAR(:OLD.CUA_USING_CODE);
     rec$(65).col_new:= TO_CHAR(:NEW.CUA_USING_CODE);
     rec$(66).tab$:= 'CUACCTYY_REC';
     rec$(66).col$:= 'CUA_ACTUAL_INT_DB';
     rec$(66).col_old:= TO_CHAR(:OLD.CUA_ACTUAL_INT_DB);
     rec$(66).col_new:= TO_CHAR(:NEW.CUA_ACTUAL_INT_DB);
     rec$(67).tab$:= 'CUACCTYY_REC';
     rec$(67).col$:= 'CUA_ACTUAL_INT_CR';
     rec$(67).col_old:= TO_CHAR(:OLD.CUA_ACTUAL_INT_CR);
     rec$(67).col_new:= TO_CHAR(:NEW.CUA_ACTUAL_INT_CR);
     rec$(68).tab$:= 'CUACCTYY_REC';
     rec$(68).col$:= 'CUA_FREE_ZONE_CODE';
     rec$(68).col_old:= TO_CHAR(:OLD.CUA_FREE_ZONE_CODE);
     rec$(68).col_new:= TO_CHAR(:NEW.CUA_FREE_ZONE_CODE);
     rec$(69).tab$:= 'CUACCTYY_REC';
     rec$(69).col$:= 'CUA_DATE_CREATED';
     rec$(69).col_old:= TO_CHAR(:OLD.CUA_DATE_CREATED);
     rec$(69).col_new:= TO_CHAR(:NEW.CUA_DATE_CREATED);
     rec$(70).tab$:= 'CUACCTYY_REC';
     rec$(70).col$:= 'CUA_USER_CREATED';
     rec$(70).col_old:= TO_CHAR(:OLD.CUA_USER_CREATED);
     rec$(70).col_new:= TO_CHAR(:NEW.CUA_USER_CREATED);
     rec$(71).tab$:= 'CUACCTYY_REC';
     rec$(71).col$:= 'CUA_DATE_MODIFIED';
     rec$(71).col_old:= TO_CHAR(:OLD.CUA_DATE_MODIFIED);
     rec$(71).col_new:= TO_CHAR(:NEW.CUA_DATE_MODIFIED);
     rec$(72).tab$:= 'CUACCTYY_REC';
     rec$(72).col$:= 'CUA_USER_MODIFIED';
     rec$(72).col_old:= TO_CHAR(:OLD.CUA_USER_MODIFIED);
     rec$(72).col_new:= TO_CHAR(:NEW.CUA_USER_MODIFIED);
     rec$(73).tab$:= 'CUACCTYY_REC';
     rec$(73).col$:= 'CUA_ACCR_TOT_INT';
     rec$(73).col_old:= TO_CHAR(:OLD.CUA_ACCR_TOT_INT);
     rec$(73).col_new:= TO_CHAR(:NEW.CUA_ACCR_TOT_INT);
     rec$(74).tab$:= 'CUACCTYY_REC';
     rec$(74).col$:= 'CUA_PLA';
     rec$(74).col_old:= TO_CHAR(:OLD.CUA_PLA);
     rec$(74).col_new:= TO_CHAR(:NEW.CUA_PLA);
     rec$(75).tab$:= 'CUACCTYY_REC';
     rec$(75).col$:= 'CUA_GARANTIE_BAL';
     rec$(75).col_old:= TO_CHAR(:OLD.CUA_GARANTIE_BAL);
     rec$(75).col_new:= TO_CHAR(:NEW.CUA_GARANTIE_BAL);
     rec$(76).tab$:= 'CUACCTYY_REC';
     rec$(76).col$:= 'CUA_EXP_GAR_DATE';
     rec$(76).col_old:= TO_CHAR(:OLD.CUA_EXP_GAR_DATE);
     rec$(76).col_new:= TO_CHAR(:NEW.CUA_EXP_GAR_DATE);
     rec$(77).tab$:= 'CUACCTYY_REC';
     rec$(77).col$:= 'CUA_INTERET_RETARD';
     rec$(77).col_old:= TO_CHAR(:OLD.CUA_INTERET_RETARD);
     rec$(77).col_new:= TO_CHAR(:NEW.CUA_INTERET_RETARD);
     rec$(78).tab$:= 'CUACCTYY_REC';
     rec$(78).col$:= 'CUA_COMMENT';
     rec$(78).col_old:= TO_CHAR(:OLD.CUA_COMMENT);
     rec$(78).col_new:= TO_CHAR(:NEW.CUA_COMMENT);
     rec$(79).tab$:= 'CUACCTYY_REC';
     rec$(79).col$:= 'CUA_FILLER';
     rec$(79).col_old:= TO_CHAR(:OLD.CUA_FILLER);
     rec$(79).col_new:= TO_CHAR(:NEW.CUA_FILLER);
     rec$(80).tab$:= 'CUACCTYY_REC';
     rec$(80).col$:= 'CUA_DEC_TYPE';
     rec$(80).col_old:= TO_CHAR(:OLD.CUA_DEC_TYPE);
     rec$(80).col_new:= TO_CHAR(:NEW.CUA_DEC_TYPE);
     rec$(81).tab$:= 'CUACCTYY_REC';
     rec$(81).col$:= 'CUA_SEGMENT_CODE';
     rec$(81).col_old:= TO_CHAR(:OLD.CUA_SEGMENT_CODE);
     rec$(81).col_new:= TO_CHAR(:NEW.CUA_SEGMENT_CODE);
     rec$(82).tab$:= 'CUACCTYY_REC';
     rec$(82).col$:= 'CUA_AUTH_FLAG';
     rec$(82).col_old:= TO_CHAR(:OLD.CUA_AUTH_FLAG);
     rec$(82).col_new:= TO_CHAR(:NEW.CUA_AUTH_FLAG);
     rec$(83).tab$:= 'CUACCTYY_REC';
     rec$(83).col$:= 'CUA_AUTH_BY';
     rec$(83).col_old:= TO_CHAR(:OLD.CUA_AUTH_BY);
     rec$(83).col_new:= TO_CHAR(:NEW.CUA_AUTH_BY);
     rec$(84).tab$:= 'CUACCTYY_REC';
     rec$(84).col$:= 'CUA_AUTH_DATE';
     rec$(84).col_old:= TO_CHAR(:OLD.CUA_AUTH_DATE);
     rec$(84).col_new:= TO_CHAR(:NEW.CUA_AUTH_DATE);
     rec$(85).tab$:= 'CUACCTYY_REC';
     rec$(85).col$:= 'CUA_FONCTION_GROUPE';
     rec$(85).col_old:= TO_CHAR(:OLD.CUA_FONCTION_GROUPE);
     rec$(85).col_new:= TO_CHAR(:NEW.CUA_FONCTION_GROUPE);
     rec$(86).tab$:= 'CUACCTYY_REC';
     rec$(86).col$:= 'CUA_AGIOS';
     rec$(86).col_old:= TO_CHAR(:OLD.CUA_AGIOS);
     rec$(86).col_new:= TO_CHAR(:NEW.CUA_AGIOS);
     rec$(87).tab$:= 'CUACCTYY_REC';
     rec$(87).col$:= 'CUA_WAITING_BAL';
     rec$(87).col_old:= TO_CHAR(:OLD.CUA_WAITING_BAL);
     rec$(87).col_new:= TO_CHAR(:NEW.CUA_WAITING_BAL);
     rec$(88).tab$:= 'CUACCTYY_REC';
     rec$(88).col$:= 'CUA_CAB';
     rec$(88).col_old:= TO_CHAR(:OLD.CUA_CAB);
     rec$(88).col_new:= TO_CHAR(:NEW.CUA_CAB);
     rec$(89).tab$:= 'CUACCTYY_REC';
     rec$(89).col$:= 'CUA_IND_FRAIS';
     rec$(89).col_old:= TO_CHAR(:OLD.CUA_IND_FRAIS);
     rec$(89).col_new:= TO_CHAR(:NEW.CUA_IND_FRAIS);
     rec$(90).tab$:= 'CUACCTYY_REC';
     rec$(90).col$:= 'CUA_CAB_STATUS';
     rec$(90).col_old:= TO_CHAR(:OLD.CUA_CAB_STATUS);
     rec$(90).col_new:= TO_CHAR(:NEW.CUA_CAB_STATUS);
     rec$(91).tab$:= 'CUACCTYY_REC';
     rec$(91).col$:= 'CUA_IND_OUVERT_FRAIS';
     rec$(91).col_old:= TO_CHAR(:OLD.CUA_IND_OUVERT_FRAIS);
     rec$(91).col_new:= TO_CHAR(:NEW.CUA_IND_OUVERT_FRAIS);
     rec$(92).tab$:= 'CUACCTYY_REC';
     rec$(92).col$:= 'CUA_OUVERT_FRAIS';
     rec$(92).col_old:= TO_CHAR(:OLD.CUA_OUVERT_FRAIS);
     rec$(92).col_new:= TO_CHAR(:NEW.CUA_OUVERT_FRAIS);
     rec$(93).tab$:= 'CUACCTYY_REC';
     rec$(93).col$:= 'CUA_IND_CALC_INTERET';
     rec$(93).col_old:= TO_CHAR(:OLD.CUA_IND_CALC_INTERET);
     rec$(93).col_new:= TO_CHAR(:NEW.CUA_IND_CALC_INTERET);
     rec$(94).tab$:= 'CUACCTYY_REC';
     rec$(94).col$:= 'CUA_ANC_CPT';
     rec$(94).col_old:= TO_CHAR(:OLD.CUA_ANC_CPT);
     rec$(94).col_new:= TO_CHAR(:NEW.CUA_ANC_CPT);
     rec$(95).tab$:= 'CUACCTYY_REC';
     rec$(95).col$:= 'CUA_ANC_ID';
     rec$(95).col_old:= TO_CHAR(:OLD.CUA_ANC_ID);
     rec$(95).col_new:= TO_CHAR(:NEW.CUA_ANC_ID);
     rec$(96).tab$:= 'CUACCTYY_REC';
     rec$(96).col$:= 'CUA_FULL_ANC_CPT';
     rec$(96).col_old:= TO_CHAR(:OLD.CUA_FULL_ANC_CPT);
     rec$(96).col_new:= TO_CHAR(:NEW.CUA_FULL_ANC_CPT);
     rec$(97).tab$:= 'CUACCTYY_REC';
     rec$(97).col$:= 'CUA_ANC_INT';
     rec$(97).col_old:= TO_CHAR(:OLD.CUA_ANC_INT);
     rec$(97).col_new:= TO_CHAR(:NEW.CUA_ANC_INT);
     rec$(98).tab$:= 'CUACCTYY_REC';
     rec$(98).col$:= 'CUA_ID_PROD';
     rec$(98).col_old:= TO_CHAR(:OLD.CUA_ID_PROD);
     rec$(98).col_new:= TO_CHAR(:NEW.CUA_ID_PROD);
     rec$(99).tab$:= 'CUACCTYY_REC';
     rec$(99).col$:= 'CUA_INTERET_ANNUEL';
     rec$(99).col_old:= TO_CHAR(:OLD.CUA_INTERET_ANNUEL);
     rec$(99).col_new:= TO_CHAR(:NEW.CUA_INTERET_ANNUEL);
     rec$(100).tab$:= 'CUACCTYY_REC';
     rec$(100).col$:= 'CUA_SOLDE_PART_SOC_RESTANT';
     rec$(100).col_old:= TO_CHAR(:OLD.CUA_SOLDE_PART_SOC_RESTANT);
     rec$(100).col_new:= TO_CHAR(:NEW.CUA_SOLDE_PART_SOC_RESTANT);
     rec$(101).tab$:= 'CUACCTYY_REC';
     rec$(101).col$:= 'CUA_DECOUVERT_MAX';
     rec$(101).col_old:= TO_CHAR(:OLD.CUA_DECOUVERT_MAX);
     rec$(101).col_new:= TO_CHAR(:NEW.CUA_DECOUVERT_MAX);
     rec$(102).tab$:= 'CUACCTYY_REC';
     rec$(102).col$:= 'CUA_DECOUVERT_DATE_UTIL';
     rec$(102).col_old:= TO_CHAR(:OLD.CUA_DECOUVERT_DATE_UTIL);
     rec$(102).col_new:= TO_CHAR(:NEW.CUA_DECOUVERT_DATE_UTIL);
     rec$(103).tab$:= 'CUACCTYY_REC';
     rec$(103).col$:= 'CUA_AD_ETAT';
     rec$(103).col_old:= TO_CHAR(:OLD.CUA_AD_ETAT);
     rec$(103).col_new:= TO_CHAR(:NEW.CUA_AD_ETAT);
     rec$(104).tab$:= 'CUACCTYY_REC';
     rec$(104).col$:= 'CUA_SAL_FRAIS';
     rec$(104).col_old:= TO_CHAR(:OLD.CUA_SAL_FRAIS);
     rec$(104).col_new:= TO_CHAR(:NEW.CUA_SAL_FRAIS);
     rec$(105).tab$:= 'CUACCTYY_REC';
     rec$(105).col$:= 'CUA_LINT_BAL';
     rec$(105).col_old:= TO_CHAR(:OLD.CUA_LINT_BAL);
     rec$(105).col_new:= TO_CHAR(:NEW.CUA_LINT_BAL);
     rec$(106).tab$:= 'CUACCTYY_REC';
     rec$(106).col$:= 'CUA_DT_ATTENTE';
     rec$(106).col_old:= TO_CHAR(:OLD.CUA_DT_ATTENTE);
     rec$(106).col_new:= TO_CHAR(:NEW.CUA_DT_ATTENTE);
     rec$(107).tab$:= 'CUACCTYY_REC';
     rec$(107).col$:= 'CUA_CORR_FLAG';
     rec$(107).col_old:= TO_CHAR(:OLD.CUA_CORR_FLAG);
     rec$(107).col_new:= TO_CHAR(:NEW.CUA_CORR_FLAG);
     rec$(108).tab$:= 'CUACCTYY_REC';
     rec$(108).col$:= 'CUA_LAST_MVT';
     rec$(108).col_old:= TO_CHAR(:OLD.CUA_LAST_MVT);
     rec$(108).col_new:= TO_CHAR(:NEW.CUA_LAST_MVT);
     rec$(109).tab$:= 'CUACCTYY_REC';
     rec$(109).col$:= 'CUA_LAST_MVT_SOLDE';
     rec$(109).col_old:= TO_CHAR(:OLD.CUA_LAST_MVT_SOLDE);
     rec$(109).col_new:= TO_CHAR(:NEW.CUA_LAST_MVT_SOLDE);
     rec$(110).tab$:= 'CUACCTYY_REC';
     rec$(110).col$:= 'CUA_HIST_ACC_INT';
     rec$(110).col_old:= TO_CHAR(:OLD.CUA_HIST_ACC_INT);
     rec$(110).col_new:= TO_CHAR(:NEW.CUA_HIST_ACC_INT);
     FOR i IN 1..rec$.COUNT LOOP
        IF nvl(rec$(i).col_old,'X') != nvl(rec$(i).col_new,'X') AND actionFlag ='M' THEN  
           INSERT INTO AUDIT_REC (TABLE_NAME,   COLUMN_NAME, ROW_ID ,OLD_VALUE,      NEW_VALUE,     USER_NAME, DATE_MODIFIED, ACTION_FLAG,SQL_TXT,TERMINAL,OSIP,MODULE,ACC_CUST) VALUES
                                 (rec$(i).tab$, rec$(i).col$,:OLD.ROWID ,rec$(i).col_old,rec$(i).col_new, USER2,    SYSDATE,actionFlag,sys_context('userenv','current_sql'),sys_context('userenv','host'),sys_context('USERENV','IP_ADDRESS'),sys_context('userenv','module'),:old.cua_acc_cust);
        ELSIF actionFlag ='S' THEN 
           INSERT INTO AUDIT_REC (TABLE_NAME,   COLUMN_NAME, ROW_ID , OLD_VALUE,      NEW_VALUE,     USER_NAME, DATE_MODIFIED, ACTION_FLAG,SQL_TXT,TERMINAL,OSIP,MODULE,ACC_CUST) VALUES
                                 (rec$(i).tab$, rec$(i).col$, :OLD.ROWID ,rec$(i).col_old,rec$(i).col_new, USER2,    SYSDATE,actionFlag,sys_context('userenv','current_sql'),sys_context('userenv','host'),sys_context('USERENV','IP_ADDRESS'),sys_context('userenv','module'),:old.cua_acc_cust);
        END IF; 
      END LOOP; 
    END;
    /
    mais pour retourné le nom du poste client, j'utilisais : UTL_INADDR.GET_HOST_NAME(SYS_CONTEXT('USERENV','IP_ADDRESS')), mais ça donne toujour le nom du serveur.

    Je vous signale ici que pour retourner le nom de l'utilisateur, je me sers du context que je crée moi même.

    S'il vous plais modérateur, j'ai besoins de votre aide. Merci encore.

  6. #6
    Futur Membre du Club
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Septembre 2013
    Messages
    9
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Burundi

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : Services à domicile

    Informations forums :
    Inscription : Septembre 2013
    Messages : 9
    Points : 6
    Points
    6
    Par défaut
    v$session contiens les utilisateurs crées directement dans la base de données, mon logiciel lui crée les utilisateurs dans un table personnalisée

    Je demande pardon à toutes les erreurs que je suis entrain de commettre dans mes messages. Veuillez tous m'excuser, s'il vous plaît.

  7. #7
    Expert éminent sénior Avatar de mnitu
    Homme Profil pro
    Ingénieur développement logiciels
    Inscrit en
    Octobre 2007
    Messages
    5 611
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Marne (Champagne Ardenne)

    Informations professionnelles :
    Activité : Ingénieur développement logiciels
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Octobre 2007
    Messages : 5 611
    Points : 11 252
    Points
    11 252
    Par défaut
    Si vous êtes en client-serveur la fonction SYS_CONTEXT vous donne l'adresse IP de la machine où se trouve le client qui s'est connecté à la base. Si vous êtes en trois tiers c'est le serveur d'application qui se connecte à la base et donc vous récupérez l'adresse IP du serveur d'application. Vous êtes dans quel scénario en fait ?

    Dans le deuxième scénario votre problème a une solution seulement si vous pouvez récupérer l'adresse IP du client via le logiciel qui exécute le client et le transmettre à Oracle via DBMS_APPLICATION_INFO.SET/READ_CLIENT_INFO ou autre méthode similaire.

  8. #8
    Futur Membre du Club
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Septembre 2013
    Messages
    9
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Burundi

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : Services à domicile

    Informations forums :
    Inscription : Septembre 2013
    Messages : 9
    Points : 6
    Points
    6
    Par défaut
    Merci beaucoup mnitu, notre système utilise les deux architectures. Certaines machines se connectent directement sur Serveur(client-serveur), d'autres passent par le serveur d'application(3-tiers).
    Je veux essayer avec ce que vous me donnez, je vous tiens au courent. Mais malheureusement je ne sais pas comment utiliser ces fonctions (DBMS_APPLICATION_INFO.SET/READ_CLIENT_INFO)

    Merci bcp.

  9. #9
    Expert éminent sénior Avatar de mnitu
    Homme Profil pro
    Ingénieur développement logiciels
    Inscrit en
    Octobre 2007
    Messages
    5 611
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Marne (Champagne Ardenne)

    Informations professionnelles :
    Activité : Ingénieur développement logiciels
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Octobre 2007
    Messages : 5 611
    Points : 11 252
    Points
    11 252
    Par défaut
    Pour les machines en client serveur Sys_context devrait fonctionner. Pour celles en 3 tiers il vous faut un moyen de récupérer l'adresse ip de la machine client et le transmettre comme paramètre vers le serveur d'application qui par la suite invoke le package ...SET via un CALL pour l'initialiser dans le contexte de sa session. Le trigger invoqué de cette manière pourrait la récupérer via ...Get. Mais comme vous voyez dans ce cas le problème se déplace vers la machine client et le code qu'elle est capable d'exécuter pour obtenir l'adresse IP.

  10. #10
    Futur Membre du Club
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Septembre 2013
    Messages
    9
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Burundi

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : Services à domicile

    Informations forums :
    Inscription : Septembre 2013
    Messages : 9
    Points : 6
    Points
    6
    Par défaut
    Bonjour mnitu,
    J'étais un peu empêché. Merci pour la réponse. Mais j'ai essayé mais ça donne la même la chose. Est ce que vous pouvez me montrer comment récupérer cet adresse IP(dans le cas où je suis sur 3-tiers) et comment fonctionne la fonction (DBMS_APPLICATION_INFO.SET/READ_CLIENT_INFO).

    Je vous en prie, aide moi à résoudre ce problème, je suis vraiment coincé. Merci d'avance.

  11. #11
    Futur Membre du Club
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Septembre 2013
    Messages
    9
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Burundi

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : Services à domicile

    Informations forums :
    Inscription : Septembre 2013
    Messages : 9
    Points : 6
    Points
    6
    Par défaut
    Citation Envoyé par mnitu Voir le message
    Pour les machines en client serveur Sys_context devrait fonctionner. Pour celles en 3 tiers il vous faut un moyen de récupérer l'adresse ip de la machine client et le transmettre comme paramètre vers le serveur d'application qui par la suite invoke le package ...SET via un CALL pour l'initialiser dans le contexte de sa session. Le trigger invoqué de cette manière pourrait la récupérer via ...Get. Mais comme vous voyez dans ce cas le problème se dépalce vers la machine client et le code quelle est capable d'exécuter pour obtenir l'adresse IP.

    Bonjour mnitu!
    Merci beaucoup pour ton aide. J'ai fini de trouver la réponse en utilisant la librairie WEBUTIL.
    Merci encore. Que Dieu te bénisse.
    A la prochaine.

  12. #12
    Membre actif
    Inscrit en
    Janvier 2010
    Messages
    135
    Détails du profil
    Informations forums :
    Inscription : Janvier 2010
    Messages : 135
    Points : 234
    Points
    234
    Par défaut
    > dans le cas où je suis sur 3-tiers...

    Juste au cas où vous utilisez "Fusion Middleware Forms Services", vous pouvez obtenir l'adresse IP du client à partir de l'interface graphique de Fusion Middleware Control:
    https://docs.oracle.com/cd/E15523_01...e.htm#FSDEP591

    Si vous voulez écrire un programme pour obtenir l'IP au format texte:
    http://yong321.freeshell.org/oranote...ionMonitor.txt

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. [11gR2] Sur un poste client, où TNSNAMES.ora trouve l'adresse IP?
    Par Ikebukuro dans le forum Administration
    Réponses: 4
    Dernier message: 12/01/2016, 19h44
  2. Réponses: 6
    Dernier message: 26/02/2013, 16h09
  3. Réponses: 0
    Dernier message: 08/05/2012, 11h11
  4. Récupération de l'adresse IP du poste client
    Par isagarran dans le forum Apache
    Réponses: 1
    Dernier message: 07/07/2008, 10h45
  5. [CR10][ASP.NET]Impression sur le poste Client
    Par David.V dans le forum SAP Crystal Reports
    Réponses: 1
    Dernier message: 30/04/2004, 13h41

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo