What is 'backup before drop' in RTC source control? - clearcase

To left of an RTC component is '(4: backup before drop)'. What does this mean & why is it appearing ? Is this a backed up component before it was dropped (deleted) ?

4 is the id of a baseline (1 being the id of the first baseline referring to an empty component)
'Backup before drop' is the name of the baseline given by the user having created said baseline.
You can change at any time that baseline and select another by clicking on the button 'Replace with ' in your repository workspace.

Related

Oracle APEX - Download selected files as zip - IR/IG checkbox selection

I referred to this link create a download zip button to download files in zip format in Oracle apex latest version 22.2. It is working fine without any issues but only concern is; it downloads all the files in one zip file. Whereas my requirement is to include a checkbox on a report (either IG or IR) and to download selected files in one zip file.
Below is the table I am referring to. Its from Oracle apex sample files upload and download.
select
ID,
ROW_VERSION_NUMBER,
PROJECT_ID,
FILENAME,
FILE_MIMETYPE,
FILE_CHARSET,
FILE_BLOB,
FILE_COMMENTS,
TAGS,
CREATED,
CREATED_BY,
UPDATED,
UPDATED_BY
from EBA_DEMO_FILES
I tried searching over the internet and found few links pointing to APEX_ZIP, PL/SQL compress blob etc. But could not see any demo or working model similar to the link I provided above.
If anybody has working demo or blog,I request to share it. Many thanks.
Update: As suggested by Koen Lostrie, I am updating Page process code below:
DECLARE
l_id_arr apex_t_varchar2;
l_selected_id_arr apex_t_varchar2;
var_zip blob;
BEGIN
-- push all id values to an array
FOR i IN 1..APEX_APPLICATION.G_F03.COUNT LOOP
apex_string.push(l_id_arr,APEX_APPLICATION.G_F03(i));
FOR j IN 1 .. APEX_APPLICATION.G_F01.COUNT LOOP
IF APEX_APPLICATION.G_F01(j) = APEX_APPLICATION.G_F03(i) THEN
-- push all selected emp_id values to a 2nd array
apex_string.push(l_selected_id_arr,APEX_APPLICATION.G_F03(i));
END IF;
END LOOP;
END LOOP;
-- Create/clear the ZIP collection
APEX_COLLECTION.CREATE_OR_TRUNCATE_COLLECTION(
p_collection_name => 'ZIP');
-- Loop through all the files in the database
begin
for var_file in (select fi.filename, fi.file_blob, pr.project
from eba_demo_files fi
inner join eba_demo_file_projects pr on fi.project_id = pr.id
where fi.id in (SELECT column_value FROM table(apex_string.split(apex_string.join(l_selected_id_arr,':'),':'))))
loop
-- Add each file to the var_zip file
APEX_ZIP.ADD_FILE (
p_zipped_blob => var_zip,
p_file_name => var_file.project || '/' || var_file.filename,
p_content => var_file.file_blob );
end loop;
exception when no_data_found then
-- If there are no files in the database, handle error
raise_application_error(-20001, 'No Files found!');
end;
-- Finish creating the zip file (var_zip)
APEX_ZIP.FINISH(
p_zipped_blob => var_zip);
-- Add var_zip to the blob column of the ZIP collection
APEX_COLLECTION.ADD_MEMBER(
p_collection_name => 'ZIP',
p_blob001 => var_zip);
END;
Once page process is done, follow step 3 and 4 from the link provided in OP.
Below is the updated query:
select
ID,
ROW_VERSION_NUMBER,
PROJECT_ID,
FILENAME,
FILE_MIMETYPE,
FILE_CHARSET,
FILE_BLOB,
FILE_COMMENTS,
TAGS,
CREATED,
CREATED_BY,
UPDATED,
UPDATED_BY,
APEX_ITEM.CHECKBOX(1,ID) checkbox,
APEX_ITEM.TEXT(2,FILENAME) some_text,
APEX_ITEM.HIDDEN(3,ID) hidden_empno
from EBA_DEMO_FILES
Big Thanks to Koen Lostrie.
All credits goes to Koen Lostrie.
Thanks,
Richa
This is just an answer to the last comment - the base question was answered in the comments. The question in the comment is "how do I include APEX_ITEM.HIDDEN columns in my report without hiding the columns".
When the columns are hidden in the report, they're not rendered in the DOM, so the values do not exist when the form is posted. That is the reason you're getting the error.
However, take a step back and check what APEX_ITEM.HIDDEN generates. Add a column of type APEX_ITEM.HIDDEN to the report and inspect the column in the browser tools. It generates an input element of type "hidden", so the value is not shown in the report. So to include the column in your report but not make it visible on the screen, just concatenate it to an existing other column:
In your case, with the select from the question that would be:
select
APEX_ITEM.HIDDEN(3,ID) || APEX_ITEM.HIDDEN(2,FILENAME) || ID,
ROW_VERSION_NUMBER,
PROJECT_ID,
FILENAME,
FILE_MIMETYPE,
FILE_CHARSET,
FILE_BLOB,
FILE_COMMENTS,
TAGS,
CREATED,
CREATED_BY,
UPDATED,
UPDATED_BY,
APEX_ITEM.CHECKBOX(1,ID) checkbox
from EBA_DEMO_FILES
Note that filename can also be in a hidden element.

IdentityServer4: what is breaking changes from version 2 and/or 3 to version 4?

Where can I find breaking changes list from version 2 and/or 3 to version 4 of IdentityServer4?
I am trying to upgrade a project with IdentityServer4 version 2 to version 4.
I made a migration from 2.2 to 4.1.2 version two years ago and I remember I found some breaking changes. Others were imposed by the upgrade of framework I made (net core 2.1 to 3.1). These are some of the changes related only to IdentityServer4:
Database scheme. If you have data in production you'll need to maintain this data in the migration. Automatic migrations will delete and recreate tables mercilessly. There are table and column renames, new columns, deleted columns, changes in the indexes...
Client Cors Origins validation. There is a new validation to force all Url configured in ClientCorsOrigins to complain with an Origin format. If only one of them does not comply with the format, an exception is thrown. You should review your production values to avoid fails.
// format:
<protocol>://<domain>:<port>
// good examples:
http://localhost:5000
http://example.com
https://anotherdomain.com
http://example.com:1234
// bad examples
http://example.com/
https://example.com/mypath
example.com:1234
Some code changes:
AuthorizationRequest.ClientId -> AuthorizationRequest.Client.ClientId.
ResourceValidationResult groups ApiResources and IdentityResources properties in a common property called Resources.
ValidatedTokenRequest changes his property Scopes to RequestedScopes.
GetAllUserConsentsAsync -> GetAllUserGrantsAsync.
In your UI some ModelViews will need to be updated to the new scheme. If you stared with the QuickStart.UI you can compare with the new version to add the new features.
If you have an admin you'll have to adapt it to the new scheme.
Migrations
I created the migrations automatically and then I edited the migration to reorder and to add manual scripts to save the data (For example, create a table before deleting the old one and move the data).
These are the scripts I had to insert manually for the Up migration.
Reorder the code to create ApiResourceScopes table before deleting column ApiResourceId from ApiScopes table.
Insert Into [ApiResourceScopes] ([ApiResourceId], [Scope]) Select [ApiResourceId], [Name] From [ApiScopes]
As ApiScopes has a new field called Enabled and by default takes 0, you'll want to enable for all of them. Run this script just before create the Enabled column:
Update [ApiScopes] set [Enabled] = 1
ApiSecrets must be moved to the new table ApiResourceSecrets. So you should run this script before delete ApiSecrets:
Insert Into [ApiResourceSecrets] ([Description], [Value], [Expiration], [Type], [ApiResourceId], [Created]) Select [Description], [Value], [Expiration], [Type], [ApiResourceId], GetDate() From [ApiSecrets]
The table IdentityClaims is renamed to IdentityResourceClaims. So you'll need to run this script after crate IdentityResourceClaims and before delete IdentityClaims.
Insert Into [IdentityResourceClaims] ([Type], [IdentityResourceId]) Select [Type], [IdentityResourceId] From [IdentityClaims]
For the Down migration you need to do exactly the reverse:
Restore ApiScopes. Move the data from ApiResourceScopes.ApiResourceId by using in the join the Scope and the Name fields respectively.
Update [ApiScopes] Set [ApiScopes].[ApiResourceId] = apir.[ApiResourceId] from [ApiScopes] apis Inner Join [ApiResourceScopes] apir On apis.[Name] = apir.[Scope]
Restore ApiSecrets. Move the data after create ApiSecrets table and before delete ApiResourceSecrets:
Insert Into [ApiSecrets] ([Description], [Value], [Expiration], [Type], [ApiResourceId]) Select [Description], [Value], [Expiration], [Type], [ApiResourceId] From [ApiResourceSecrets]
Restore IdentityClaims. Move the data after create IdentityClaims and before delete IdentityResourceClaims:
Insert Into [IdentityClaims] ([Type], [IdentityResourceId]) Select [Type], [IdentityResourceId] From [IdentityResourceClaims]

New column in my table not visible after adding and publishing

I have an existing table => zoo[design] I add to it new column:
zooName nvarchar(50) allow null
Then I updated the server but when i go in zoo[data] and push refresh I can't see the zooName there.
But if I make new Query
select * from zoo
it's display for me the zooName but i can't edit it in the zoo[data]
I closed the project and open it again then it's ok
I don't want to open and close the project every time I need to add new row.
Refresh on your database node from Object Explorer if you are using MSSQL.

Begin and End date times in ssis child packages

I am looking through the SSIS DB Project Catalog to find the Begin and End datetime for every SSIS package called from a Master package. Is there any query to conduct this?
After looking at [internal].[executions], and SSISDB.catalog.operation_messages, etc
Running this query does not work, if I there is a master package calling Child Packages.
select start_time,end_time,*
from catalog.executions cc order by cc.start_time desc
I am trying to find the begin and end time for every child pacakge.
The CATALOG.EXECUTABLE_STATISTICS DMV logs execution statistics for components within a package, including execute package tasks. The START_TIME and END_TIME columns store the time that the component began and completed execution. The EXECUTION_DURATION column holds the time that an executable, in this case the child packages, took to execute in milliseconds. This can of course be converted to seconds, minutes, etc. depending on what you need. While this has a column for the execution path of the component within the parent package, it doesn't have a column for the direct name of component, thus CATALOG.EXECUTABLES is included for the EXECUTABLE_NAME, and this DMV can be omitted if you only want to view the execution path (EXECUTION_PATH column) instead. CATALOG.EXECUTIONS has columns for the folder and project name, and you can join to this to apply filters for the specific project and folder that the package is located in. You can also apply a filter on the EXECUTION_ID column to only view details for a specific execution. Executing a package at the basic logging level with allow execution details to be logged for the components.
SELECT
EX.FOLDER_NAME,
EX.PROJECT_NAME,
E.EXECUTABLE_NAME,
EX.PACKAGE_NAME,
ES.START_TIME AS ComponentStartTime,
ES.END_TIME AS ComponentEndTime,
EX.start_time AS PackageStartTime,
EX.end_time AS PackageEndTime,
ES.EXECUTION_DURATION AS ComponentExecutionTimeInMilliseconds
FROM SSISDB.CATALOG.EXECUTIONS EX
INNER JOIN SSISDB.CATALOG.EXECUTABLES E on EX.EXECUTION_ID = E.EXECUTION_ID
INNER JOIN SSISDB.CATALOG.EXECUTABLE_STATISTICS ES on E.EXECUTABLE_ID = ES.EXECUTABLE_ID AND EX.EXECUTION_ID = ES.EXECUTION_ID
--PACKAGE_NAME- parent package
WHERE E.PACKAGE_NAME = 'Package Name.dtsx' AND EX.PROJECT_NAME = 'Project Name'
AND EX.FOLDER_NAME = 'Folder Name'

How to get procedure,function,view,cursor names for respective table in SQL Server?

I want to get all the details respective to the table as mentioned in the title.
I tried, could get table name and view name but not all.
For Query:
sp_depends 'dbo.Employee'
For UI:
Right click table and View Dependancy
There are different ways to get it done.
Method 1:
sp_depends 'dbo.TableName'
GO
Method 2:
SELECT *
FROM information_schema.routines ISR
WHERE CHARINDEX('dbo.TableName', ISR.ROUTINE_DEFINITION) > 0
GO
Method 3:
SELECT referencing_schema_name, referencing_entity_name,
referencing_id, referencing_class_desc, is_caller_dependent
FROM sys.dm_sql_referencing_entities ('dbo.TableName', 'OBJECT');
GO
RIGHT CLICK ON DBNAME -->TASK--> GENERATE SCRIPT--> CLICK NEXT -->YOU CAN SELECT ALL OBJECT (TABLE,VIEW,SP,FUNCTION, ETC) --> NEXT --> CHOOSE BROWSE WANT TO SAVE SCRIPT -->CLICK NEXT -->CLICK NEXT-->CLICK FINISH
THEN OPEN YOUR LOCATION SCRIPT!
-->IF YOU WANT TO GET RECORD ALL DATA<--
RIGHT CLICK ON DBNAME -->TASK--> GENERATE SCRIPT--> CLICK NEXT -->YOU CAN SELECT ALL OBJECT (TABLE,VIEW,SP,FUNCTION, ETC) --> NEXT -->CLICK ADVANCE-->YOU ARE FIND 'TYPE OF DATA TO SCRIPT' IN TAB GENERAL, THEN CHANGE STATUS AT COMBOBOX TO BE SCEMA AND DATA-->CLICK OK-->CHOOSE BROWSE WANT TO SAVE SCRIPT -->CLICK NEXT -->CLICK NEXT-->CLICK FINISH

Resources