Database Structure containing Apex users definition ...
Hi for all,
Application Express manage users in 3 types (administrator, developer, end user).
But in my case I have to classify my application users to more and different types. I can't find the database object containing Apex users definition so that I can customize my users management.
So Is there a database table where I can access from my application (HtmlDB application) to users definitions related to Apex.
Thanks a lot for any kind of help.
Jamel
The tables used are wwv_flow_fnd_user and wwv_flow_developers but you should not attempt to change their structure and all operations against those tables should be done using the user management api calls explained in the User's Guide.
If you need a custom user management solution you should consider building one from scratch.
Scott
Similar Messages
-
APEX Error: Current version of data in database has changed since user init
Hi:
APEX 4.1
I have a page with 2 regions. The first region is built with custom SQL using the APEX APIs. I have a process the can successfully update records.
I built the second region with the tabular form wizard. This created the multi row update process.
I created a region button and the two process respond to that button: process for first region, then process for the second region.
When I add data to the second region and click the region button, I get the following error:
Current version of data in database has changed since user initiated update process. current row version identifier = "A884FA378C851786DDFE3A33709CB23C" application row version identifier = "9ED06A0F09F80F054AB781CA24CC4CBF"
I know it has something to do with these two types of regions being on the same page, because when I create a page of just the table form, the data is updated.
Can anyone suggest what I might be doing wrong?
Thanks.Hello
If you try update the same data from 2 places you will got this message because:
Apex forms have locking mechanism.
1. During fetch data to form apex calculate checksum from every items on the forms.
2. Before update process apex again fetch data from database (in background) and calculate checksum again if checksum from point 1 is the same like this checksum APEX realy update data with new item values. If no, You will got your error (apex secure You, You realy don't know what you update).
According this if you change data which you use in the form between 1 and 2 point you will got this "error". You can check it for example if you change data from SQL/Plus or from other form.
Probably you forget about this locking mechanism during designe your process from APEX API <- successfully update records (maybe successful but you don't know what you updated) : )
If I helped You please check correct or helpful :) -
Database SID contains user objects belonging to system user dbo
Hi,
I started a Java AddIn installation for NetWeaver 2004.
ABAP stack is on SP12.
Win2003 Server SP2
MS SQL 2005
SAPInst is stopping with error <b>Database <SID> contains user objects belonging to system user dbo</b>.
I can't find anything in the log files or in SMP that is guiding me into the right direction...
Any hints??
Thx,
MichaelHi Michael,
You can use the stored procedure sp_check_sap_login to check and verify your db-logins as per note # 610640 .
Afterwards you can use the script "user_change.sql" which is included in the attachment of note # 551915 to change the objects from 'dbo' to 'sid'.
This may help narrow down the cause at least hopefully.
Regards, Mark -
Log APEX User with Database Trigger
Hi all,
I'm writing a database trigger that save date/time and user that insert/last modify record on database. Because APEX authenticate database user but return always ANONYMOUS I've used this variables for doing it:
CLIENT_INFO... a variable with user name, CLIENT_INDENTIFIER... a variable with user name and session id.
I hope is usefull also for others.
Bye
DarioHi Scott,
I've tryed with it but my query goes wrong for object not find...
Where I wrong ?
Thanks a lot
Dario -
I have to add a tabel a mailalerttext and link that to mailalertypes which is linked to mailalerts. I had some problems with the selectlists, underneath you will find something that will solve that problem I thought, but it may be easier to solve it simpler, but thats apex stuff.
If a default user and default applicationcode would exist, it would be possible to use them in the mailalert table which has following colums:
MAILALERTID,APPLICATIECD,GEBRUIKERID,MAILALERTTYPEID,SENDMAILIND
gebruikerid means userid.
The defaultuser and application code would then be used in the mailalerts table and the column mailalertype would be replaced by mailalerttypecode. These are defined they can't change.
The reason is that if mailalerttext is linked to maillalerts using the mailalertid as the foreign key, then that allows to find the correct text, or select it straightaway by using the mailtextid. All the selects would then be made on the mailalert table.
The numbers used as default are just those that are free, a default user can be filled in like that in te gebruikers table, and a default application code in the apps table.
Only the standard user and the mailalerttypecode are important, the standard applicationcode could be used as an extra check but might not be necessary.
A select could then be made on that applicationcode, that user, that typecode if not found select standarduser and typecode.
Applicationcode is only filled in to stick to the table definitions. To solve a problem with a select list on a page in apex i think this is overkill, as it requires more changes then does the first solution, It means changing tables, dropping columns adding them, changing triggers, changing code in apex pages, a lot of work.
But I was wondering if concerning a database structure, starting from scratch this is something that would be considered good, not so good, bad, something to not do ?
I'm not sure this is the right group, but it isn't strictly apex, and it isn't really sql/plsql either. More database structure.
I'm just beginning, so i'd like to know your opinions and why it would be bad, or possibly good.
Message was edited by: Floris Vermeir
Removed the spelling mistakes.
FlorisI'm still not sure I understand your existing data model properly. The following is my interpretation of what I think your're trying to achieve.
There are four core data tables -
* APPLICATIONS - holds information relating to the programs you administer
* MAIL_TEXT - holds boilerplate text for each type of e-mail (I'm assuming this text can be shared across applications)
* MAIL_TYPES - the different kinds of e-mail alerts which can be sent
* USERS - holds information about the support staff.
I think you need two intersection tables
* APP_MAIL_TYPES - application X uses text Y for e-mails of type Z (candidate key: app id and type id)
* USER_MAIL_REGS - user Joe gets e-mails of type Z from application X (candidate key: app id, type id and user id)
NB If the registration is just done against alert type for all apps, then the USER_MAIL_REGS table shoudl intersect USERS and MAIL_TYPES.
| |
| applications |
| |
|
|
/|\
| | | |
| app_mail_types |>---------------| mail types |
| | | |
\|/ |
| |
| ---------------------------------
| |
| /|\
| | | |
| mail text | | user_mail_regs |
| | | |
\|/
|
|
| |
| users |
| |
---------------------- I think USER_MAIL_REGS corresponds to your "overview" table. (It's a good idea to use names which convey as much info as possible. I acknowledge the difficulty of doing this in another language). Changing the users' registrations would simply be a matter of inserting or deleting rows from the USER_MAIL_REGS.
If this doesn't help you then I'm afraid you will need to give me more info. Specifically, what tables you have, the role they play and the relationships between them.
Cheers, APC -
Automatic Checking of Database Structures
In OSS note 521870 SAP recommends to perform a weekly
check of the Database Structures to verify that the
Maxdb database is not corrupt. Unfortunately this
OSS note only describes the manual procedure to
perform this task:
dbmgui -> Check -> Database Structure
Is there any way to easily schedule this also via dbmcli?
The SAP online documentation contains some interesting
information about integrating the check into the CCMS,
here I can see whether the database structure check
was performed recently, but unfortunately I cannot
schedule it
http://dev.mysql.com/doc/maxdb/en/30/5ada6e596211d4aa83006094b92fad/content.htm
All I can find here is to schedule it via DB13,
but unfortunately my SCM 4.1 system is running on
Oracle and I want to check the liveCache on Maxdb,
so I cannot use DB13 for scheduling the check.Hello Mark,
Central DBA Planning Calendar ::
In the user menu, choose the Central DBA Planning Calendar
(transaction DB13C).
If it is not already there, add your liveCache to the list of systems.
To do this, choose Configuration ® Add System.
System ID: Enter here the liveCache name that you assigned during the
integration of the liveCache (using MaxDB/liveCache System Overview).
Database: Choose SDB/LVC.
Database Release: Choose the liveCache Version in accordance with the
version notation .
Select No SAP Basis.
Database Server: Enter the name of the liveCache server.
Connection Name: Enter the name of the database connection.
To switch to a local DBA planning calendar, choose Local Calendar and then
select the system for which you want to edit actions.
Please also review the SAP notes 940420, 521870 ( you already know this note ).
And note 820824 FAQ: MaxDB to find the note for the documentation & more -
For SAP liveCache documentation in English:
http://help.sap.com/saphelp_nw04/helpdata/en/f2/0271f49770f0498d32844fc0283645/frameset.htm
->Database Administration in CCMS: SAP liveCache ->
-> Central DBA Planning Calendar
If you are the official SAP customer, I recommend you to create
the ticket to SAP on 'BC-DB-LVC' queue.
Thank you and best regards, Natalia Khlopina -
Message: "The database structure has been modified" every time I log to SAP
Hello,
"The database structure has been modified. In order to resume this process, all open windows will be closed". Every time I log to one of my companies in SAP Business One this message appears.
I haven't installed any new addons and made no changes in database structure (and any other user hasn't done any changes), but this message appears always when I log to company for the first time (when I try to log on another user or log to another company there is no message). Can anyone help me with this problem?
Best regards
Ela ŚwiderskaHi Ela Świderska,
You may check this thread first:
UDFs disappeared
Thanks,
Gordon -
The Database Structure Has Been Modified
Good Day!
Just want to ask what is the probable reason why upon using SAP, there is a system message " The database structure has been modified. In order to resume the process, all open windows will be closed. Continue?" Even upon user log in , this system message appear affecting other user's data entry. Upon adding of the document (of other users when this system message appear), all the UDFs are missing, causing their data entry to be inaccurate since you cannot update row level once the document has been added.
Hope to hear from you soon.
Thanks
SandraHello ...
This error message appears every time that has altered the structure of the database, either by creating a new field of user or user table, so it is inevitable that appear the same.
Now, it is necessary as a measure, to control who has access to make these changes, and that they are made without users.
I hope it will help
Best regards, -
How do you close a database link in Apex?
How do you close a database link in Apex that is referenced in an interactive report on Page 1? I want to make sure the database link is closed before a user navigates to another page in the Apex application.
Lets assume the database link is referenced in the region source for Page 1 as follows:
Page 1 - Employee Listing
Region Source:
select ename, job, hiredate
from scott.emp@link1
Any suggestions are appreciated.
Ms. HJohn,
I figured out how to eliminate the ORA-02020 and ORA-02081 errors. The solution is reference below:
1. Create an interactive report in a page.
2. Add the SQL statement in the region source as listed below:
SELECT ENAME, JOB, HIREDATE
FROM SCOTT.EMP@DBLINK
WHERE (UPPER(ENAME) LIKE '%' || UPPER(:P1_TEXT_SEARCH)||'%')
Conditional Display
Condition Type:
PL/SQL Expression
Expression 1
:P1_TEXT_SEARCH IS NOT NULL
3. Add a search button and text search field as items on the page.
4. Create a process in the page to check the cursor and catch an exception as listed below:
Name: CHECK_CURSOR
Sequence: 30
Point: On Submit - After Computations and Validations
Type: PL/SQL Anonymous Block
PL/SQL Process:
FOR C1 IN (SELECT ENAME, JOB, HIREDATE
FROM SCOTT.EMP@DBLINK
WHERE (UPPER(ENAME) LIKE '%' || UPPER(:P1_TEXT_SEARCH)||'%'))
LOOP
IF C1.ENAME IS NOT NULL
THEN
HTP.P('Employee Name: '||C1.ENAME||' ');
END IF;
END LOOP;
EXCEPTION
WHEN NO_DATA_FOUND
THEN
APEX_APPLICATION.G_PRINT_SUCCESS_MESSAGE := 'No Data Found Error';
WHEN OTHERS THEN
APEX_APPLICATION.G_PRINT_SUCCESS_MESSAGE := 'Unexpected Error';
Conditional Processing
When Button Pressed (Process After Submit When This Button is Pressed)
P1_SEARCH_DATA
5. Create a process in the page to close the database link as listed below:
Name: CLOSE_DBLINK
Sequence: 40
Point: On Submit - After Computations and Validations
Type: PL/SQL Anonymous Block
PL/SQL Process:
COMMIT;
EXECUTE IMMEDIATE 'ALTER SESSION CLOSE DATABASE LINK DBLINK';
Conditional Processing
When Button Pressed (Process After Submit When This Button is Pressed)
P1_SEARCH_DATA
6. Apply changes, run the page, and conduct a test.
I hope this solution is helpful to others.
Ms. H -
Can I find OCS database structure anywhere ?
I'm making definitions for a customer to migrate their current email system to OCS. Current system is nor Outlook neither Lotus but Teamware (Fujitsu) and I think I have to do data conversion programs from the scratch.
... or is there any other solutions ?
- AnttiThere is no 'best' way of creating a database. It's more logic that is involved in examining the parameters that determine what DB will suit your current requirement. These parameters may include but aren't limited to:
Latency
Performance
Sortability
Accessibility
Ease-of-use
Scalability
If I were you, for the said purpose, I'd create with 4 tables as follows:
Categories - this will hold your main categoriesCatID, Name, Order ID
Sub-CategotiesSubCatID, CatID (that the SubCat is linked to), Name, Order ID
Sub-Sub CategoriesSubSubCatID, SubCatID, CatID, Name, Order Id
ArticlesArticleID, SubSubCatID (can hold multiple Sub-Sub-categories) SubCatID (can hold multiple Sub-categories), CatID (can hold multiple Categotries), Name, Order ID, Article Title, Article Description, Article Thumbnail, URL Name, Metatags (for SEO, if you're looking at doing SEO)
The CatID in Article Table will usually be an INT value with limited chars, the SubCatID and SubSubCatID in Article Table will ideally be a varchar value with about 200 chars so you could assign multiple SubCatIDs to one article.
I'd like to add here that this is very much a debatable post. What suits me may not suit you and/ or the others who may read this post! But this way, I can accomplish my programming/ coding task/ CMS integration with ease-of-use.
Good luck with your DB!
~ST -
Hello !
I'm using VB.net 2013 , Entity Framework 6 , SQL server 2008R2 and SMO.
I have the application that use the database.
But sometime I make changes to database structure , and I want to add to my application a "Refresh Database" command.
Let's say that I have a database model called "Model" ( as a .bak file). The refresh command should compare the current database with this model and after make all the changes needed to make the current database up to date according to model.
How this can be done using SMO ?
Thank you !Do you think that creating a new database and migrating data it's more easy ?
Let's get an example :
The new Model.bak contains only a new field in one of the tables comparing with the current database.
Do you think that only for 1 field , I should create a new database and migrate thousand of records ? After that of course I should make additional work to make this "New database" connect with my program because I use Entity framework that
is created with wizard on design time with the database ( that have a specific name ) , and the new database have another name.
So I think is more easy to add this new field to the current database ( so make a "Refresh" ) and end of the story.
what do you think ?
thank you !
Hi dcode25,
For such a scenario adding only one more field, what you should do in the upgrade is neither to restore nor to "refresh", the only approach is to run the ALTER table script to add the column when your upgrade wizard fires. This approach should be
applied to the cases that there's not much modification in your "model". For the cases which are more complex, the restore and migration is the option.
If you have any question, feel free to let me know.
Eric Zhang
TechNet Community Support
Hello !
I think that the conversion now is transformed in how we should call this process.
Why you don't like the word "Refresh". I like to call this process refresh , but we can call how we want.
The point is that I want to do this process within my application . I don't know what do you mean with "When your upgrade wizard fire ?"
Is possible to use the Alter table script in vb.net inside my application and what are the steps ? But of course I want to make this process general so regardless of how many field are added , this process should work. But how can I compare first the
current database with new model to find out what are the changes that I should made ?
And what you consider "too much modification "
The modifications on new "Model.Bak" may be :
- One (or some ) field(s) are added to one (or several ) existing table(s).
- One (or some ) field(s) are deleted to one (or several ) existing table (s).
- One (or some ) field(s) in one (or several ) existing table (s) have a different type.
- A new table is added to database
- A new table is added that have a new relationship with an existing table
- 2 or more new tables are added that may have relationship between each other.
On your opinion , which of these modifications can be done without migration and inside my application ?
For the others , why do you think that cannot be done without migrating ? Because it's impossible to do , or is difficult ?
In my opinion ( of course I can be wrong because I don't know ) these may be the steps :
1) Get one by one the tables in "Model.Bak"
2) With each table , first detect if this exist in the current database
3) If not exist , create the table ( or copy from Model ???? I don't know if can be done ).
4) If exist , compare one by one the fields , and if a field doesn't exist , add the new field. If a field exist but has a different type , change the type. After detect if one of fields in current database doesn't exist on model. If so , delete that field.
5) If a new relationship exist , add the new relationship
If you agree with these steps , which of them may be impossible to be done ?
Or if can be done , how can I realize each of these steps inside my program in vb.net ?
Thank you ! -
I have dropdown on infopath form , and it receives data from sql server table , it works fine when i am running in preview mode , but when i am publishing form to sharepoint server and loading that form
i am getting this
You do not have permissions to access a database that contains data required for this form to function correctly.
Can you please help?
Thanks,try this one, if not yet
Convert the data connection to UDC (store it in a Data Connection Library within the same site collection as the form library). See if this works without any other changes, but if not, then...
Manually edit your UDC file in Notepad (or your preferred editor) so that the authentication line is not commented out and so that it references the name of the SSO target app you created.
For Type, use NTLM.
Ensure the user has rights to access the database
Also ensure the connection file has been approved - A sharepoint admin can access a non approved Ucdx file. Go to the connection library and approve the file
Also check this post having the similar issue:
http://social.technet.microsoft.com/Forums/en-US/3196bafd-4bc3-40ab-ac2b-d149d1c3e0fa/sharepoint-2010-error-you-do-not-have-permissions-to-access-a-database?forum=sharepointdevelopmentprevious
Please remember to mark your question as answered &Vote helpful,if this solves/helps your problem. ****************************************************************************************** Thanks -WS MCITP(SharePoint 2010, 2013) Blog: http://wscheema.com/blog -
how to transfer database table contain null values, primary key, and foreign key to the another database in same server. using INSERT method. thanks
INSERT targetdb.dbo.tbl (col1, col2, col3, ...)
SELECT col1, col2, col3, ...
FROM sourcedb.dbo.tbl
Or what is your question really about? Since you talke about foreign keys etc, I suspect that you want to transfer the entire table definition, but you cannot do that with an INSERT statement.
Erland Sommarskog, SQL Server MVP, [email protected] -
Database used by Apex and other dev tools
Hi
As the applications here start to get more complex, I have noticed that much of the business logic in the database is getting more dependent on Apex-specific procedures and packages.
For instance, in many places we use v('APP_USER') to get the connected user, or rely on Apex authorisation schemes to control access etc. This happens - I think - because it is so easy to integrate the logic in the DB with the Apex environment and vice-versa (what would not be the case if other tool were used).
However, if we start using another tool to develop a new app that uses the same logic in the database, obviously much of the code will not work.
Anyone faced with this situation? Is it a bad practice to reference Apex-specific calls in the business logic? What have you done to circumvent this problem?
Thanks,
LuisHi,
APP_USER is indeed a "lightweight user", as you name it. The actual connection to the database runs on a technical user. You can change APEX authentication to use database credentials in order to have APP_USER mapped to existing database accounts, if that would help you, or use a custom authentication scheme that links to some SSO-solution, but the acting database user will always be the technical user.
I'm not sure what kind of JAVA user you mean, I assume you mean other technical users, e.g. users in a datasource of your J2EE application.
It wouldn't be too difficult to put the special case into your policy, like
IF USER = 'APEX_PUBLIC_USER' THEN
l_login_user=v('APP_USER');
ELSE
l_login_user=USER;
END IF;This should work easily if you use database authentication in APEX. Otherwhise, you may have to implement a more complex policy.
Hope this helps you setup your policy.
-Udo -
Gathering Entire Database Structure
Hi Geeks,
I want to gather the entire database structure for our client database, which is outside of our country and it is impossible to send the export dump file since so many formalities are there. I need to gather the information, but not through export dump file. I don't need the datas, but only the structure from A-Z.
Is there any possible way to do it.
Kindly help me.
Thanks,
Bang.Hi,
If i understood your question correctly then can use RMAN if you have the access. invoke "show schema" command to know the structure of your Database; Eg in my case:
C:\Documents and Settings\smuthalagan>set oracle_sid=test
C:\Documents and Settings\smuthalagan>rman
Recovery Manager: Release 10.1.0.2.0 - Production
Copyright (c) 1995, 2004, Oracle. All rights reserved.
RMAN> connect target
connected to target database: TEST (DBID=1915532430)
RMAN> report schema;
using target database controlfile instead of recovery catalog
Report of database schema
File K-bytes Tablespace RB segs Datafile Name
1 460800 SYSTEM *** E:\ORACLE\PRODUCT\10.1.0\ORADATA\TE
ST\SYSTEM01.DBF
2 30720 UNDOTBS1 *** E:\ORACLE\PRODUCT\10.1.0\ORADATA\TE
ST\UNDOTBS01.DBF
3 245760 SYSAUX *** E:\ORACLE\PRODUCT\10.1.0\ORADATA\TE
ST\SYSAUX01.DBF
4 5120 USERS *** E:\ORACLE\PRODUCT\10.1.0\ORADATA\TE
ST\USERS01.DBF
5 153600 EXAMPLE *** E:\ORACLE\PRODUCT\10.1.0\ORADATA\TE
ST\EXAMPLE01.DBF
RMAN>
Thanks
--Raman
Maybe you are looking for
-
Hi, How can I edit an animated gif in Photoshop Elements 6 for Mac? When I open the file there is just the first frame in one layer - no other layers available. Thanks!
-
Hello, Our ACCTIT table is very large and we are researching if we can deactivate it per Notes 178476 and 48009. What are some (functional) things that were researched to determine whether they were needed or not? Note 178476 lists a few questions
-
How to get back 3-column layout in mail
My 3-column mail layout which included display of the "current" message (highlighted in the list) disappeared. The text of the "current" message is no longer displayed.
-
Oracle 11g Rel2 Sample Schemas Missing
I installed Oracle 11g Release 2 and created a database using DBCA. In one screen there is an option to create sample schema but it was greyed out so I could not select it. I searched the dbhome\demo\schema\human_resources directory but there is only
-
Pixelated lines across images from the web module in LR
I use Lightroom 5.2 and am having problems when exporting via the Web module. When I use the basic LR HTML template or plug-ins like Juicebox and TTG, there are pixelted lines acorss some (but not all) of the images. This has started to happen in the