Views on SQL DW are not visible in SSMS and in [INFORMATION_SCHEMA].[VIEWS] - azure-sqldw

I just created a view using below definition
create view dbo.dm_pdw_exec_requests_hist_view as
select t1.*,login_name,app_name,client_id from sys.dm_pdw_exec_requests t1
left outer join [sys].[dm_pdw_exec_sessions] t2 on
t1.request_id=t2.request_id
and the view was created successfully.
but I was not able to see the view in the SSMS tool [ Under views section]
and also - when I tried to query [INFORMATION_SCHEMA].[VIEWS] , there also i couldnt see a entry for the view dm_pdw_exec_requests_hist_view
select * from [INFORMATION_SCHEMA].[VIEWS]
But if I do select * from dm_pdw_exec_requests_hist_view ; it is returning the results as expected.
So - is there any restriction in viewing the definition of a view which contains DMVs in it ?
Thanks,
Aravind

This is very odd. I'm able to repo your behavior that the view doesn't show up in our DMVs (sys.objects or sys.views). This is the defect as SSMS which uses those views isn't aware of it. I do see that creating and then running the view works (sample below) so functionally this is working. I also tried renaming the view to dbo.Matt (creative, I know) and this worked. I've filed a defect to figure out the reserved name issue and we can document this for now.
CREATE VIEW dbo.dm_pdw_exec_requests_hist_view
AS
select
t1.*,
login_name,
app_name,
client_id
from
sys.dm_pdw_exec_requests t1
left outer join [sys].[dm_pdw_exec_sessions] t2 on t1.request_id=t2.request_id;
GO
SELECT * FROM dbo.dm_pdw_exec_requests_hist_view
GO

this is a very interesting case.
At first I thought maybe you're using an older version of SSMS, because I can see VIEWS in my SSMS.
But then I tried to create your View and this one doesn't show up.
Even querying sys.objects or sys.all_objects doesn't show that the View exists.
I have no idea what is going on here, but suggest you open a support case.
Markus

Related

Oracle apex (19.1) - hide interactive report panel when table is empty

I got an interactive report with a "collapsible" template.
When the table is empty there is an empty panel that takes up a lot of space. In Classic report this space does not exist when the table is empty.
I can't find a way that interactive report will behave the same way (we don't want to use Classic report).
I need a simple generic solution since we have a lot of tables.
The interactive report looks like this:
And I want it to look like this (as Classic report):
You could apply an after-refresh dynamic action that checks for the existence of the nodatafound area, and hide/treat the region in some way:
$(this.triggeringElement).find('.nodatafound').length == 1
Or you could apply a different amount of padding to the .a-IRR-noDataMsg class
.a-IRR-noDataMsg {padding: 5px;}

Oracle APEX - Interactive Grid not rendering correctly in IE 11

I am currently using Oracle APEX version 18.2.0.00.12 on Internet Explorer 11 and I am experiencing problems with getting my interactive grids to render correctly with regards to the widths of the columns.
I created an Interactive Grid on my page with the following query:
SELECT * FROM TABLE_NAME;
I did not change any of the default settings for the region; all I did was create the IG and then run the page.
When I run the page in IE, this is what I see:
Note: I have not yet added any data to the table.
The problem is that all of the columns are too narrow. However, when I run the same page in Google Chrome, this is what I see:
The columns are all sized proportionally in order to take up the full width of the IG, which is what I want.
I do not understand why the IG is rendered differently in IE versus Chrome. I know that I can set the Minimum Column Width for each column in the IG, but I would hate to do that every time I create an IG. Is there a different solution that would make the IG render in IE the same way that it does in Chrome?
Thank you in advance.
Actually remembered a solutuion. I cannot explain to you why this works, or how best to use it. But when I had this problem I sort of patched it by saving a default report.
But the strange thing, you had to manually adjust every column, even if it was to the same size as before, it just had to have been adjusted before the default report was saved. Then the grid would show as it should, but this isnt that good a solution since its only ok if everybody uses the same size display,..

Oracle APEX - Reusable Pages?

We have some tables in our database that all have the same attributes but the table is named differently for each. I'm not sure of the Architect's original intent in creating them in this way, but this is what I have to work with.
My question for all the expert Oracle APEX developers: is there away to create a reusable page that I can pass the table name to and that table name would be used in the reporting region and DML processing of that page?
I've read up on templates and plugins and don't see a path forward with those options. Of course, I'm new to webdevelopment, so forgive my ignorance.
We are using version 18.2.
Thanks,
Brian
For reporting purposes, you could use a source which is a function that returns a query (i.e. a SELECT statement). Doing so, you'd dynamically decide which table to select from.
However, DML isn't that simple. Instead of default row processing, you should write your own process(es) so that you'd insert/update/delete rows in the right table. I've never done that, but I'd say that it is possible. Basically, you'd keep all logic in the database (for example, a package) and call those procedures from your Apex application.
You could have multiple regions on one page; one region per table. Then use dynamic actions to show/hide the regions and run the select query based on a table name selected by the user.
Select table name from a dropdown or list
Show the region that matches the table name (dynamic action)
Hide the any other regions that are visible (dynamic action)
Refresh the selected region so the data loads (dynamic action)
If that idea works let me know and I can provide a bit more guidance.
I never tried it with reports, but would it work to put all three reports in a single page, and set them via an Item to have Server-Side Conditions that decide what gets shown in the page? You'd likely need separate items with a determined value for the page to recognize and display.
I know I did that to set buttons such as Delete, Save and Create dynamically, rather than creating two or more separate pages for handling editing of certain information. In this case it regarded which buttons to shown based on a reports' primary key being sent to said "Edit" page. If the value was empty, it meant you wanted to create a new record (also because the create button/link sent no PK). If said PK was sent (via a edit button/link), then you'd have the page recognize it and hide the create button and rather show the edit button.

Hi, i need a result of all attributes including the properties when we right click the documents and see

I want all the mandatory single and repeating attributes and also the properties when we see by right click the documents for the Archive cabinet. I tried the below query in Oracle SQL Developer :
select r_object_id, object_name, r_object_type, title, subject,
r_creation_date, r_modify_date, r_modifier, a_content_type,
i_contents_id, i_cabinet_id,owner_name,i_chronicle_id,authors,keywords,
i_folder_id,r_version_label
FROM IPEDMS.dm_sysobject_s, IPEDMS.dm_sysobject_r
WHERE IPEDMS.dm_sysobject_s.r_object_id = IPEDMS.dm_sysobject_r.r_object_id
and r_object_id in (select * from ip_indexcard_doc_s);
Please let me know the correct query.
Note: in the ip_indexcard_doc_s table only i found those properties when we right click the documeents under archive.
You need to look in the dm_type_xxx tables along with some other tables.
Easiest way to find out is to install the dqMan from FME and work your way though that. It's free and very good for working with docbases.
And as stated by #cgrim above, you should consider to use DQL instead unless you really understand the Documentum object model.

Build an APEX URL that pulls in the APP_USER ID

I am using a PL/SQL Region in APEX where I am build an Interactive Report Link that will filter the report for the USERs :APP_USER id and provide them a view of their rows only.
The Region first counts the rows to show the user how many rows he/she has and then the URL directs them to the IR page and filters the IR for their ID. For example...
SELECT count(*) INTO l_open_proj FROM crd_mpl_upload WHERE LOWER(GLB_CPM_QID) = LOWER(:APP_USER);
later...I have the part where the URL is built.
sys.htp.p('<li class="uNumber uGrid col_2">');
sys.htp.p('<ahref="'||sys.htf.escape_sc('fp='||:APP_ID||':12:'||:APP_SESSION||':::12,RIR:**IR_GLB_CPM_QID:upper(:APP_USER)**:') ||'">');
sys.htp.p('<big class="uValue">' || l_open_proj || '</big>');
sys.htp.p('<small class="uLabel">My Projects</small>');
sys.htp.p('</a>');
sys.htp.p('</li>');
The part specifically I am having issues with is the IR_GLB_CPM_QID:upper(:APP_USER) as :APP_USER here does not pull through the users NTLM authenticated ID. I ahve tried upper and lower, etc. and I don;t that is the issues. The ID will come through as P123456 for example.
Any ideas or help would be greatly appreciated.
Thanks,
The reference to the :APP_USER bind variable is within a string, unlike the others.
In this case it's safe to user &APP_USER. instead (don't forget trailing dot), but do not use this substitution syntax in SQL.
You'll also have issues with the upper() in this context, though I don't think it's necessary? And should be done within the SQL if so.