Is there a dql command to find out the docbase owner name? - documentum

Alternatively is there a way to specify what user is used to execute a dm_job?

DQL to get install owner
select r_install_owner from dm_server_config
In Job properties, check "Pass standard arguments", and the launch user will be passed to the Jobs method. For example see Job dm_GwmTask_Alert and its file
$DM_HOME$\bin\dm_gwm_jobs.ebs

To answer the initial question "Is there a dql command to find out the docbase owner name?"
To find out the docbase owner name:
select * from dm_user where user_name='dm_dbo'

Related

Error: Not found: Dataset my-project-name:domain_public was not found in location US

I need to make a query for a dataset provided by a public project. I created my own project and added their dataset to my project. There is a table named: domain_public. When I make query to this table I get this error:
Query Failed
Error: Not found: Dataset my-project-name:domain_public was not found in location US
Job ID: my-project-name:US.bquijob_xxxx
I am from non-US country. What is the issue and how to fix it please?
EDIT 1:
I change the processing location to asia-northeast1 (I am based in Singapore) but the same error:
Error: Not found: Dataset censys-my-projectname:domain_public was not found in location asia-northeast1
Here is a view of my project and the public project censys-io:
Please advise.
EDIT 2:
The query I used to type is based on censys tutorial is:
#standardsql
SELECT domain, alexa_rank
FROM domain_public.current
WHERE p443.https.tls.cipher_suite = 'some_cipher_suite_goes_here';
When I changed the FROM clause to:
FROM `censys-io.domain_public.current`
And the last line to:
WHERE p443.https.tls.cipher_suite.name = 'some_cipher_suite_goes_here';
It worked. Shall I understand that I should always include the projectname.dataset.table (if I'm using the correct terms) and point the typo the Censys? Or is this special case to this project for some reason?
BigQuery can't find your data
How to fix it
Make sure your FROM location contains 3 parts
A project (e.g. bigquery-public-data)
A database (e.g. hacker_news)
A table (e.g. stories)
Like so
`bigquery-public-data.hacker_news.stories`
*note the backticks
Examples
Wrong
SELECT *
FROM `stories`
Wrong
SELECT *
FROM `hacker_news.stories`
Correct
SELECT *
FROM `bigquery-public-data.hacker_news.stories`
In Web UI - click Show Options button and than select your location for "Processing Location"!
Specify the location in which the query will execute. Queries that run in a specific location may only reference data in that location. For data in US/EU, you may choose Unspecified to run the query in the location where the data resides. For data in other locations, you must specify the query location explicitly.
Update
As it stated above - Queries that run in a specific location may only reference data in that location
Assuming that censys-io.domain_public dataset has its data in US - you need to specify US for Processing Location
The problem turned out to be due to wrong table name in the FROM clause.
The right FROM clause should be:
FROM `censys-io.domain_public.current`
While I was typing:
FROM domain_public.current
So the project name is required in the FROM and `` are required because of - in the project name.
Make sure your FROM location contains 3 parts as #stevec mentioned
A project (e.g. bigquery-public-data)
A database (e.g. hacker_news)
A table (e.g. stories)
But in my case, I was using the LegacySql within the Google script editor, so in that case you need to state that to false, for example:
var projectId = 'xxxxxxx';
var request = {
query: 'select * from project.database.table',
useLegacySql: false
};
var queryResults = BigQuery.Jobs.query(request, projectId);
check exact case [upper or lower] and spelling of table or view name.
copy it from table definition and your problem will be solved.
i was using FPL009_Year_Categorization instead of FPL009_Year_categorization
using c as C and getting the error "not found in location asia-south1"
I copied with exact case and problem is resolved.
On your Big Query console, go to the Data Explorer on the left pane, click the small three dots, then select query option from the list. This step confirms you choose the correct project and dataset. Then you can edit the query on the query pane on the right.
may be dataset name changed in create dataset option. it should be US or default location
enter image description here

Sparx EA : detect what database type currently using

Is there are way to detect what type of database currenlty is in use as project datasource?
Because I need to get some inner scripts information. And, in case of simple .EAP project, SQL-query would look like (because of Access db in use):
_repository.SQLQuery(string.Format(#"SELECT * FROM t_script WHERE Notes LIKE '*Script Name=""{0}""*';", scriptName));
But, in case of SQL server I need to execute (as you already guessed I bet) slighly different written query:
_repository.SQLQuery(string.Format(#"SELECT * FROM t_script WHERE Notes LIKE '%Script Name=""{0}""%';", scriptName));
So, is it possible?
UPD:
I found one option - looks like there are _repository.ConnectionString property which could be parsed
"SparxEaDatabase --- DBType=1;Connect=Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=SparxEaDatabase;Data Source=SOURCENAME;LazyLoad=1;"
Is there are more?
I would just look into Repository.RepositoryType. This will return for Example: JET, MYSQL, or SQLSVR.

How to locate the node in JCR using uuid from query

This is the error I get.
16.03.2016 12:02:16.413 WARN [xxx.xxx.xx.xxx [1458147736268] GET /en/employees-leaders/employee-s-toolkit2/epd-update/epd-update-archives/caterpillar-news/upcoming-brand-webinarfocusonmarketing.html HTTP/1.1] com.day.cq.wcm.core.impl.LanguageManagerImpl Error while
retrieving language property. javax.jcr.AccessDeniedException: cannot
read item xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx (alpha-numeric)
I am trying to locate the node in JCR using the xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx, which I believe is uuid, using a query in AEM.
Is the xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx actually a uuid?
How do I locate the source i.e node, causing the issue?
I tried running a sql with the above id in the jcr, but it returned no result.
//*[jcr:contains(., '91186155-45ad-474-9ad9-d5156a398629')] order by #jcr:score descending
Any other insights would be much appreciated.
You don't need a query if you know the Node's UUID, just use the Session.getNodeByIdentifier(String id) method.
Your query is not SQL as you stated, it's XPATH. Is that a typo or did you run the query incorrectly?
It certainly looks like a UUID. You can query for the jcr:uuid property or you can continue doing a full text search.
XPATH:
/jcr:root//*[jcr:contains(., '91186155-45ad-474-9ad9-d5156a398629')]
/jcr:root//*[#jcr:uuid='91186155-45ad-474-9ad9-d5156a398629']
JCR-SQL2:
SELECT * FROM [nt:base] AS s WHERE contains(s.*, '91186155-45ad-474-9ad9-d5156a398629')
SELECT * FROM [nt:base] WHERE [jcr:uuid] = '91186155-45ad-474-9ad9-d5156a398629'
What read permissions does your account have? You're going to find a lot of results for a jcr:uuid query will be under /jcr:system/jcr:versionStorage.
Use QueryBuilderDebugger, (localhost:4502/libs/cq/search/content/querydebug.html) and run similar query as below to get the node for a given uuid:
property=jcr:uuid
property.value=e69b256e-a466-3730-866b-de22c82ab8ck
path=/home
type=rep:Group
p.limit=10

Need to build list of group members

I have a server with its own local Groups. These groups hold AD users. I use them to apply permissions for the user in a web app. I need to generate a list of all the users in the group.
This is the script I'm trying to use:
dsquery group -samid "MyGroup" | dsget group "MyGroup" -members >c:\List.txt
I've tried many generations of this code and all I get are errors. At least this one creates a text file before it errors (with nothing in it).
So what am I doing wrong (I confess I'm new to this command line tool).
EDIT: the error I'm getting is "dsget failed:Value for 'Target object for this command' has incorrect format."
Thanks in advance.
I too am a newbie.
But I beleive you want is:
dsquery group -name "MyGroup" | dsget group -members > c:\List.txt
Where you replace "MyGroup" with the name of the group you are looking for. If looking for multiple groups which begin the same way, surround MyGroup with asterisks instead of quotation marks.

Modify entry in OpenLDAP directory

I have a large Openldap directory. In the directory the display name property for every is filled but i need to modify these entry and make it like "givenName + + sn". Is there are way i can do it directly in the directory just like sql queries (update query). I have read about the ldapmodify but could not find the way to use it like this.
Any help in this regard will be appreciated.
There is no way to do this with a single LDAP API call. You'll always have to use one LDAP search operation to get givenname and sn attributes, and one LDAP modify operation to modify the displayName attribute.
If you use the command line ldaptools "ldapsearch" and "ldapmodify", you can do this easily with some shell scripting, but you'll have to be careful: sometimes ldapsearch(1) can return LDIF data in base64 format, with UTF-8 strings that contain characters beyond ascii. For instance: 'sn:: Base64data' (note the double ':')
So, if I were you I would use a simple script in my language of choice, that has an LDAP API, instead of using shell commands. This would save me the troubles of base64 decoding that the ldaptools sometimes impose.
For instance, with php-cli, your script would be roughly like this (perhaps some more error checking would be appropriate):
<?php
$ldap = ldap_connect('host');
ldap_bind($ldap, ...);
$sr = ldap_search($ldap, 'ou=people,...', 'objectclass=*');
$entries= ldap_get_entries($ldap, $sr);
for($i=0; $i<$entries['count']; $i++) {
$modify = array('displayname' => $entries[$i]['givenname'] . ' ' . $entries[$i]['sn']);
ldap_modify($ldap, $entries[$i]['dn'], $modify);
}
Addendum: if you want to keep this data up to date without any intervention, you will probably need to use a specialized OpenLDAP module that keeps "virtual" attributes, or even a virtual directory, such as Penrose or Oracle Virtual Directory, on top of OpenLDAP. However this might be overkill for a simple concatenation of attributes.