PEI - checking a user id against the database

Hi,
I am in the process of building a custom login implementing the PEI framework.
I want to check the username a user has entered against the portal database i.e. verify the username actually exists and then check if it belongs to a particular group.
I am a little stuck on how to do this so would appreciate any pointers or sample code to help me.
Thanks,
Tahir

Below is code from my PEI (Java) to do exactly what you want:
private int searchUser(String userUniqueName) {
          log.Info("Search for user " + userUniqueName
                    + " in aqualoqic database ...");
ptSession.Connect("...", "...", null);
          IPTObjectManager uom = ptSession.GetUsers();
          return findObjectIdForPropValue(uom, userUniqueName,     PT_PROPIDS.PT_PROPID_USER_UNIQUENAME);
private int findObjectIdForPropValue(IPTObjectManager objectManager,
               String propValue, int propId) {
          Object arrFilter[][] = new Object[3][1];
          arrFilter[0][0] = new Integer(propId);
          arrFilter[1][0] = new Integer(PT_FILTEROPS.PT_FILTEROP_EQ);
          arrFilter[2][0] = propValue;
          IPTQueryResult queryResult = objectManager.Query(1, -1, 1, 0, -1,
                    arrFilter);
          if (0 == queryResult.RowCount()) {
               return -1;
          } else {
               int iObjectID = queryResult.ItemAsInt(0, 1);
               return iObjectID;
     }

Similar Messages

  • Help me to fix the error while running DBMaintain Against the Database Schema in ASE.

    Hi All,
    I am trying to install sybase mobiliser platform 5.1 SP 03.I am  referring the following guide
    http://infocenter.sybase.com/help/topic/com.sybase.infocenter.dc01871.0513/pdf/Mobiliser_Platform_Installation_Guide_5.1…
    Now I have configured the ASE database server with default settings and now it is running fine.
    Now my concerns are as follows:
    1) I have executed the database schema (mobr5): 001_MONEY_drop_and_create_user.DDL with the help of linux command
    isql -Usa -SASE1 -Phello@123 -i/opt/sybase/db/sql/001_MONEY_drop_and_create_user.DDL -o/opt/sybase/ASE-15_0/install/ASE1.log
    How do I check the created database schema and user with default name 'mobr5'?
    2) While running DBMaintain Against the Database Schema, I have followed the steps mentioned in the guide and made the following changes in the file dbmaintain.properties.ase
    database.driverClassName=com.sybase.jdbc4.jdbc.SybDriver
    database.url=jdbc:sybase:Tds:ASE1:5000/mobr5
    database.userName=mobr5
    database.schemaNames=mobr5
    database.password=paybox
    #Must be set if the driver is not packaged inside the scriptarchive or is present on the classpath
    #e.g. /path/to/driver.jar
    #database.driverLocation=/path/to/jconnect.jar
    database.driverLocation=/opt/sybase/db/sql/com.sybase365.mobiliser.vanilla.standalone-5.1.3.RELEASE-scriptarchive-ase.jar
    database.driverLocation=/opt/sybase/db/sql/com.sybase365.mobiliser.vanilla.standalone-5.1.3.RELEASE-scriptarchive-ase-vanilla.jar
    When I execute the script archives ,
    java –jar /opt/sybase/db/sql/com.sybase365.mobiliser.vanilla.standalone-5.1.3.RELEASE-scriptarchive-ase-driverless.jar -c /opt/sybase/db/sql/dbmaintain.properties.ase
    java –jar com.sybase365.mobiliser.vanilla.standalone-5.1.3.RELEASE-scriptarchive-ase-vanilla-driverless.jar -c dbmaintain.properties.ase
    I get the following error:
    So please help me to resolve the issues.

    Hi All,
    Issue is resolved and database has been updated successfully..
    Error was in database .url field of dbmaintain.properties.ase file.
    I have changed the database.url field  from database.url=jdbc:sybase:Tds:ASE1:5000/mobr5
    to  database.url=jdbc:sybase:Tds:<Private IP of Linux instance>:5000/mobr5
    Note:- I am installing mobiliser platform on AWS cloud.So I have made use of Private IP address of AWS Linux instance.

  • The query against the database caused an error in https: site

    Hi
    I have created a new Data source and External content type in sharePoint 2013
    I have also given all the permission to this Content type (including "Users(Windows)")
    I also having edit permission in the Sql-database.
    I have tied almost all the possibilities given in the net for this error.
    still the error("the query against the database caused an error") is there.
    Is this because of "https:/ " in the url?
    Can any one give a suggestion / solution for this?
    Thanks
    S H A J A N

    Hi,
    Can you please check ULS Log as well as event viewer, to see if there's any related error reported?
    Thanks,
    Sohel Rana
    http://ranaictiu-technicalblog.blogspot.com

  • How to check my job name from the database...

    I have written one job scheduler which is as follows :
    SQL> ED
    Wrote file afiedt.buf
    1 DECLARE
    2 X NUMBER;
    3 JobNumber NUMBER;
    4 BEGIN
    5 SYS.DBMS_JOB.SUBMIT
    6 (
    7 job => X
    8 ,what => 'scott.SPLITSMS;'
    9 ,next_date => SYSDATE+1/1440
    10 ,interval => 'SYSDATE+1/1440 '
    11 ,no_parse => FALSE
    12 );
    13 JobNumber := to_char(X);
    14* END;
    15 /
    PL/SQL procedure successfully completed.
    Now I want to check whether the job has been really created or not?
    so for that I have used the following command line:
    SQL> SELECT JOB_NAME FROM DBA_SCHEDULER_JOBS WHERE JOB_NAME = 'SCOTT.SPLITSMS';
    SELECT JOB_NAME FROM DBA_SCHEDULER_JOBS WHERE JOB_NAME = 'SCOTT.SPLITSMS'
    ERROR at line 1:
    ORA-00942: table or view does not exist
    how to check my job name from the database...
    what is the command used to check the job_name ????
    and how can i ensure that my job scheduler is running properly...???
    please help ........my dear friends.....!

    957029 wrote:
    Now I want to check whether the job has been really created or not?
    so for that I have used the following command line:
    SQL> SELECT JOB_NAME FROM DBA_SCHEDULER_JOBS WHERE JOB_NAME = 'SCOTT.SPLITSMS';
    SELECT JOB_NAME FROM DBA_SCHEDULER_JOBS WHERE JOB_NAME = 'SCOTT.SPLITSMS'
    ERROR at line 1:
    ORA-00942: table or view does not existYou can use DBA_* views only if the User has been Granted a DBA Privilege.
    how to check my job name from the database...
    what is the command used to check the job_name ????You can use USER_JOBS view to check. But, is it not that you have just created the Job, so you must be knowing it?
    and how can i ensure that my job scheduler is running properly...???If USER_JOBS.FAILURES is Non Zero, that means the Job has encountered a problem that needs to be Investigated. Similarly, the LAST_DATE, LAST_SEC, NEXT_DAY, NEXT_SEC can be used to determine if the Job has been running successfully.
    if you are on 11g, you should consider using DBMS_SCHEDULER.

  • How to apply row level security against the database administrator

    I would like an advice in applying row level security against the database administrator. We need to prevent DBA from editing data in some table rows or have any indication that data was corrupted.
    There is no problem in viewing the data so we considered one way hash function or digital signature which will be stored in the same table, but we see following disadvantages:
    HASH - DBA may use the same hash function to update the stored data after he changes the sensitive row.
    Digital signature - the is a need to manage and keep the private key in a safe place outside of DB
    Is there additional ways to achieve the aim?

    Does VPD helps to prevent from DBA to edit/view a data in specific rows?Yes.
    If I correctly understand, DBA has full access to security policy used by VPD to control the access and can grant himself privileges that I don't want.You can to define which users can be exempt of the politics, for the context or by Grant EXEMPT.
    This includes DBAs.
    The simple fact of being DBA doesn't guarantee the exemption.
    Everything goes to depend of the VPD config.

  • For running utlrp.sql need users termination from the database?

    Hai All,
    My database jobs terminated in some time. So I want to run utlrp.sql for compiling all invalid objects. Is It needs users termination from the database? or login to restricted session? Please give a correct step for doing this activity..
    Please help?
    Shiju

    database? or login to restricted session? Please
    give a correct step for doing this activity..
    It is good , if you run utlrp.sql in restricted mode also set job_queue_processes =0 and check no dbms_job running package ( if package is valid then fine ). Problem only come when package/procedure are locked/in use by session. If invalid package are not used by any session then you can run utlrp.sql without restricted mode also. Well you know better you application.
    Since you not altering any dependencies, just want to compile , you can run without restricted mode.
    Virag

  • Total no. of users logged into the database

    Can we find out total number of users logged into the database? I do not have DBA privileges.
    If it is not possible by a straight SQL then do I have any other options?
    Thanks.

    You can find the list of all users using the query "Select * from V$Sesssion_connect_info". This requires access to system tables. But this query gives the OS user information and not the database user information.
    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by Krishnan:
    Can we find out total number of users logged into the database? I do not have DBA privileges.
    If it is not possible by a straight SQL then do I have any other options?
    Thanks.<HR></BLOCKQUOTE>
    null

  • How  to  know  ddl  operations  done  against the  database

    hi,
    we are using oracle 10g.
    i am new to oracle dba how i know what are the DDL operations done against the database in oracle , i can i track that one and is there any view to store that informations

    Hello,
    I would recommend you to read Oracle documentation for using auditing DDL statements and more
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14220/security.htm#sthref2913
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_4007.htm#SQLRF01107
    Regards
    OrionNet

  • Validation (check) Username and Password from the database

    I have a Login page in my website, username and password as a textbox not as a form, I have already save the admin username and his password in the database, now I need to check or validate these textboxes if  data entered to textbox  match the
    existing in the database then show a message box "Successful Login" if not "username or password invalid!!"
    Note : The website developed using c# Visual Studio Professional 2013
    Thank you

    Hi,
    Please check if the connection string is right and make sure the IIS application pool identity has enough permission to access database.
    For more information, please refer to the document:
    http://www.codeproject.com/Questions/328554/IIS-hosted-website-cannot-access-database
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How do I code PL/SQL using files instead of directly against the database

    Hi All,
    My current project, like pretty much all I've every worked on, requires all developers of pl/sql routines to code those routines in source controlled files. We then edit the files (normally using TOAD - trying to move to SQL Developer) compile them against the DB, fix the errors, test etc.
    I've been trying to do the same in SQL Developer (1.2 and 1.5EA) and it appears as though I can't get the tool to understand my .pks and .pkb files are packages - and thus when I compile them I will receive a "compiler" window containing the errors. It appears to simply run the code as a script returning me:
    Warning: execution completed with warning
    PACKAGE BODY XYZ Compiled.
    This is not the same behavior I receive when I edit objects directly in the database (something I never do).
    I hope I'm not missing something obvious.
    Thanks in advance.

    Your latest EA fixed this, at least for subversion and cvs, hooray! and I'm quite happy with it.
    But I think our posters need a quick how-to for subversion:
    * the latest EA has subversion and cvs installed
    * open VIEW menu->Versioning Navigator
    * create your SVN repository in Versioning Navigator, that will establish all of the authentication stuff for your later work
    * use VIEW menu->Files and navigate to your subversion working checkout directory.
    The File navigator will become your main work zone, if you're anything like me.
    for unconventional file suffixes:
    * open TOOLS menu->Preferences
    * click the File Types topic
    * click "Add.." to add the file name extension
    * it won't let you specify content type in the little "add" dialog; just click OK
    * when you return to the main Preferences screen for file types, your new type will be selected, and below there is a content type drop-down under "Details for type .blahblah"
    * choose SQL Script as the type for your new file type, and click OK to commit the changes
    * I find "SQL Script" much easier to work with than PlSqlNode, which seems to suppress the file handling and versioning features
    Good luck!
    -- Andrew Wolfe

  • How can I get users who accessed the database during last one month

    Hi All,
    How can get the list of users who logged on to the database DBProd and made changes to the tables of particular schema during say last month and current month.
    Thanks & Regards.

    DBA_PRIV_AUDIT_OPTS :-Describes current system privileges being audited across the system and by user and who has updated what can be done through trigger which would send the information to a history table. If you have it ready ask your team..
    SQL> select PRIVILEGE,SUCCESS,FAILURE from DBA_PRIV_AUDIT_OPTS where user_name='SCOTT';
    no rows selected
    SQL> audit ALTER SYSTEM by scott by access whenever not successful;
    Audit succeeded.
    SQL> audit session by scott by access;
    Audit succeeded.
    SQL> select PRIVILEGE,SUCCESS,FAILURE from DBA_PRIV_AUDIT_OPTS where user_name='SCOTT';
    PRIVILEGE SUCCESS FAILURE
    CREATE SESSION BY ACCESS BY ACCESS
    ALTER SYSTEM NOT SET BY ACCESS
    Regards
    Karan
    Edited by: Karan on Aug 2, 2012 7:15 PM

  • A user connect to the database is very slow.

    Hi, all!
    I met a problem in the database. A user(schema) connect to the database is very slow. and the user query the data is slow too.

    And some errors in the listener.log :
    23-Aus -2012 06:03:54 * (CONNECT_DATA=(CID=(PROGRAM=)(HOST=__jdbc__)(USER=))(SERVICE_NAME=ora36)(CID=(PROGRAM=)(HOST=__jdbc__)(USER=))) * (ADDRESS=(PROTOCOL=tcp)(HOST=xxx.xxx.xxx.xxx)(PORT=24923)) * establish * ora36 * 12514
    TNS-12514: TNS:listener does not currently know of service requested in connect descriptor
    23-Aus -2012 06:03:54 * (CONNECT_DATA=(CID=(PROGRAM=)(HOST=__jdbc__)(USER=))(SERVICE_NAME=ora36)(CID=(PROGRAM=)(HOST=__jdbc__)(USER=))) * (ADDRESS=(PROTOCOL=tcp)(HOST=xxx.xxx.xxx.xxx)(PORT=23409)) * establish * ora36 * 12514
    TNS-12514: TNS:listener does not currently know of service requested in connect descriptor
    23-Aus -2012 06:03:55 * (CONNECT_DATA=(CID=(PROGRAM=)(HOST=__jdbc__)(USER=))(SERVICE_NAME=ora36)(CID=(PROGRAM=)(HOST=__jdbc__)(USER=))) * (ADDRESS=(PROTOCOL=tcp)(HOST=xxx.xxx.xxx.xxx)(PORT=9103)) * establish * ora36 * 12514
    TNS-12514: TNS:listener does not currently know of service requested in connect descriptor
    How can I resolve this, thanks!

  • Procedure that checks for a value in the database and returns related info

    Hi Everyone,
    I need to create a stored procedure that takes customer info(any of these fname,lname,id,email etc) and looks for it in the database and displays the customer info of that particular customer(kinda search engine).
    I have to use dynamic sql and sql injection.Can anyone give me a brief idea from where to start.Thankyou.

    create or replace procedure pro_customer(p_customer_id number, p_customer out customer%rowtype) is
    begin
    select *
    into p_customer
    from customer
    where customer_id = p_customer_id;
    end pro_customer;
    the names,keys and others are invented

  • Queries fired against the database

    Hi everybody,
    I have requirement of this kind.
    I Need to get list of all the queries that hit the database for a day.
    The application team needs the queries that hit the database when they are working with the application.
    database version : 10.2.0.4
    Operating system: HP UX
    Regards,
    khaja

    khaja(DBA) wrote:
    Hi everybody,
    I have requirement of this kind.
    I Need to get list of all the queries that hit the database for a day.
    The application team needs the queries that hit the database when they are working with the application.
    database version : 10.2.0.4
    Operating system: HP UX
    You should have a look at AUDIT feature of oracle.

  • New Idea - Spell Check for users filling out the forms.

    It would be helpful if there could be a spell-check option on forms that allow users to submit their information by typing in their response.

    Hi,
      Thank you for your suggestion.  Please feel free to add your idea here at anytime:
    http://forums.adobe.com/community/formscentral "Submit Feature Request" link on your right.
    This message post, http://forums.adobe.com/message/5282702#5282702, has some information on different browser's built-in spell check.
    Thanks,
    Lucia

Maybe you are looking for

  • Requested Delivery Date in VL10

    Dear All how to get "Reqested Delivery Date" Col. in Open Sales order Report ( VL10 ). Pl help Regards Ramesh Barve

  • Chat video quality...

    Has anyone been able to video chat with two or three people and maintain a decent video quality? When I try to video chat with two people the quality drops considerably, and I'm wondering if it's a bandwidth problem, or if it's just the way it is. I'

  • How can I get rid of the "Return to Previous Session" tab.

    When I close out Firefox.......anyone can go to the computer and hit the "return to previous session" tab and connect with what I was currently working on.....or where I was....or....you can see where I'm going with this. I would like to just have th

  • Workshop support for portal development

    I have installed Weblogic platform 10.3, weblogic server and weblogic workshop gets installed. But when I open the workshop and search for portal perspective; it not there. I have also installed Weblogic Portal 10.3.2, by which portal server, weblogi

  • CLFMAS02 IDOC ERROR CHARACTERSTIC NOT FOUND

    hI aLL I had an error in CLFMAS02 a classification master, it says that the Characteristic "DUMMY" not found or not. but when i checked it by using CT04 it does exist. by using the txn code BD87 it says that Error during IDoc processing - see log for