Roles and profiles [closed] - sap

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
What is the difference table AGR_PROF from table AGR_1016?

Both tables deal with the generated profiles for a role. The role SAP_BC_JSF_COMMUNICATIONS does not come with a pre-generated profile, so unless you generate one for yourself or someone else has done that on your system, it's to be expected that the tables do not contain any information for this role.
AGR_PROF contains the language-dependent description text of the generated profile as well as the profile ID. As you can see by looking at the primary key, only one entry can exist for each profile and language. This entry defines the "master profile name". AGR_1016 can contain multiple entries for a single role, so it's technically not surprising that there are more entries in this table than in AGR_PROF. The conceptual reason behind this is that there's a size limit to a single profile. This size limit was hard-wired into the kernel at a time where there were comparatively few authorization objects. Nowadays, it's easy to create a role whose generated profile exceeds the size limit. Instead of changing the kernel structures, SAP decided to just generate multiple profiles for a single role, all of which can be seen in AGR_1016. You'll notice that for COUNTER > 1, PROFILE+10 is simply incremented.
And as a side note - "what profiles are included in the role" triggers the semantic equivalent of a ?SYNTAX ERROR. Profiles are generated from the role, not included by it.

Related

Write Conflict between two transactions [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
I am a noob in DBMS. I am developing a project which has multiple readers and writers.
Here are the steps of the project.
User Logins
Makes changes
Then clicks submit
Admins review the changes and merges with the main DB.
So, I thought let's use a transaction for each user when they login to my project. Because the transaction takes a snapshot and commits data if all the queries are executed without any error.
If two users want to write in the same row then the transaction throws an error that is required for the project.
Now my question is if such an error occurs then I want only that query to fail I still want the transaction to continue if it has no error.
You are trying to use the concept of a database transaction in a wrong way. Database transactions should be very short (sub-second) and never involve user interaction. The idea is to group statements that belong together so that either all of them succeed or all fail.
What you want to do is application logic and should be handled by the application. That doesn't mean that you cannot use the database. For example, your table could have a column that persists the status (entered by client, approved, ...).

Finding user information in different databases and tables in SQL Server [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 3 years ago.
Improve this question
I have a lot of different databases and tables that contain user information. I would like to write a query, that would find all the necessary information. So when I use "where" clause (e.g. where Email = 'Example#example.com', or where Name = 'Mister Holmes' etc), it should bring up the results I'm looking for and search from all the related databases and tables.
My idea is to make a new view, bring all the related tables in there, and then join the necessary columns somehow. Is that possible?
Can anyone please help?
I had the same problem. I just describe my way - Because I have many different databases with different storaged infos about users, I collect all of them with INSERT and every time I am looking for WHERE SOMETHING, I am running this:
truncate target table (which is already prepared with necessary colls like NAME, LOGIN, RIGHTS, APPS, NOTES, ...)
filling target table with data from VIEWs, which are specific for each db / apps / or user groups
This two points I stored in procedure. Maybe it is not quickest way, but searching and filtering above one static table is much more safe and less consuming then searching in twenty views.
But, be aware, I you are not alone DBA and you have collegues which are playing the role of administrating sql in your area, I think, this solution is not lucky.
Or do you have standard user informations in server_principals, server_role_members, database_principals, database_permissions, schemas, ... ?

Is it good to use id of object from a third-party server as my PK at SQL database? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
I write some app which analyze Instagram and Twitter posts (post serves in separate tables) and I load comments and likes too. So, it's good to use they id's as my primary key, or is better to create my id's which will not be related to third-party id.
Create your own ids in your database. In general you want these properties to be true about your primary keys:
Unique. This one the database management system will enforce for you.
Unrelated to the data they identify. This means that you shouldn't be able to calculate the primary key to any row based on the info in the row. For example, first name+last name would be a bad primary key for a People table, and credit card number would be a bad primary key for BillingInfo table.
By using the id generated by a third party service as your PK, you are unnecessarily coupling your database with their service.
Instead, there is a common pattern of using an altId column to store an extra id. You could even name the column better by calling it twitterId or something similar.
Apart from uniqueness and minimality three sensible criteria for deciding on keys are stability, simplicity and familiarity.
Above all, there is the business requirement: the need to represent the external reality with some acceptable degree of accuracy. If your database is intended to represent accurately things sourced from some given domain then you will need an identifier also sourced from that domain.

Method to create master product database to validate entries [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 5 days ago.
Improve this question
We have a ruby-on-rails platform (w/ postgreSQL db) for people to upload various products to trade. Of course, many of these products listed are the same, while they are described differently by the consumer (either through spelling, case etc.) "lots of duplicates"
For the purposes of analytics and a better UX, we're aiming to create an evolving "master product list", or "whitelist", if you will, that will have users select from an existing list of products they are uploading, OR request to add a new one. We also plan to enrich each product entry with additional information from the web, that would be tied to the "master product".
Here are some methods we're proposing to solve this problem:
A) Take all the "items" listed in the website (~90,000), de-dupe as much as possible by running select "distinct" queries (while maintaining a key-map back to original data by generating an array of item keys from each distinct listing in a group-by.)
THEN
A1) Running this data through mechanical turk, and asking each turk user to list data in a uniform format.
OR
A2) Running each product entry through the Amazon products API and asking the user to identify a match.
or
A3) A better method?

One Universal Table [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
Greeting,
So we have a backend admin desktop app (accessible by the company employees only) and a public frontend web app that's accessible by anyone and it allows user creation.
We have a Roles table and all users (employees and non-employees) have roles assigned to them; however all user are stored in one table.
Is it a good practice to store all users in one table as opposed to having two different tables one for the employees and the second for users that sign up through the webapp?
Your feedback is appreciated.
My first reaction is that this sounds like a bad architecture. My reaction is based on a simple reason: employees should be using backend systems that are behind a firewall. The public web system is not behind the firewall. Hence, they should have different provisioning for security.
Your ask about one table versus multiple tables for security. For a single application, you should have a single table. This could even be shared among multiple applications, but I would definitely distinguish between internal and public applications.
You don't say anything about how the roles might interact with each other, but I could see further confusion if, say, an employee is "admin" on the internal system but just a regular user on the public system.