Insert the password encrypted in the table user = > ORA-01861

Hello

I have a little problem, I try to save a password encrypted in the user's my table:

It works well:
declare
test VARCHAR2(40);
begin
select RAWTOHEX(dbms_crypto.hash(utl_raw.cast_to_raw('yyyyyyy'), dbms_crypto.hash_sh1)) into test from dual;
DBMS_OUTPUT.PUT_LINE(test);
end;
/
But when I try to integrate it into a procedure to insert in my table of the user, it shows me an error ORA-01861:
create or replace procedure inserer_utilisateur(v_nom in varchar2, v_prenom in varchar2, v_adresse in varchar2, v_mail in varchar2, v_login in varchar2, v_password in varchar2, v_dateNaissance in date) as
    id_uti integer;
    id_duti integer;
begin
    select seq_Utilisateur.nextval into id_uti from dual;
    insert into Utilisateur values (id_uti,v_nom,v_prenom,v_adresse,v_mail,v_login,RAWTOHEX(dbms_crypto.hash(utl_raw.cast_to_raw(v_password), dbms_crypto.hash_sh1)),to_date(v_dateNaissance,'DD-MM-YYYY'));
    select seq_Droit_Utilisateur.nextval into id_duti from dual;
    insert into Droit_Utilisateur values (id_duti,id_uti,1); 
end;
The procedure is called from my APEX application, it works when I don't encrypt the password.

I forgot something?

Thank you.

Yann.

The problem has nothing to do with encryption

The v_dateNaissance parameter is a date, remove the TO_DATE at all:

insert into Utilisateur values (id_uti,v_nom,v_prenom,v_adresse,v_mail,v_login,RAWTOHEX(dbms_crypto.hash(utl_raw.cast_to_raw(v_password), dbms_crypto.hash_sh1)),v_dateNaissance);

Max
http://oracleitalia.WordPress.com

Published by: Massimo Ruocchio, February 16, 2010 18:43

Tags: Database

Similar Questions

  • Granting of privileges of table on the tables users another

    Can someone tell me what a privilege must be granted to a user to be able to grant the insert/update/select/Delete/execute on an other users tables/packet?

    I thought that "grant any privilege" has been the only one to have... and - user I am using to grant privileges on the other scheme users this has however - I always get: ORA-01031: insufficient privileges when you try to run the grants.

    Any ideas what I'm doing wrong here?

    By default, a package runs under the privilege of the owner unless you specify the rights of authentication as long as the current user. The owner must have a direct grant of the object of all the privileges used and cannot inherit those privileges to a role.

    How the owner has the 'all purpose of grant privilege' which they have been granted? Or should you be run as the current user to their privileges.

    HTH - Mark D Powell.

  • Synchronize the Table Users with user Table SFDC Eloqua... has anyone done it?

    We can now use autosync integration to new downloads and update existing users of Eloqua that exist in the Salesforce.com user Table. I built a proof of concept to do this, so that SFDC is the system of registration of data of rep because I've been in a situation where marketing updates users eloqua for customization and data does not match what exists in salesforce, duplicate efforts...

    In any case, here are some of the complications that I find so far:

    The key identifier Unique to the Eloqua user Table is the 'User name' field and cannot be changed (his knowledge actually not yet public, I had to find out the hard way) that it should really be, e-mail address. According to Eloqua, the username is "firstname.lastname", "Nick.McGirr" would be my username Eloqua.

    1 Salesforce.com User Table does not have a username like that field. Your team of DEV SFDC will probably have to invent one that will take the first name and family name and create "first.last" on a new field to map to for your autosync.

    2. here's the real question, what does Eloqua if the company of enterprise-level and has a handful of John Smith of sellers? Do I need to say to the SFDC DEV team to make 'John.Smith1', 'John Smith2' and 'John Smith3'? What is the convention of naming of duplicates?

    I've referenced that a certain time before being published as a feature that there could be a possibility to do this type of synchronization, here. Some might find this information useful to this topic: http://topliners.eloqua.com/message/1795

    Hi Nick,

    We have done that... and implemented the exact logic you mentioned... with minor twist... take the first name, last name and add the ID unique company Emp in a field and operate as username for Eloqua. You can even add

    I hope this helps.

    Thank you

    Amit

  • How to insert the table of contents within a table

    Using FrameMaker 12, I create a table of contents within a table. This means, 1st column contains the number of paragraphs, the 2nd column of the text of the paragraphs, the 3rd column the page numbers. Of course, each item must fill each cell of the table. I downloaded an example.

    Thank you for your help

    Nicolas

    TOC special format.jpg

    Create a table of contents in normal conditions and use tabs as separators between the page number and section number, <$paratext>.

    Then use convert FM to the usefulness of the table to convert the table of contents for a table using the table design appropriate to your catalog.

    It's a manual, and you will have to redo this each time that you update the table, but it should only take a few clicks to do. Automate the steps with a script would make it less painful.

  • How can I insert the apex user id in the table when connecting?

    Hello

    I created a database with SSO on application. As you know because, single-sign - on my users don't need to enter name of user and password to log into the application. When a user in my application login ID (email add) automatically appears in the upper right automatically. My question is how can I capture user ID in the user's my table when a connection of the user in the application?

    Appreciate any help.

    Thank you

    Mohammad

    Maybe my solution:

    1. Application-shared logic components, you have processes of the article.

    2. create processes with process Point: on the new Instance and text:

    declare
    l_exists integer;
    begin
    select count(*) into l_exists from user_objects
      where object_type = 'TABLE'
      and object_name = 'AUDIT_USERS' AND ROWNUM=1;
    if l_exists = 0 then
    execute immediate 'CREATE TABLE  AUDIT_USERS
           (WHEN DATE,
              USER_NAME VARCHAR2(30)
           )';
    end if;
    insert into AUDIT_USERS values (sysdate, v('APP_USER'));
    end;
    

    Concerning

    Ziut

  • When inserting the data for ORA-00600.

    Hello

    I am inserting a lot of record in a table, while inserting some records I give below error.

    Error in the command line: 54 column: 1

    Error report:

    [SQL error: ORA-00600: internal error code, arguments: [ktbesc_plugged], [], [], [], [], [], [], [], [], [], []]

    00600 00000 - "internal error code, arguments: [%s], [%s], [%s], [%s], [%s], [%s], [%s], [%s] '.

    * Cause: It's the generic internal error for Oracle program number

    exceptions.    This indicates that a process has encountered a

    Exceptional condition.

    * Action: Report as a bug - the first argument is the internal error number

    Above the error only comes for some records only. But works fine for other records.

    Hi Sher,

    Thanks for your reply, maybe this would help.

    I have question regarding ORA-0600, is it possible that this error occur for some selected only all time record.

    I tried 10 to 15 times. For some selected only records, this error occurs every time. If I jump records, it works fine.

    So is it possible that the error ORA-0600 occur that for some files only.

  • accounting software inserts the user name in the modified records,

    I have a customer accounting business.  A laptop there is a user "Kathy".  She connects with Kathy, all I see is Kathy, except when I echo % user_name % the result is 'user '.   The problem is that accounting software inserts the user name in the records changed, which makes 'Kathy' changes to a customer record eventually registered as being made by 'user '.  All computers in the company have the same user (different usernames) parameters and all other computers insert the correct user name in the records of change.

    Profile of Kathy is new and there is no other user account on this computer.

    Profile in the registry settings all show them "Kathy".

    Can someone tell me how to solve this problem?

    Thank you

    OT:

    Windows user name

    I think would be best to contact the developer of accounting software.  We have no idea of what the software needs or.

  • Existence and creating the table

    Sometimes the table name must be fully qualified and sometimes not. I guess I should watch a coat of primer on the tables, users, tablespaces.

    Thank you
    Ken
        
    drop table "BIS_USER"."ACDArea" ;
    
      --Got this exporting dll from existing table prior to dropping
      CREATE TABLE "BIS_USER"."ACDArea" 
       (     "DivisionId" NUMBER(*,0) NOT NULL ENABLE, 
         "AreaID" NUMBER(*,0) NOT NULL ENABLE, 
         "Area" VARCHAR2(20 BYTE)
       ) SEGMENT CREATION IMMEDIATE 
      PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS NOLOGGING
      STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
      TABLESPACE "USERS" ;
     
    -- "table or view does not exist" 
    insert into acdarea values (1, 2, 'northeast');
     
    create table acdarea2 ( 
      divisionid int,
      areaid int,
      area varchar2(100)
    );
    
    -- works fine
    insert into acdarea2 values (1, 2, 'south by southwest');

    Hello

    ktrock wrote:
    Sometimes the table name must be fully qualified and sometimes not. I guess I should watch a coat of primer on the tables, users, tablespaces.

    Yes, it is a good idea.

    CREATE TABLE 'BIS_USER '. "" ACDArea ".
    ...
    -"table or view does not exist.
    insert into acdarea values (1, 2, "Northeast");

    Anything either inside quotes is case-sensitive. Anything not in quotes is uppercase before compiling. So if you create a table with quotes and lowercase name (and the last 3 letters of the "ACDArea" are tiny) then you must use double quotes and the exact capitialization of even every time you reference this table.

    Do not use quotation marks. It will be just extra work and confusion for you and for all those who have to write code for this table.

  • Lose the vertical alignment of the table during the conversion of the ditamap to book

    FrameMaker Version: 12.0.4.445 (later part of TCS5)

    1. I have a project structured, where several XML files have been grouped in a ditamap.
    2. For one of the XML files, I have a table, where I need to set the cell Vertical alignment of cells in the MIDDLE.
    3. So using Paragraph Designer > table cell, I have change the entries in the top in the Middle (the default values have been Top).
    4. With the ditamap pane selected, I'll then menu file > > Save Ditamap under
    5. I save ditamap as ' book with fm components 12.0 (* .book) "file type.
    6. In the resulting book, the XML files are now. FM files.

    However, at this point, when I open the. File of FM which has the table, the cell styles back to the TOP.

    I searched high and low for a similar problem. It's look like a bug to me, but can someone confirm?

    Thank you

    No, this is not a bug by itself. I bet that the alignment is lost before you generate the book. After you set the alignment and saving and closing the file... reopen and see if the alignment is still there... I bet it's gone. As a general rule, you cannot apply put in shape or properties to objects (elements) in a DITA file. This applies to font and paragraph properties as well as table set in shape and other types of development in the form. All you can do is create items and set attributes. Any parameter properties will usually be lost on file save.

    You would probably need to have a 'process of publication' (script any) you run your generated book and chapter files that would scan for an attribute that shows some properties must be set on the table. The @outputclass attribute is typically used for this kind of thing. I'm not aware of what anyone in default FrameMaker DITA, who put in place to manage this type of formatting of the tables.

    If this formatting that you try to apply is consistent for the whole table, it is possible that you will be able to do this by creating a new table format that has this set of default formatting. When you insert a table in a subject, the table format is assigned to the tgroup/@outputclass attribute and this is the form that is used when rendering the table. Just create a new table in the structured application model and put in place this format to have the properties you want. Then, when you insert the table, be sure to select this format. It can be hard to set this up, but it * should * work.

    However, if this does not work, or you need more refined formatting applied to the parts of the table, I produce a tool called DITA-FMx, which offers extended DITA creation and publication of the options for FrameMaker. It offers features that allow this type of table set shaped to be applied by setting the attribute @outputclass to a specific value on the line or cell. You can get more information on DITA-FMx here...

    http://leximation.com/DITA-FMX/

    Good luck!

    Scott Prentice

    Leximation, Inc..

    www.leximation.com

  • Generate the table of contents with chapter markers?

    It has been a while since I had to install and create a table of contents for a long document of single file, but I'm sure that I created TOCs in this way in the past. Then, why the text in the Section markers will appear in the table of contents? It is even possible to generate a table of contents that contains text of article marker?

    I use InDesign CS5 in Windows. I have a file single document I'm trying to generate a table of contents for. I designed a 16-page manual in an inDesign file that includes a cover page, table of contents page and seven "chapters."

    I created a separate section for each 'chapter' and used Chapter markers in the top of the page master for chapter names. It's something I did in the past of syntactically long documents containing several chapters.

    I put the first page of each 'chapter' as a new Section on the Pages panel. In numbering and Section Options for each page, I checked the Section getting started, Automatic Page numbering, the Style of Page numbering: 1,2,3,4... and in Section marker: I put the name of 'chapter' in the text box.

    InDesign_Pages_NumberingSectionOptions.jpg

    I've set up paragraph and character Styles and has used throughout my document. When I put in place the table of contents I created everything correctly, including a heading style that I used for all the sub lines in my file and my style of Section marker for chapter names.

    InDesign_TOC.jpg

    When I insert the table of contents, generate headers sub with their page numbers, but the titles of the chapters which are chapter markers do not generate. Am I missing something or is it still possible to enter the text of chapter markers in a table of contents? I'm sure that he's worked in the past. Can anyone offer a solution for this?

    Thank you

    Kat

    Looks like the markers section present only in the table of contents if they are on a document page. Try manually to the substitution of the frame.

  • Problem with the Table result variable

    When you save a document structured in XML, the Table Continuation variable is translated to an entity named "fm.tcont".

    Strangely, the content of the entity is a control character (0 x 11). The file is saved in XML format, but the Analyzer Returns an error,

    Error message to the file d:\test\100219\doc_test.xml.1F0, line 31, char 22,: Invalid character (Unicode: 0 x 11)
    Error on line 31, tank 24, Message: expected a value of literal entity or PUBLIC/SYSTEM identifier
    Parse error on line 31, tank 20: not well formed (invalid token)
    The abandoned analysis.

    The contents of the variable nothing suspicious, it's just '(continued)', where the first character is a normal space.

    If someone had the same problem and knows how to fix?

    It's on FM8.0p277 on Windows XP.

    Thank you very much in advance,

    Johannes

    Johannes,

    I don't have the direct response, because I've never tried. But my EDD has a TableContinuation element that is empty; ESD inserts the table continuation variable. When you export to XML, the element is there as a "marker"; It has NO content. When open in the frame, ESD inserts the variable again. My reasoning is that the table continuation variable has meaning ONLY within FrameMaker. It's a formatting object, not a content container. No post processing of the XML data would not need if so, ITS engine could provide what it is able to understand.

    Anyway, here's how I deal with it.

    Good luck
    Van

  • RollbackToSP will be working if the column in the table has been abandoned?

    Hi all

    I would really appreciate an opinion on these two scenarios in OWM.

    Scenario one

    Steps to follow:



    Savepoint1, created may 20
    DIAL THE DBMS_WM. CreateSavepoint ('LIVE', 'RRR_Test');


    May 21 change us a table with version:


    DBMS_WM EXEC. BEGINDDL ('users');



    -remove unused column

    ALTER table drop column field users_LTS;



    EXEC DBMS_WM.COMMITDDL ('users');



    3 roll back at the point of backup created on 20 may
    DIAL THE DBMS_WM. RollbackToSP ('LIVE ',' RRR_Test);





    End of the scenario



    Question: Will the OWM correctly changes rollback made to the schema of the table USERS?









    Second scenario





    1 Savepoint1 created may 20
    DIAL THE DBMS_WM. CreateSavepoint ('LIVE', 'RRR_Test');



    May 21 change us a table with version:


    DBMS_WM EXEC. BEGINDDL ('users');



    -remove unused column

    ALTER table drop column field users_LTS;



    EXEC DBMS_WM.COMMITDDL ('users');



    3 roll back at the point of backup created on 20 may
    (1) add the domain of the column to the schema

    (2) rollback
    DIAL THE DBMS_WM. RollbackToSP ('LIVE ',' RRR_Test);



    End of the scenario



    Question: given that the pattern is exactly the same as it was originally, this will work?


    Your ideas are welcome.

    Thank you

    Serge

    Published by: sbornow on May 27, 2009 11:29

    Hi Serge,

    When you add the column to the table, it will be added to all versions/workspaces for this table. All of the current versions, as well as all the historical lines, will contain this new column with a null value or the default value.

    None of DBMS_WM restore procedures will be affected by the DDL changes, or a restore will return all DDL changes made since the backup was created. A backup point cannot become invalid. The restoration works on the level of the line, based on the columns of the primary key (which is not editable by the DOF). So the resulting table will have the same lines as he did at the time that the backup point has been created, adjusted for any changes in the column that has been done on the non-primary key columns.

    Kind regards
    Ben

  • Creating user database form and by inserting the username, password to a table

    Hi all

    Help me anyone how to do the following tasks from10g.

    Creating user forms data and inserting the name of user, password, and other data to a specific table.


    Arif

    Hello
    I think the guy gave you automated statements that you do not get :) Try this simple...

    FORMS_DDL('CREATE USER YOU_USER_NAME IDENTIFIED BY YOUR_PASSWORD'); -- Replace the user and pass variables upon your requirement.
    FORMS_DDL('GRANT CONNECT, RESOURCE TO YOUR_USER_NAME');  -- Or any role you want to set...
    

    -Clément

  • Diagram of authentication with user name / password stored in the Table of the App

    Hi all

    So far, all of our applications have used sign-ON, but I have now spread to allow users from outside of our Organization (and so not in our system OID) to use a specific application.

    So, I have a table in my application that stores the user name and password. I have a function that compares the input of user name and password at this table and returns a Boolean result. This function is then entered in my scheme of authentication as the authentication function.

    This works well and is causing no problem. The problem is that the password is stored and verified to plain text - not very good lie.

    How can I do to change the password of my table column, pages which allow the password to be updated, and authentication which checks the user name / password to use a form of encryption?

    Also, do I need to worry about all the other fields (Page Sentry function to check the authentication session, prerequisite process etc.) that the authentication scheme can offer me - or can I just leave these virgins as they are now.

    If someone can give me a complete "out-of-the-box" solution that would be wonderful - otherwise a good hard pusj in the right direction would be much appreciated.

    Thank you very much
    Martin

    Hello Martin,

    If you discover here the application of Discussion Board, you should find the information you need. This application stores an encrypted version of the password of the user in the table.

    http://www.Oracle.com/technology/products/database/application_express/packaged_apps/packaged_apps.html#Forum

    Good luck
    Don.

    You can reward this answer by marking as being useful or correct :)

  • The VPN user recover encrypted password

    Hi guys,.

    Please let me know if there is a command that can help to recover the password for configuration for a vpn from previous version user ASA not later

    I know this command: "more: execution of the system-config ' lets see the presharded key.

    username password abc XXXXX encrypted

    example, I want to see the password for the username abc

    Thank you

    I don't think that there is a way to get the ASA give you password a local of the user in clear text.

    If you enable mode on the ASA, you can change the password unknown to that you know and can inform the end user.

Maybe you are looking for

  • What is the latest version of the software available?

    Hello I would like to know what is the latest version of the software available for my Motorola Photon. When I go to the programs 'Settings' and select 'about this phone"I get the version provided with it from the factory: The system version: 45.2.3.

  • Compaq Presario SR1278AN desktop computer

    Where the power plugs on the Tower, at the rear, there is a green light that flashes when the power is turned on.  I can't turn on the tower at the front.  Is this a simple fix or do I need to take it to "computer hospital".  Thank you

  • Problem with the DMM 34401

    Hello I have a really strange problem with my DMM Agilent, I looked on the internet for the solution and I have not found any that contributes. So why is it so strange? Because it happens sometimes and sometimes not. In addition, I use the example I

  • Part place and running. Still need help

    I followed the instructions, you have given and have my computer (with internet access via cable) and the router and managed to get the netbook wireless in the bedroom 2 and running but the desktop computer in the bedroom 1 is not yet recognize the w

  • blocked attachment

    Trying to attach a file to an email that I want to send, I get a window that opens, a MSN window, and he said, "it has been a blocked access to the following potentially joined risk" the name of the attachment attempt will be displayed.  How to unloc