Permissions in a Query
Hi,
I have a Query created and I want that a user can execute it but only for a selected centers of the company. However, other users have to be able to execute the query without limitations.
How can I do that? (if it's possible)
Thanks,
Oscar
Hi Oscar,
I hope i m getting your problem right.
You need to sit with your Security/Basis Administrator to achieve the following task.
1. You need to create a role first.
2. Then,in that role goto Maintain Authorization data and Generate Profiles and create profile add the selected centres of that company which ever the user is authorised to view in that Profile.
3. Generate the profile and save it.
4. Add the specific role into your User's role(su01).
5. Also your characteristic has to be "Authorization Relevant"('Business Explorer' Tab in change of of infoObject).
6. At the query level you need to restrict that characteristic with a New variable(This variable type has to be Authorization Variable").
Once done, when the user runs the query it will ask for centres for company and run for those values by which the user has been restricted.
Hope it helps.
Regards,
Parth.
Similar Messages
-
Ability to query on all columns from a view with multiple tables
I have view with 4 tables. view has about 50 columns.
hypothetically, I want to build a form to give the user an ability to query on any of those 50 columns. user can search on one or more fields.
what is the best way to write the query to retrieve the results without performance impact.
please let me know if the question is not clear.If you want to permit them to query any of 10 fields with no restrictions, you could create 10 separate single-column indexes. The optimizer would have to try to pick the best of these indexes if you specified multiple search criteria. But since you have a view which presumably means that you've got multiple other indexes involved for the underlying join conditions, you'd probably want/need to combine the column lists of the indexes you're adding for searches with the indexes you've created for joins, which requires looking at the text of the view and figuring out the best way to optimize the 10 single-column searches. Of course, it is possible that the optimizer could chose to do something like a b-tree to bitmap conversion on multiple indexes which could allow it to use multiple independent indexes for your queries, but that's generally not ideal performance-wise.
All this is a fancy way of saying that there probably isn't a cut and dried answer to your question. You need to figure out the queries you're trying to optimize (say, the 10 single-condition queries) and you need to figure out what set of indexes on the various underlying tables provides the best performance weighing those benefits against the cost on other side of maintenance during DML. Which is going to depend on the text of the view, the underlying tables, the existing indexes, etc.
Justin -
Optimization and Best Practices: User Goup Permissions
Hello All,
Recently I have done some soul searching on the best way to
allow for complex user permissions on a web site while keeping
server resources in mind. I am hoping that some of you will have
some ideas or suggestions on the best way to implement a system
like this using CF. First a little background:
In my CF application I assign user accounts to a permission
group so different users can access different pages. For example, I
can assign user 'Joe Bob' to the 'Administrators' group which can
access pretty much everything, whereas the user 'Jane Smith' has
been assigned to the 'Contributors' group and can only access
certain pages.
Initially I assigned the permissions based on the name of the
permissions group, so when the user logged on I created a session
variable called AccountType which would contain the value,
"Administrator", "Contributor", etc. That way, my templates could
run a simple cfif to check if the person could see a particular
resource,link,etc.
However, now I am expanding the permissions scheme to allow
site administrators to create their own user groups with their own
unique names and permissions settings. The user account types are
stored in a database and each separate permission is stored as a
yes/no variable in a column. For example:
UserTypeID......Name
..............CanLogIn........CanAccessProducts......CanAccessBlog.......etc...
1
...................Administrator.....yes................yes.............................. .yes
2 ...................Contributor
.........yes...............no................................yes
3....................Store
Manager.....yes...............yes..............................no
So the problem arises: How should these permission settings
be applied for the logged in users? I want to be conscious of both
server memory as well processing/requests to the DB and ease of
coding. Here are some ideas that I had:
IDEA 1: When the user logs on, do just as I was doing and
assign a session variable named UserType that stores the
UserTypeID. Then, within application.cfm, check if the user is
logged on, if yes, query the database (cached query) and get the
permission values for that account type and store them in a
structure which can be referenced as needed in that request.
Pros: In this method, the work appears to mostly be done by
the processor, db server. Since queries can be cached, I can use
the same cached query for multiple users that log into the site so
more than one user can share the cached query.
Cons: I think that reading a cached query and then building a
structure containing the values of the table on ever page load
might be overkill and might demand unneeded processing.
IDEA 2. This method is similar to #1 in that a session
variable named UserType will be created when the user logs on.
However the main difference is that the database won't be queried
for a permission column until it is actually needed. So if the user
tries to access page xyz.cfm, coldfusion checks the appropriate
column in the table based on the UserType variable and either
allows the user to see it or not.
Pros: This could potentially save some server memory if there
are a lot of users logged on at once and a lot of permission
columns in the database.
Cons: This could be a coding nightmare and will add a lot
more lines of code on many templates since pretty much every
template will make at least one permissions check.
IDEA 3: Another method which might work would be when a user
logs on, query the appropriate permissions records and store all of
the yes/no columns as a structure in the session scope. On each
page load (application.cfm), copy the structure stored in the
session scope which contains all of the permissions to the local
variable scope so it can be easily accessed by the page.
Pros: Using this method, I only have to query the permissions
once, and then access all the variables I need because they will be
stored in memory.
Cons: In the event that there are a LOT of permission
variables (assuming 100 or so) this could cause each logged in user
session to hold a lot of variables. I'm not sure how much server
memory a structure containing 100 values is, but I want to keep
that in mind so I don't hog too many resources unnecessarily.
What are your thoughts on this topic? Do you have any
suggestions or ideas for handling this type of situation?I was surprised no one was interested in discussing this one
either. However, I played around with several different options and
although I didn't do any performance benchmarking to compare which
method would be the most efficient, I guestimated using common
sense and ease of programming to come up with a solution similar to
Idea 3 above.
When the user logs in, the permissions table is queried and
all of the permissions are added to a structure variable which is
then stored in the session scope. This way, I can look up a
particular permission any time I want without having to query the
database.
Additionally, if these templates will be accessed by non
logged in users (like a forum application) I may need to have a
structure for each non-logged in user as well. However, I believe
the way to solve that problem efficiently is to store an empty
permissions structure which contains all the same variables as the
logged in user in the Application scope which can be referenced
when needed.
This method puts the most stress on system memory, but I
believe that it is better to stress out the system memory rather
than the processor. Also, I don't think that a hundred structures
each containing a couple hundred variables really isn't a lot of
data in the grand scheme of things.
It would be cool to know though how much memory a session
structure containing 100 variables would take up. Perhaps one of
those monitoring programs like SeeFusion would shed some light on
that. If anyone has a copy of SeeFusion (or similar) please feel
free to post that information. It could be helpful to CF developers
in many situations. -
Calling Oracle Package Function from Visual Basic
Hi,
Oracle Client 8.04
Oracle ODBC Driver 8.00.04
VB 6.0
Windows 2000
I'm stumped here. I want to have a Oracle stored procedure run a
query and return a result set which I can assign to a recordset
object in VB. Based on things I've read here and on MS's site,
here's what I've done:
In the Oracle Schema Manager under the Packages folder I created
the following package:
PACKAGE test
IS
TYPE test_cur IS REF CURSOR;
FUNCTION mycur RETURN test_cur;
END test;
and under the Package Body folder created:
PACKAGE BODY test
IS
FUNCTION mycur RETURN test_cur
IS
c_return test_cur;
BEGIN
OPEN c_return FOR
SELECT * FROM table_A;
RETURN c_return;
CLOSE c_return;
END mycur;
END test;
They both compile without errors and in Oracle SQL Worksheet I
can enter the following:
variable x refcursor;
execute :x :=test.mycur;
print x;
and the query results are displayed as expected.
The problem is trying to get the result back into a VB recordset
object.
In VB 6.0 I have done this:
Dim RS As ADODB.Recordset
Dim Conn As ADODB.Connection
Dim sConnection As String
Dim sSQL As String
sSQL = "{call test.mycur}"
sConnection = "Provider=MSDASQL;UID=" & sUserID & ";PWD=" &
sPassword & ";Driver={Microsoft ODBC for Oracle}; Server=" &
sInstance & ";"
Conn.Open sConnection
RS.CursorLocation = adUseClient
RS.Open sSQL, Conn, adOpenForwardOnly, adLockOptimistic,
adCmdStoredProc ' or adCmdText
but get:
?err.Number -2147217900
?err.Source Microsoft OLE DB Provider for ODBC Drivers
?err.Description [Microsoft][ODBC driver for Oracle]Syntax error
or access violation
The problem is not with the connection or permissions, since the
query works fine when I just use the select statement in the
package function as the string, instead of calling the function
in the package (eg sSQL = "Select * from table_A") and can
process the resulting recordset in VB.
I've also tried variations using:
Set RS = Conn.Execute("{call test.mycur}")
or using a Command object something like:
Dim com As ADODB.Command
Set com = New ADODB.Command
With Conn
.ConnectionString = sConnection
.CursorLocation = adUseClient
.Open
End With
With com
.ActiveConnection = Conn
.CommandText = sSQL
.CommandType = adCmdText
End With
Set RS.Source = com
RS.Open
But still get the same errors. Any help is appreciated. Also, in
my package body, is it necessary to explicitly close the cursor,
or does the function just exit when it executes the return and
not ever hit the close statement?
Thanks,
Ed HollomanHi
i don't know if you got your answer, but i work with VB and
Oracle.
the procedure in the DB should have the cursor like you writen
in your mail.
to call a procedure in Oracle and get the data back
into a recordset you shuld use a Command object like this:
Dim conn As ADODB.Connection
Dim cmd As ADODB.Command
Dim rs As ADODB.Recordset
Set conn = CreateObject("adodb.connection")
Set cmd = CreateObject("adodb.command")
Set rs = CreateObject("adodb.recordset")
With conn
.ConnectionString = ""
.CursorLocation = adUseClient
.Open
End With
'THE IMPORTENT SECTION IS THIS WHERE YOU SET THE COMMAND TO THE
STORE PROCEDURE TYPE
With cmd
.ActiveConnection = conn
.CommandText = "proc.fun"
.CommandType = adCmdStoredProc
End With
'Then you set the rs to the command
Set rs = cmd.Execute
Set conn = Nothing
Set rs = Nothing
Set cmd = Nothing -
Inconsistent datatypes: expected - got CHAR, Detail view bind variables
Hi.
Here is my problem:
I have master detail views connected with a view link. Both of views have bind variables that hold some session info:
It's a menu on database and I am trying to hide some values based on user permissions.
When running application module, everything works fine. The problem occurs when I try to show menu as a tree table, or any other table, on a page.
The root view executes fine, but then I get an
"java.sql.SQLSyntaxErrorException: ORA-00932: inconsistent datatypes: expected - got CHAR"
error in executeQueryForCollection method of detail view. (this method is overridden)
Bind Variables are:
- :menuRoot -> which holds value of Root node. (In detail view it's just a dummy variable. It is explaned later on why i used it.)
- :listOfUserPermmission -> array of user permissions.
My query looks like this:
1.Master View:
SELECT MetVMenu.CHILD_ID,
MetVMenu.CHILD_IME_MODULA,
MetVMenu.PARENT_ID,
MetVMenu.PARENT_IME_MODULA,
MetVMenu.ZST,
MetVMenu.NIVO,
MetVMenu.CHILD_NAZIV_V_MENIJU,
MetVMenu.CHILD_TIP_MODULA,
MetVMenu.CHILD_OPIS_MODULA
FROM MET_V_MENU MetVMenu
WHERE MetVMenu.PARENT_IME_MODULA like :menuRoot
and MetVMenu.CHILD_IME_MODULA in (SELECT * FROM TABLE(CAST(:listOfUserPermission AS STRARRAY)))CHILD_IME_MODULA and PARENT_IME_MODULA are also names of permissions.
2.View Link that connects master.CHILD_ID and detail PARENT_ID
3.Detail view, that then links to itself... to get the tree menu.
SELECT MetVMenu.CHILD_ID,
MetVMenu.CHILD_IME_MODULA,
MetVMenu.PARENT_ID,
MetVMenu.PARENT_IME_MODULA,
MetVMenu.ZST,
MetVMenu.NIVO,
MetVMenu.CHILD_NAZIV_V_MENIJU,
MetVMenu.CHILD_TIP_MODULA,
MetVMenu.CHILD_OPIS_MODULA
FROM MET_V_MENU MetVMenu
WHERE :menuRoot like 'a'
and
MetVMenu.CHILD_IME_MODULA in (SELECT * FROM TABLE(CAST(:listOfUserPermission AS STRARRAY)))4. ViewLink that connects CHILD_ID and PARENT_ID of this "detail" view.
Both views executeQuery methods are overridden to set Bind variables before execution.
I get an arrayList of strings (permissions) from session and then convert it to Array.
ArrayList permmissionsArray = (ArrayList)MyUserSession.getSessionValue("permissions");
Array permissions = new Array(permissionsArray.toArray());
HashMap context = new HashMap();
context.put(DomainContext.ELEMENT_SQL_NAME, "STRARRAY");
context.put(DomainContext.ELEMENT_TYPE, String.class);
if(permissions != null){
permissions.setContext(null, null, context);
setlistOfUserPermission(permissions);
//Here I set menuRoot variable.
I also noticed that there are problems with how I define bind variables (the order matters).
So when i didn't use menuRoot variable in detail view I got the
“inconsistent datatypes: expected - got CHAR"
error in application module.I went through those links, and I am sure the user has enough rights on STRARRAY object.
I noticed that when running application module things work fine if I firstly execute RootView - Master view.
and then double click on VL which shows detail view in table.
The error occurs if I click on ViewLink first. I am not sure if I am even "allowed" to do that.
I set the parameters with "setNamedWhereClauseParam" and print them out before i call super.executeQueryForCollection() and this the output i get:
ExecuteQueryForCollectionRoot
Permission: [AdfIn2Ogrodje.ROOT, AdfIn2Ogrodje.ADMINISTRACIJA, HOME]
[87] MetVMenuRoot1 ViewRowSetImpl.setNamedWhereClauseParam(listOfUserPermission, oracle.jbo.domain.Array@e1af74d9)
[88] MetVMenuRoot1 ViewRowSetImpl.setNamedWhereClauseParam(menuRoot, AdfIn2Ogrodje.ROOT)
//Print before execution.
EXECUTE_MENUROOT menuRoot: AdfIn2Ogrodje.ROOT
EXECUTE_MENUROOT permission: oracle.jbo.domain.Array@e1af74d9
Permission: AdfIn2Ogrodje.ROOT
Permission: AdfIn2Ogrodje.ADMINISTRACIJA
Permission: HOME
[89] MetVMenuRoot1>#q computed SQLStmtBufLen: 537, actual=447, storing=477
[90] SELECT MetVMenu.CHILD_ID, MetVMenu.CHILD_IME_MODULA, MetVMenu.PARENT_ID, MetVMenu.PARENT_IME_MODULA, MetVMenu.ZST, MetVMenu.NIVO, MetVMenu.CHILD_NAZIV_V_MENIJU, MetVMenu.CHILD_TIP_MODULA, MetVMenu.CHILD_OPIS_MODULA FROM MET_V_MENU MetVMenu WHERE MetVMenu.PARENT_IME_MODULA like :menuRoot and MetVMenu.CHILD_IME_MODULA in (SELECT * FROM TABLE(CAST(:listOfUserPermission AS STRARRAY)))
[91] ViewObject: [adfin2.menu.model.views.MetVMenuRoot]MetMenuAppModule.MetVMenuRoot1 Created new QUERY statement
[92] Bind params for ViewObject: [adfin2.menu.model.views.MetVMenuRoot]MetMenuAppModule.MetVMenuRoot1
[93] Binding null of type 12 for "menuRoot"
[94] Binding null of type 12 for "listOfUserPermission"
protected void executeQueryForCollection(Object object, Object[] object2, int i) {
System.out.println("ExecuteQueryForCollectionRoot");
setParametersForSessionTest(); // method where i set the parameters.
printExecute(); // printing
super.executeQueryForCollection(object, object2, i);
}After a few clicks on OK button the query executes normally.
What I am guessing is, that executeQueryForCollection just takes whatever is in object2 and that's null at the beginning.
I tried to use this method, which sets the bind variables in object2. And it gives me "Invalid column type" error.
http://packtlib.packtpub.com/library/9781849684767/ch04lvl1sec07 -
I am a data analyst and I am trying to query a table that I know contains data, but I suspect due to my permissions I cant query this table.
The DBA says I must have my query wrong and their must be 0 records in that table. But I am digging in on this one, I no for a fact due to the documentation its the correct table. I run a simple select * from schema.thistable
How can I verify that their is data in that table to prove a point? And how can I check which database accounts can query that table (who has priveleges), to see if my account is listed or not?this is the info on that table from etrm if it helps:
TABLE: AR.RA_CUSTOMERS
Object Details
Object Name: RA_CUSTOMERS
Object Type: TABLE
Owner: AR
FND Design Data: AR.RA_CUSTOMERS
Subobject Name:
Status: VALID
Storage Details
Tablespace: APPS_TS_ARCHIVE
PCT Free: 10
PCT Used:
Indexes
Index Type Uniqueness Tablespace Column
RA_CUSTOMERS_U1 NORMAL UNIQUE APPS_TS_ARCHIVE CUSTOMER_ID
RA_CUSTOMERS_U2 NORMAL UNIQUE APPS_TS_ARCHIVE ORIG_SYSTEM_REFERENCE
RA_CUSTOMERS_U3 NORMAL UNIQUE APPS_TS_ARCHIVE CUSTOMER_NUMBER
RA_CUSTOMERS_N1 NORMAL NONUNIQUE APPS_TS_ARCHIVE CUSTOMER_NAME
RA_CUSTOMERS_N2 NORMAL NONUNIQUE APPS_TS_ARCHIVE CREATION_DATE
RA_CUSTOMERS_N3 NORMAL NONUNIQUE APPS_TS_ARCHIVE CUSTOMER_KEY
RA_CUSTOMERS_N4 NORMAL NONUNIQUE APPS_TS_ARCHIVE JGZZ_FISCAL_CODE
Columns
Name Datatype Length Mandatory Comments
CUSTOMER_ID NUMBER (15) Yes
LAST_UPDATE_DATE DATE
Yes
LAST_UPDATED_BY NUMBER (15) Yes
CREATION_DATE DATE
Yes
CREATED_BY NUMBER (15) Yes
CUSTOMER_NAME VARCHAR2 (50) Yes
CUSTOMER_NUMBER VARCHAR2 (30) Yes
ORIG_SYSTEM_REFERENCE VARCHAR2 (240) Yes
STATUS VARCHAR2 (1) Yes
LAST_UPDATE_LOGIN NUMBER (15)
CUSTOMER_TYPE VARCHAR2 (25)
CUSTOMER_PROSPECT_CODE VARCHAR2 (30) Yes
CUSTOMER_CLASS_CODE VARCHAR2 (30)
PRIMARY_SALESREP_ID NUMBER (15)
SALES_CHANNEL_CODE VARCHAR2 (30)
SIC_CODE VARCHAR2 (30)
ORDER_TYPE_ID NUMBER (15)
PRICE_LIST_ID NUMBER (15)
ATTRIBUTE_CATEGORY VARCHAR2 (30)
ATTRIBUTE1 VARCHAR2 (150)
ATTRIBUTE2 VARCHAR2 (150)
ATTRIBUTE3 VARCHAR2 (150)
ATTRIBUTE4 VARCHAR2 (150)
ATTRIBUTE5 VARCHAR2 (150)
ATTRIBUTE6 VARCHAR2 (150)
ATTRIBUTE7 VARCHAR2 (150)
ATTRIBUTE8 VARCHAR2 (150)
ATTRIBUTE9 VARCHAR2 (150)
ATTRIBUTE10 VARCHAR2 (150)
REQUEST_ID NUMBER (15)
PROGRAM_APPLICATION_ID NUMBER (15)
PROGRAM_ID NUMBER (15)
PROGRAM_UPDATE_DATE DATE
ANALYSIS_FY VARCHAR2 (5)
CUSTOMER_CATEGORY_CODE VARCHAR2 (30)
CUSTOMER_GROUP_CODE VARCHAR2 (30)
CUSTOMER_KEY VARCHAR2 (50)
CUSTOMER_SUBGROUP_CODE VARCHAR2 (30)
FISCAL_YEAREND_MONTH VARCHAR2 (30)
NET_WORTH NUMBER
NUM_OF_EMPLOYEES NUMBER (15)
POTENTIAL_REVENUE_CURR_FY NUMBER
POTENTIAL_REVENUE_NEXT_FY NUMBER
RANK VARCHAR2 (30)
REFERENCE_USE_FLAG VARCHAR2 (1)
TAX_CODE VARCHAR2 (50)
TAX_REFERENCE VARCHAR2 (50)
ATTRIBUTE11 VARCHAR2 (150)
ATTRIBUTE12 VARCHAR2 (150)
ATTRIBUTE13 VARCHAR2 (150)
ATTRIBUTE14 VARCHAR2 (150)
ATTRIBUTE15 VARCHAR2 (150)
THIRD_PARTY_FLAG VARCHAR2 (1)
ACCESS_TEMPLATE_ENTITY_CODE VARCHAR2 (30)
PRIMARY_SPECIALIST_ID NUMBER (15)
SECONDARY_SPECIALIST_ID NUMBER (15)
COMPETITOR_FLAG VARCHAR2 (1)
DUNNING_SITE_USE_ID NUMBER (15)
STATEMENT_SITE_USE_ID NUMBER (15)
ORIG_SYSTEM VARCHAR2 (30)
YEAR_ESTABLISHED NUMBER (4)
COTERMINATE_DAY_MONTH VARCHAR2 (6)
FOB_POINT VARCHAR2 (30)
FREIGHT_TERM VARCHAR2 (30)
GSA_INDICATOR VARCHAR2 (1)
SHIP_PARTIAL VARCHAR2 (1)
SHIP_VIA VARCHAR2 (25)
WAREHOUSE_ID NUMBER (15)
PAYMENT_TERM_ID NUMBER (15)
TAX_EXEMPT VARCHAR2 (1)
TAX_EXEMPT_NUM VARCHAR2 (30)
TAX_EXEMPT_REASON_CODE VARCHAR2 (30)
JGZZ_FISCAL_CODE VARCHAR2 (20)
DO_NOT_MAIL_FLAG VARCHAR2 (1)
MISSION_STATEMENT VARCHAR2 (2000)
CUSTOMER_NAME_PHONETIC VARCHAR2 (320)
TAX_HEADER_LEVEL_FLAG VARCHAR2 (1)
TAX_ROUNDING_RULE VARCHAR2 (30)
WH_UPDATE_DATE DATE
GLOBAL_ATTRIBUTE1 VARCHAR2 (150)
GLOBAL_ATTRIBUTE2 VARCHAR2 (150)
GLOBAL_ATTRIBUTE3 VARCHAR2 (150)
GLOBAL_ATTRIBUTE4 VARCHAR2 (150)
GLOBAL_ATTRIBUTE5 VARCHAR2 (150)
GLOBAL_ATTRIBUTE6 VARCHAR2 (150)
GLOBAL_ATTRIBUTE7 VARCHAR2 (150)
GLOBAL_ATTRIBUTE8 VARCHAR2 (150)
GLOBAL_ATTRIBUTE9 VARCHAR2 (150)
GLOBAL_ATTRIBUTE10 VARCHAR2 (150)
GLOBAL_ATTRIBUTE11 VARCHAR2 (150)
GLOBAL_ATTRIBUTE12 VARCHAR2 (150)
GLOBAL_ATTRIBUTE13 VARCHAR2 (150)
GLOBAL_ATTRIBUTE14 VARCHAR2 (150)
GLOBAL_ATTRIBUTE15 VARCHAR2 (150)
GLOBAL_ATTRIBUTE16 VARCHAR2 (150)
GLOBAL_ATTRIBUTE17 VARCHAR2 (150)
GLOBAL_ATTRIBUTE18 VARCHAR2 (150)
GLOBAL_ATTRIBUTE19 VARCHAR2 (150)
GLOBAL_ATTRIBUTE20 VARCHAR2 (150)
GLOBAL_ATTRIBUTE_CATEGORY VARCHAR2 (30)
URL VARCHAR2 (240)
PERSON_FLAG VARCHAR2 (1)
FIRST_NAME VARCHAR2 (50)
LAST_NAME VARCHAR2 (50)
DATES_NEGATIVE_TOLERANCE NUMBER
DATES_POSITIVE_TOLERANCE NUMBER
DATE_TYPE_PREFERENCE VARCHAR2 (20)
OVER_SHIPMENT_TOLERANCE NUMBER
UNDER_SHIPMENT_TOLERANCE NUMBER
ITEM_CROSS_REF_PREF VARCHAR2 (30)
OVER_RETURN_TOLERANCE NUMBER
UNDER_RETURN_TOLERANCE NUMBER
SHIP_SETS_INCLUDE_LINES_FLAG VARCHAR2 (1)
ARRIVALSETS_INCLUDE_LINES_FLAG VARCHAR2 (1)
SCHED_DATE_PUSH_FLAG VARCHAR2 (1)
INVOICE_QUANTITY_RULE VARCHAR2 (30)
PRICING_EVENT VARCHAR2 (30)
Query Text
Cut, paste (and edit) the following text to query this object:
SELECT CUSTOMER_ID
, LAST_UPDATE_DATE
, LAST_UPDATED_BY
, CREATION_DATE
, CREATED_BY
, CUSTOMER_NAME
, CUSTOMER_NUMBER
, ORIG_SYSTEM_REFERENCE
, STATUS
, LAST_UPDATE_LOGIN
, CUSTOMER_TYPE
, CUSTOMER_PROSPECT_CODE
, CUSTOMER_CLASS_CODE
, PRIMARY_SALESREP_ID
, SALES_CHANNEL_CODE
, SIC_CODE
, ORDER_TYPE_ID
, PRICE_LIST_ID
, ATTRIBUTE_CATEGORY
, ATTRIBUTE1
, ATTRIBUTE2
, ATTRIBUTE3
, ATTRIBUTE4
, ATTRIBUTE5
, ATTRIBUTE6
, ATTRIBUTE7
, ATTRIBUTE8
, ATTRIBUTE9
, ATTRIBUTE10
, REQUEST_ID
, PROGRAM_APPLICATION_ID
, PROGRAM_ID
, PROGRAM_UPDATE_DATE
, ANALYSIS_FY
, CUSTOMER_CATEGORY_CODE
, CUSTOMER_GROUP_CODE
, CUSTOMER_KEY
, CUSTOMER_SUBGROUP_CODE
, FISCAL_YEAREND_MONTH
, NET_WORTH
, NUM_OF_EMPLOYEES
, POTENTIAL_REVENUE_CURR_FY
, POTENTIAL_REVENUE_NEXT_FY
, RANK
, REFERENCE_USE_FLAG
, TAX_CODE
, TAX_REFERENCE
, ATTRIBUTE11
, ATTRIBUTE12
, ATTRIBUTE13
, ATTRIBUTE14
, ATTRIBUTE15
, THIRD_PARTY_FLAG
, ACCESS_TEMPLATE_ENTITY_CODE
, PRIMARY_SPECIALIST_ID
, SECONDARY_SPECIALIST_ID
, COMPETITOR_FLAG
, DUNNING_SITE_USE_ID
, STATEMENT_SITE_USE_ID
, ORIG_SYSTEM
, YEAR_ESTABLISHED
, COTERMINATE_DAY_MONTH
, FOB_POINT
, FREIGHT_TERM
, GSA_INDICATOR
, SHIP_PARTIAL
, SHIP_VIA
, WAREHOUSE_ID
, PAYMENT_TERM_ID
, TAX_EXEMPT
, TAX_EXEMPT_NUM
, TAX_EXEMPT_REASON_CODE
, JGZZ_FISCAL_CODE
, DO_NOT_MAIL_FLAG
, MISSION_STATEMENT
, CUSTOMER_NAME_PHONETIC
, TAX_HEADER_LEVEL_FLAG
, TAX_ROUNDING_RULE
, WH_UPDATE_DATE
, GLOBAL_ATTRIBUTE1
, GLOBAL_ATTRIBUTE2
, GLOBAL_ATTRIBUTE3
, GLOBAL_ATTRIBUTE4
, GLOBAL_ATTRIBUTE5
, GLOBAL_ATTRIBUTE6
, GLOBAL_ATTRIBUTE7
, GLOBAL_ATTRIBUTE8
, GLOBAL_ATTRIBUTE9
, GLOBAL_ATTRIBUTE10
, GLOBAL_ATTRIBUTE11
, GLOBAL_ATTRIBUTE12
, GLOBAL_ATTRIBUTE13
, GLOBAL_ATTRIBUTE14
, GLOBAL_ATTRIBUTE15
, GLOBAL_ATTRIBUTE16
, GLOBAL_ATTRIBUTE17
, GLOBAL_ATTRIBUTE18
, GLOBAL_ATTRIBUTE19
, GLOBAL_ATTRIBUTE20
, GLOBAL_ATTRIBUTE_CATEGORY
, URL
, PERSON_FLAG
, FIRST_NAME
, LAST_NAME
, DATES_NEGATIVE_TOLERANCE
, DATES_POSITIVE_TOLERANCE
, DATE_TYPE_PREFERENCE
, OVER_SHIPMENT_TOLERANCE
, UNDER_SHIPMENT_TOLERANCE
, ITEM_CROSS_REF_PREF
, OVER_RETURN_TOLERANCE
, UNDER_RETURN_TOLERANCE
, SHIP_SETS_INCLUDE_LINES_FLAG
, ARRIVALSETS_INCLUDE_LINES_FLAG
, SCHED_DATE_PUSH_FLAG
, INVOICE_QUANTITY_RULE
, PRICING_EVENT
FROM AR.RA_CUSTOMERS;
Dependencies
[top of page]
AR.RA_CUSTOMERS does not reference any database object
AR.RA_CUSTOMERS is not referenced by any database object -
Workflow Manager service in Error state after Dec14 CU install
After installing Dec 14 CU and updating the WF farm to CU2 I tried to run the cmdlets as per here -
https://technet.microsoft.com/en-us/library/dn133867.aspx?f=255&MSPPError=-2147217396
$credential = [System.Net.CredentialCache]::DefaultNetworkCredentials
$site = Get-SPSite https://teams.sharepoint.com
$proxy = Get-SPWorkflowServiceApplicationProxy
$svcAddress = $proxy.GetWorkflowServiceAddress($site)
Copy-SPActivitiesToWorkflowService -WorkflowServiceAddress $svcAddress -Credential $credential -Force $true
This errors:
Copy-SPActivitiesToWorkflowService : An internal error occured. For more details, please see the server logs. Client
ActivityId : cb2a40af-2c50-4e5c-8ac2-c5436c351b89.
At line:1 char:1
+ Copy-SPActivitiesToWorkflowService -WorkflowServiceAddress $svcAddress -Credenti ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidData: (Microsoft.Share...WorkflowService:CopySPActivitiesToWorkflowService) [Copy
-SPActivitiesToWorkflowService], InternalServerException
+ FullyQualifiedErrorId : Microsoft.SharePoint.WorkflowServices.PowerShell.CopySPActivitiesToWorkflowService
I then ran get-WFFarmstatus on the WF server (3 in the farm) and see that the service is stopped on all the WF servers with a warning:
WFserver1 WorkflowServiceBackend
Stopped
WARNING: Endpoint https://WFserver1:12290/ is not responding: The remote server returned anerror: (500) Internal Server Error.
WFserver1 WorkflowServiceFrontEnd
Stopped
Checked the underlying services and IIS on the 3 WF servers and these are all now started but the WF service cannot be started:
net start WorkflowServiceBackend
The Workflow Manager Backend service is starting.
The Workflow Manager Backend service could not be started.
A system error has occurred.
System error 1067 has occurred.
The process terminated unexpectedly.
The WF operational logs show this:
Unhandled exception in AppDomain:
Microsoft.Workflow.Common.FatalException: An unrecoverable error occurred. For
diagnostic purposes, this English message is associated with the failure: 'A
required Workflow Manager configuration
'WorkflowServiceScopeSnapshotProcessBatchSize' is not present. Please add this
configuration value.'. ---> System.IO.InvalidDataException: A required
Workflow Manager configuration 'WorkflowServiceScopeSnapshotProcessBatchSize'
is not present. Please add this configuration value. <o:p></o:p>
at
Microsoft.Workflow.Common.AsyncResult.End[TAsyncResult](IAsyncResult result) <o:p></o:p>
at
Microsoft.Workflow.Service.WorkflowServiceBackendHost.OnStartCompleted(IAsyncResult
result) <o:p></o:p>
There is a suggested fix for this here -
http://www.guideushow.com/sharepoint/solved-workflowservicescopesnapshotprocessbatchsize-is-not-present/
(http://www.guideushow.com/sharepoint/solved-workflowservicescopesnapshotprocessbatchsize-is-not-present/)
<o:p></o:p>
I’d like to at least get some feedback as to whether this is safe/supported (MS doesn’t like
any tinkering with the DBs…) – or whether we should go down the uninstall/reinstall
the Workflow farm route - thanks
JHi,
For your issue, try to provid EXECUTE permission for role "WFServiceOperators".
Add Workflow service account as “WFServiceOperators” into the database. Here are the steps to apply permissions:
Open the Query Window and Select the database “WFInstanceManagementDB”
Write the following line of script:
GRANT EXECUTE TO WFServiceoperators
Hit Execute.
Repeat the steps for database “WFResourceManagementDB”
Here are similar issue posts, you can use as a reference:
https://social.msdn.microsoft.com/Forums/office/en-US/351b72e1-1664-43c5-8c2b-ffb307bef38e/cant-access-workflow-status-page-after-workflow-manager-cu2?forum=sharepointadmin
https://social.msdn.microsoft.com/forums/azure/en-US/054d2a58-8847-4a6a-b1ab-05a79f49fe65/workflow-manager-cumulative-update-february-error?forum=wflmgr
Best Regards,
Lisa Chen
TechNet Community Support
Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
[email protected] -
Hi
I get this warning running through powershell_ise but through sql agent it just errors out.
The code does everything it is supposed to and I tried everything to completely resolve the warning to no avail.
How do I supress it so sql agent wont error out running powershell code?
Thanks!
WARNING: Could not obtain SQL Server Service information. An attempt to connect to WMI on 'server_name' failed with the following error: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
Warning only present when it connects to remote servers, it doesn't produce it for local server. And it does get all info from the remote servers.
PaulaHi paulata,
According to your description, when you run powershell scripts about the remote machine
in SQL Server Agent job, the warning error will occur. “The common error message is Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)).” This suggests that your credentials aren't sufficient for accessing the
remote system. If you have an account that has sufficient permissions for the query, there's a simple workaround for this problem in the form of PowerShell's Get-Credential command and the script's Credential parameter. I recommend you check if your account
has permission on remote machine and it can execute the powershell scripts.
In addition, if you want to run query statement on the remote machine , I recommend you create Linked Server, then do some related operations. There is a similar issue about access denied, you can review the following article.
http://social.msdn.microsoft.com/Forums/sqlserver/en-US/157f536d-6716-4547-bdb4-9e3c8451cb95/sql-agent-service-account-permissions-sql-server-2008?forum=sqlgetstarted
Regards,
Sofiya Li
Sofiya Li
TechNet Community Support -
OBI Enterprise Edition hierarchical levels definition - nQSError: 10058
Hi,
i'm trying, in the BI administration tool, to define a dimension hierarchy based on not star nor snowflake scheme. I've a physical fact-table RICETTA linked to the first level physical table DISTRETTO. the physical table DISTRETTO is then linked to the both upper levels: USL and REGIONE. The conceptual hierarchy is DISTRETTO -> USL -> REGIONE. how can I define the logical hierarchy if there's no physical link between REGIONE and USL tables?
The Answer front-end returns the seguent error: Stato: HY000. Codice: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 14026] Unable to navigate requested expression: USL.NOM_REGIONE. Please fix the metadata consistency warnings. (HY000).
Thank for helpIf you followed up the setup document (http://docs.oracle.com/cd/E21043_01/bi.1111/e10541/configscorecard.htm), make sure you Restart the Oracle BI Server, through the Enterprise Manager for your bi instance.
After that, make sure you give your 'BIsystem' role permissions for "Allowing or Disallowing Direct Database Requests".
(You can access that through your RPD->Manage->Identities. Select BIsystem, click on "Permissions", Select tab "Query Limits", and select "Allow" in the "Allow or Disallow Direct Database Requests").
And make sure you either Delete the configured database ("System DB (Update me)") that comes with the Samples, in the RPD, that already has a connection named "BSC", change the connection name in that database, or just use it as the BSC annotations schema.
If you still have problems after that, make sure the connection credentials in your BSC connections are good to go.
Hope it helps.
Best regards. -
Using Dynamic Groups in Ldap for Accounts and Roles
Does anyone currently use dynamic groups in LDAP for accounts and roles? I have set up a dynamic group in ldap (we are using OID Oracle internet Directory 10.1.2.0) , ldapsearch returns the correct list of unique names, but the account does not appear on my profile page when I log in to UCM (10.1.3). I cannot find any documentation so I'm asking myself if it is supported .....
Thanks tim ... will check, but Oracle are saying :
Oracle Universal Content Management - Version: 7.5.1
Information in this document applies to any platform.
Product: Content Server
Version: 6.0
Goal
Can the Content Server's LDAP provider support, or can it be configured to support, dynamic LDAP groups?
Solution
The Content Server by itself is unable to process dynamic LDAP groups since the filter that is used cannot read dynamic groups. However, dynamic groups can still work in the Content Server if the permissions for the queried user are generated on the LDAP server side. For example: Novell and Active Directory both have this functionality.
to which I have replied you suport 3rd party ldaps, but not your own? Shurely shome mishtake ..... if ldap search works in a seamless way, surely provider should too ....
Billy, you may well be right, just got a cashflow problem over here ! -
Cannot Access APEX Views after ugrade to Apex 4
Hi,
We have a pl/sql procedure that is called from a URL. From within the procedure we query the APEX_APPLICATIONS view to retrieve the workspace id that is then used to call wwv_flow_api.set_security_group_id. This was working prior to upgrading to Apex 4 but now has stopped working.
It appears to be a permissions issue when querying the APEX_APPLICATIONS view as the procedure is failing with No Data Found.
We also have the same problem when querying the APEX_APPLICATION_FILES, it returns no rows. If I query the table from SQL Workshop it returns data!!!!
Regards
PaulNot very sure if this will help, but might put you on to something.
1. Login as sys as sysdba
2. Run the script apexvalidate.sql in the apex folder
3. Check the lastest entries in DBA_ERRORS.
Regards,
Prabodh -
Dynamic Groups in LDAP and Calendar
Folks,
I have defined a dynamic group in LDAP. I would like for that group to be invited to an event. When I add an event and search I find the group. When I check the group and click 'OK' it doesn't show the group as invited. When I search again, it says the group is included but no one is invited.
Also, how do I protect a group from being used by anybody???
keithThanks tim ... will check, but Oracle are saying :
Oracle Universal Content Management - Version: 7.5.1
Information in this document applies to any platform.
Product: Content Server
Version: 6.0
Goal
Can the Content Server's LDAP provider support, or can it be configured to support, dynamic LDAP groups?
Solution
The Content Server by itself is unable to process dynamic LDAP groups since the filter that is used cannot read dynamic groups. However, dynamic groups can still work in the Content Server if the permissions for the queried user are generated on the LDAP server side. For example: Novell and Active Directory both have this functionality.
to which I have replied you suport 3rd party ldaps, but not your own? Shurely shome mishtake ..... if ldap search works in a seamless way, surely provider should too ....
Billy, you may well be right, just got a cashflow problem over here ! -
DBMS_XMLPARSER.Parser ORA - 06502
Hi,
Im using DBMS_XMLPARSER for parsing an XML Document
Code is like this
parser DBMS_XMLPARSER.Parser;
parser := DBMS_XMLPARSER.newParser;
but im getting exception at the execution of above statement
EXCEPTION ORA-06502: PL/SQL: numeric or value error: raw variable length too long
Even i have commented all the code except the above line to make sure that Exception is generated from that statement or nor
Can any one help me in this context?If it is not recognizing it, it may be a grant issue. Have you tried verifying that you have permissions. Also query it up in the DBA_SOURCE table and see if you need to add a schemaowner in the front of it. Make sure that it exists as that name.
-
To create such script which will fetch all this data in form of create command
Whenever I do a restore I always forget to reapply some database roles or application roles in post restore steps.We have one database of very different db roles,Grant permissions,Login and User permissions and they changes also frequently.
What dmv's I required to create such script which will fetch all this data in form of create command and after restore I just have to run those create commands and all the rights should visible as before .
ThanksThe context of your question is not entirely clear, but I assume that you restore a copy from one type of environment (for instance QA) to another (for instance development).
To get group membership, you use the catalog views sys.database_principals and sys.database_role_members. Querying these is straightforward.
To get permissions you would query sys.database_permissions. This view is more difficult to query, but you can take shortcuts depending on what is in use at your site.
Erland Sommarskog, SQL Server MVP, [email protected] -
전체 DEFFER TRASACTION 에 대한 DEFCALL을 알아볼수 있는 SCRIPT
제품 : ORACLE SERVER
작성날짜 : 2002-04-29
전체 DEFFER TRASACTION 에 대한 DEFCALL을 알아볼수 있는 SCRIPT
==============================================================
PURPOSE
다음은 REPLICATION MANAGER에서 확인이 가능한 DEFFER TRANSACTION에
대한 DEFCALL의 내용을 알수있는 SCRIPT를 제공한다.
Explanation
REPLICATION MANAGER 에서 GUI 환경에서 알수 있었던 DEFFER TRAN-
SATION에 대한 DEFFER CALL 을 알수 있는 SCRIPT이다.
Exaplanation
------------------------ start script ----------------------------
REM ==============================================================
REM This routine displays all calls for all TXN
REM
REM
REM Run the script in sqlplus connected as the
REM REPADMIN or a user who has permissions
REM to query the deftran and defcall views.
REM
REM Note: Output is limited to 1000000 bytes.
REM
REM ==============================================================
spool trans.log
set serveroutput on size 1000000
DECLARE
argno number;
argtyp number;
typdsc char(15);
rowid_val rowid;
char_val varchar2(255);
date_val date;
number_val number;
varchar2_val varchar2(2000);
raw_val raw(255);
callno number;
start_time varchar2(255);
destination varchar2(255);
v_tranid deftran.deferred_tran_id%TYPE;
local_node varchar2(300);
tranid varchar2(70);
schnam varchar2(35);
pkgnam varchar2(35);
prcnam varchar2(35);
operation varchar2(35);
argcnt number;
cursor c_deftran is
select deferred_tran_id
from deftran;
cursor c_defcall is
select callno,
deferred_tran_id,
schemaname,
packagename,
procname,
argcount
from defcall
where deferred_tran_id = v_tranid;
cursor c_operation is
select substr(procname,5,12)
from defcall
where deferred_tran_id = v_tranid;
cursor c_started is
select to_char(start_time,'MON-DD-YYYY:HH24:MI:SS')
from deftran
where deferred_tran_id = v_tranid;
cursor c_destination is
select dblink from deftrandest
where deferred_tran_id = v_tranid;
begin
select global_name into local_node from global_name;
dbms_output.put_line(chr(10)||'PRINTING ALL CALLS FOR SITE:
'||local_node||chr(10));
FOR c_deftran_rec in c_deftran
LOOP
v_tranid := c_deftran_rec.deferred_tran_id;
argno := 1;
open c_defcall;
open c_operation;
open c_started;
open c_destination;
while TRUE LOOP
fetch c_defcall into
callno,tranid,schnam,pkgnam,prcnam,argcnt;
fetch c_operation into operation;
fetch c_started into start_time;
fetch c_destination into destination;
exit when c_defcall%NOTFOUND;
dbms_output.put_line('*******************************************');
dbms_output.put_line('Transaction id: '||tranid);
dbms_output.put_line('Transaction logged on: '||start_time);
dbms_output.put_line('DML operation is a ' || operation||'.');
dbms_output.put_line('Destination to: ' || destination);
dbms_output.put_line('Call to ' || schnam||'.'||pkgnam||'.'||prcnam);
dbms_output.put_line('ARG ' || 'Data Type ' || 'Value');
dbms_output.put_line('--- ' || '--------------- '
|| '-----------------------');
argno := 1;
while TRUE LOOP
if argno > argcnt then
exit;
end if;
argtyp := dbms_defer_query.get_arg_type(callno, argno, tranid);
if argtyp = 1 then
typdsc := 'VARCHAR2';
varchar2_val := dbms_defer_query.get_varchar2_arg(callno, argno);
dbms_output.put_line(to_char(argno,'09')
|| ') ' || typdsc||' '|| varchar2_val);
end if;
if argtyp = 2 then
typdsc := 'NUMBER';
number_val := dbms_defer_query.get_number_arg(callno, argno);
dbms_output.put_line(to_char(argno,'09')
|| ') ' || typdsc||' '|| number_val);
end if;
if argtyp = 11 then
typdsc := 'ROWID';
rowid_val := dbms_defer_query.get_rowid_arg(callno, argno);
dbms_output.put_line(to_char(argno,'09')
|| ') ' || typdsc||' '|| rowid_val);
end if;
if argtyp = 12 then
typdsc := 'DATE';
date_val := dbms_defer_query.get_date_arg(callno, argno);
dbms_output.put_line(to_char(argno,'09')
|| ') ' || typdsc||' '
|| to_char(date_val,'YYYY-MM-DD HH24:MI:SS'));
end if;
if argtyp = 23 then
typdsc := 'RAW';
raw_val := dbms_defer_query.get_raw_arg(callno, argno);
dbms_output.put_line(to_char(argno,'09')
|| ') ' || typdsc||' '|| raw_val);
end if;
if argtyp = 96 then
typdsc := 'CHAR';
char_val := dbms_defer_query.get_char_arg(callno, argno);
dbms_output.put_line(to_char(argno,'09')
|| ') ' || typdsc||' '|| char_val);
end if;
argno := argno + 1;
end loop;
end loop;
close c_defcall;
close c_operation;
close c_started;
close c_destination;
END LOOP;
end;
spool off
Reference Documents
<Note:117756.1>
Maybe you are looking for
-
How can i get rid of a lot of duplicate songs?
Hi, after the transfer of an itunes librairy on my new imac, my teenaged boy have done the same with his own itunes librairy, but there are a lot of duplicate (more than a thousand). I want to sent them to the trash, but manually it's a tiring and bo
-
Hi, My laptop (Lenovo Amd athlonII P360 dual-core processor) with OS windows 7 shutdown accidentally during updates. From then on I could log in to my system but it keeps popping up some error messages like.... tpsdsvc.exe-ordinal not found----ordina
-
As of recently my macbook air continuously turns on and off. Sometimes it does not turn on at all. When it does turn on, after a few minutes it comes up with the shut down options and unless I press cancel it turns off. Occasionally when turning on
-
A variable that reffers to a class.
I want to make a class that in the constructor defines type of class, like the constructor for ArrayList, with the brackets around <Object>. How do I do this?
-
Hi, I�am only new to the J2EE platform but have experience with J2SE. I have installed J2EE 1.4 and Tomcat server 5.0.28 to study for the Web Component Developer Exam. When I go to compile my java files, the compiler doesn�t not recognise the J2EE pa