How to connect NEWSPAPER of INFORMATION to the table of the newspaper so that the operation of ROLLING BACK of the user?
How to connect NEWSPAPER of INFORMATION to the table of the newspaper so that the operation of ROLLING BACK of the user? any example?Fjean wrote:
What is the independent procedure/function?
You can create stand-alone procedure to record messages even if the transaction is rolled back messages is stored in the table and are committed.
Example of
SQL> DECLARE
2 PRAGMA AUTONOMOUS_TRANSACTION;
3 emp_id NUMBER(6);
4 amount NUMBER(6,2);
5 BEGIN
6 emp_id := 200;
7 amount := 200;
8 UPDATE employees SET salary = salary - amount WHERE employee_id = emp_id;
9 COMMIT;
10 END;
11 /
PL/SQL procedure successfully completed.
---log_error procedure
-- Table Err_tab ( seq number , time_stamp date, message varchar2(4000))
CREATE PROCEDURE log_error (p_message VARCHAR2) AS
PRAGMA AUTONOMOUS_TRANSACTION;
BEGIN
INSERT INTO Err_Tab(seq.err_seq,SYSDATE,p_message) ;
COMMIT;
END log_error;
/
-- You can use this procedure to log
-- error messages as follows in a transaction
BEGIN
log_error('Start emp update') ;
UPDATE emp set
log_error('End emp update');
EXCEPTION WHEN OTHERS
log_error('Update Error '||SQLERRM);
ROLLBACK ;
END ;
/
Even in case of Rollback error messages will be inserted to log table
SS
Tags: Database
Similar Questions
-
How to get more information about the user using SecurityContext ADF?
Hello.
In my application I have a table use:
CREATE TABLE ("ADM_USERS"
ACTIVATE THE 'ID' NUMBER(*,0) NOT NULL,
ACTIVATE THE 'U_NAME' VARCHAR2 (30 BYTE) NOT NULL,
ACTIVATE THE "U_PASS" VARCHAR2 (255 BYTE) NOT NULL,
VARCHAR2 (30 BYTE) "NAME."
VARCHAR2 (30 BYTE) 'NAME')
I configured the WebLogic environment using the the "reading- SQL only the authentication provider ' and then I configured ADF Security as ADF authentication -> Forms -authentication.
I connect the user using the method of ""doLogin " and all that working properly. "
public String doLogin() {}
String _username =;
Byte [] pw = _password.getBytes ();
FacesContext fctx = FacesContext.getCurrentInstance ();
HttpServletRequest request = (HttpServletRequest) () .getRequest () fctx.getExternalContext;
try {}
Topic topic = Authentication.login (new URLCallbackHandler (UN, pw));
ServletAuthentication.runAs (object, request);
String loginUrl = "/ adfAuthentication?success_url=/faces/Registry.jsf";
HttpServletResponse response = (HttpServletResponse) fctx.getExternalContext (m:System.NET.FtpWebRequest.GetResponse ());
sendForward (request, response, loginUrl);
} catch (FailedLoginException fle) {}
FacesMessage msg = new FacesMessage (FacesMessage.SEVERITY_ERROR, "Incorrect name or password","Incorrect name or password" "");
fctx.addMessage (null, msg);
} catch {} (the LoginException)
reportUnexpectedLoginError ("LoginException", the);
}
Returns a null value.
}
securityContext.userName returns the value of the 'U_NAME '.
How to make more information on the user connected such as NAME, ID, first NAME?
And the second question:
How to store the value of the field 'ID' in table 'ADM_USERS' in any table with the 'IDUSER' with objects of entity created in application scope?
Concerning
Darek
securityContext.userName returns the value of the 'U_NAME '.
How can I get more information about the user logged as NAME, first NAME, ID?You can not.
You need to query DB.
How to store the value of the field 'ID' in table 'ADM_USERS' in any table with the 'IDUSER' with objects of entity created in application scope?
Record this value in UserData structure so it will be available in the model. http://andrejusb.blogspot.com/2012/05/solution-for-sharing-global-user-data.html
Then use as default expression for your objects of entity attributes (something like: adf.userSession.userData.yourUserDataVar).
Dario
-
How to connect & activate external speakers to the Windows 7 desktop PC
How to connect & activate external speakers to the Windows 7 desktop PC?
Can't get PC to recognize external speakers
Hello
Thanks for posting your query on the Microsoft Community.
According to the description, I understand that the PC recognizes not the external speakers.
This could be due to hardware conflicts.
I suggest you to refer to the suggestions of Fahimulla K replied on March 4, 2010 and check if that helps.
Hope this information helps. Please let us know if you need any other help with Windows in the future. We will be happy to help you.
-
How to provide custom information to the user in the InfoBar
In a previous thread (authorization re - data charges Essbase without erasing existing data it has been suggested that it is possible to provide information to the user via the 'information' window. I guess that this refers to the information bar window that appears when performing different tasks in web client FDM?
If so, how you get there? The Administrator's guide is only seems to point to Administration | Web settings, where you can customize the behavior of the information bar. But is it possible to load the message and set the type of message (info, warning, error) from a script of the event?Yes, you can fill a script of the event. There is an accelerator of General utility to "Display the information bar Message".
-
Hello
Please someone can instruct me on how to implement Group Policy to clear the MRU lists and to clear or to prevent the login information of the user for such programs as being registered remote desktop. Your help would be much appreciated.
Kind regards
RocknRollTim
Hi Tim,.
Please contact Microsoft Community.
I understand that you want to prevent the user details stored connection and deletes automatically the most recently used (MRU) list. To help you better ask you to answer the following questions:
Your computer is connected to the domain?
Please see the configuration group policies section below.
http://TechNet.Microsoft.com/en-us/library/bb742376.aspx
If the problem persists, thanks for posting the same question in the Microsoft TechNet forum for assistance.
https://social.technet.Microsoft.com/forums/en-us/home
Hope this information helps. Response with status so that we can help you.
-
CONNECT IN a loop in the user data
Could someone help me because I can not find a solution.
I want to build a tree of 3 tables (parent-> children-> detail)
Everything works fine with 2 tables, but when I add the third table I get always an error ORA: ORA-01436: CONNECT BY a loop in the user data
CREATE TABLE nineham (organisatie_id NUMBER
(, naam VARCHAR2 (50));
--
CREATE TABLE seizoenen (seizoen_id NUMBER
organisatie_id NUMBER
(, naam VARCHAR2 (50));
--
CREATE TABLE competities (competitie_id NUMBER
seizoen_id NUMBER
(, naam VARCHAR2 (50));
--
INSERT INTO nineham (organisatie_id, name) VALUES (1, 'ORGANISATIE_1');
INSERT INTO nineham (organisatie_id, name) VALUES (2, 'ORGANISATIE_2');
--
INSERT INTO seizoenen (seizoen_id, organisatie_id, naam) VALUES (1, 1, 'SEIZOEN_1');
INSERT INTO seizoenen (seizoen_id, organisatie_id, naam) VALUES (2, 1, 'SEIZOEN_2');
INSERT INTO seizoenen (seizoen_id, organisatie_id, naam) VALUES (1, 2, 'SEIZOEN_3');
INSERT INTO seizoenen (seizoen_id, organisatie_id, naam) VALUES (2, 2, 'SEIZOEN_4');
--
INSERT INTO competities (competitie_id, seizoen_id, naam) VALUES (1, 1, 'COMPETITIE_1');
INSERT INTO competities (competitie_id, seizoen_id, naam) VALUES (2, 1, 'COMPETITIE_2');
INSERT INTO competities (competitie_id, seizoen_id, naam) VALUES (3, 2, 'COMPETITIE_3');
INSERT INTO competities (competitie_id, seizoen_id, naam) VALUES (4, 2, "COMPETITIE_4");
INSERT INTO competities (competitie_id, seizoen_id, naam) VALUES (5, 2, "COMPETITIE_5");
--
--
--
SELECT LPAD (' ', LEVEL * 2, ' ') | Naam AS display
LEVEL AS lvl
DE)
SELECT NULL AS parent
child organisatie_id
naam
To nineham
UNION ALL
SELECT organisatie_id AS parent
child seizoen_id
naam
OF seizoenen
UNION ALL
Seizoen_id SELECT parent
Child AS NULL
naam
OF competities
)
START WITH parent IS NULL
CONNECT BY PRIOR child = parent
;
Hello
When you perform a CONNECT BY query, you must have an identifier unique to each child. You use numbers that are unique to each table, but are no longer unique when you UNION the paintings together. When the query finds children 1, the fact that average organisatie_id = 1, or does that mean seizoen_id = 1, or does this mean competetite_id = 1?
Etbin suggested you change data. Which can be difficult; It might not even be possible. In addition, you must make sure that the new IDS are unique. When you assign advent = 10 to a node, for example, you must be sure that 10 is not an organisatie_id.
Here is another solution that is guarranted to generate unique IDS, without changing the actual tables:
SELECT LPAD (' ', LEVEL * 2, ' ') | Naam AS display
LEVEL AS lvl
DE)
SELECT NULL AS parent
organisatie_id AS child
, 1 AS the level of
naam
To nineham
UNION ALL
SELECT organisatie_id AS parent
seizoen_id AS child
, 2 AS the level of
naam
OF seizoenen
UNION ALL
SELECT seizoen_id AS parent
Child AS NULL
, 3 AS the level of
naam
OF competities
)
START WITH parent IS NULL
AND level = 1
CONNECT BY PRIOR child = parent
AND layer = FIRST + 1
;
The composite key formed by your original ID, and the new level number is unique.
Note that the query above is exactly what you have posted, with the addition of the lines that refer to level.
-
How prevention JButton to actions generated when the user press down
How prevention JButton to actions generated when the user hold down the key or the short cut
The code below to show the question when the user keep pressing Alt O
We want to stop the JButton to generate multi shares just a share only
A code example shows the behavior that needs to be prevented. Keep pressing "Alt + O" and you will see that the standard ouptput will print the timestamp
Note Please, I'm NOT interested in the mouse press which is a solution by adding a threshold (setMultiClickThreshhold (long line) on the JButton as an attribute.
Published by: user12130673 on 13-feb-2013 03:01public class TestPanel extends JPanel { private JButton btn; public TestPanel() { btn = new JButton("Open"); this.add(btn); registerCommand(new MyAction(), InputEvent.ALT_MASK, KeyEvent.VK_O, btn, btn.getText(), 0); } public static void registerCommand(AbstractAction action, int mask, int shortCommand, JComponent component, String actionName, int mnemonicIndex) { InputMap inputMap = component.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW); KeyStroke knappKombination = KeyStroke.getKeyStroke(shortCommand, mask); if ((component instanceof AbstractButton) && mnemonicIndex >= 0 && mnemonicIndex < actionName.length() && (shortCommand >= KeyEvent.VK_A && shortCommand <= KeyEvent.VK_Z)) { ((AbstractButton) component).setDisplayedMnemonicIndex(mnemonicIndex); } if (inputMap != null) { ActionMap actionMap = component.getActionMap(); inputMap.put(knappKombination, actionName); if (actionMap != null) { actionMap.put(actionName, action); } } } public static class MyAction extends AbstractAction { /** * */ private static final long serialVersionUID = 1L; @Override public void actionPerformed(ActionEvent e) { System.out.println(System.currentTimeMillis()); } } public static void main(String... args) { SwingUtilities.invokeLater(new Runnable() { public void run() { JFrame frame = new JFrame("Testing"); JPanel panel = new TestPanel(); frame.getContentPane().add(panel); frame.setPreferredSize(new Dimension(500, 500)); frame.setMinimumSize(new Dimension(500, 500)); frame.pack(); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setVisible(true); } }); } }
Use getKeyStroke (int keyCode, int modifiers, boolean onKeyRelease) hit with onKeyRelease = true instead?
-
How can I mount types defined by the user of the package?
I have two types of similar packages (gt_Teste) in two different packages.
How can I mount types defined by the user of the package?
(I shouldn't want to made a new statement va_Teste2 pkgl_lu2.gt_teste due to the desire to increase memory allocation)
------------------------------------------------------------------------------------------
-ANONYMOUS BLOCK
------------------------------------------------------------------------------------------
declare
va_Teste pkgl_lu1.gt_teste;
va_Teste2 pkgl_lu2.gt_teste;
Start
--
pkgl_lu1.prcl_init (va_Teste);
pkgl_lu1.prcl_print (va_Teste);
+/*
-I don't want to do it because of memory allocation:
Because me in va_Teste.First... va_Teste.Last loop
va_Teste2(va_Teste2.Count+1): = va_Teste (i);
End loop;
*/+
pkgl_lu2.prcl_print (CAST (va_Teste AS pkgl_lu2.gt_Teste));
end;
/
------------------------------------------------------------------------------------------
-PACKAGE PKGL_LU1
------------------------------------------------------------------------------------------
create or replace package pkgl_lu1 is
type gt_teste is table of index varchar2 (100) by simple_integer;
procedure prcl_init (pi_teste in out nocopy gt_teste);
procedure prcl_print (pi_teste gt_teste);
End;
/
create or replace package body is pkgl_lu1
---------------------------------------------
procedure prcl_init (pi_teste in out nocopy gt_teste)
is
Start
pi_teste (pi_teste.count + 1): = 'A ';
pi_teste (pi_teste.count + 1): = 'B ';.
pi_teste (pi_teste.count + 1): = 'C ';
pi_teste (pi_teste.count + 1): = ';
end;
---------------------------------------------
procedure prcl_print (pi_teste gt_teste)
is
Start
I'm in pi_teste.first... pi_teste. Last loop
dbms_output.put_line (pi_teste (i));
End loop;
end;
End;
/
------------------------------------------------------------------------------------------
-PACKAGE PKGL_LU2
------------------------------------------------------------------------------------------
create or replace package pkgl_lu2 is
type gt_teste is table of index varchar2 (100) by simple_integer;
va_teste gt_teste;
-procedure prcl_init (pi_teste in out nocopy gt_teste);
procedure prcl_print (pi_teste gt_teste);
End;
/
create or replace package body is pkgl_lu2
procedure prcl_print (pi_teste gt_teste)
is
Start
I'm in pi_teste.first... pi_teste. Last loop
dbms_output.put_line (pi_teste (i));
End loop;
end;
End;
/I see, well it's unfortunate bloody.
Ideally you would have a package (utility package or something) with objects like that, that can be shared between the development environment, unless you never have an interface code (each package is entirely distinct from all other packages, and honestly, it's not likely to happen).
I guess that your only option (I think) If you are concerned with memory usage would be to remove the table while assigning a new.
For i In va_Teste.First..va_Teste.Last Loop va_Teste2(va_Teste2.count+1) := va_Teste(i); va_Teste.DELETE(i); End Loop;
-
How to get IP/MAC information of the governing body ILO as stated in the material status tab
Hello
I know there are scripts of HP to collect information of the IPC/MAC (hpconfg get_network.xml) ILO Governing Council and then use VMware powercli IPMI script to feed DPM.
as published on http://www.vpeeling.com/?tag=scripting
Add-PSSnapin vmware. VimAutomation.core - ErrorAction SilentlyContinue
SE connect-VIserver-Server your.vcenter.server
$VMHosts = @(import-Csv "C:\scripts\host-info.csv")
$IPMIUser = "dpmuser".
$IPMIPass = "dpmpass".{foreach ($VMhost to $VMHosts)
$esxMoRef = get-vmhost $VMHost.Hostname | % {Get-view $_.} ID}
$IpmiInfo = new-Object Vmware.Vim.HostIpmiInfo
$IpmiInfo.BmcIpAddress = $VMHost.iLOIP
$IpmiInfo.BmcMacAddress = $VMHost.iLOMAC
$IpmiInfo.Login = $IPMIUser
$IpmiInfo.Password = $IPMIPass
$esxMoRef.UpdateIpmi ($IpmiInfo)}
But, the question I got recently. How can get out us of this info via vCenter? The vClient has the named material status tab and we see this info.
Did anyone tried it this way?
PowerCLI or SDK (c#), his is not serious.
Thanks in advance
A.S.
You may have gotten a solution now...
In any case, I found this function (Get-VMHostWSManInstance) which works fine:
http://blogs.VMware.com/vipowershell/2009/03/monitoring-ESX-hardware-with-PowerShell.html
The most difficult part is to identify the CIM class containing the BMC MAC/IP address (in my case I need just an IP address). After digging in this doc:
I had the chance to locate: OMC_IPMIIPProtocolEndpoint
The Get-VMHostWSManInstance call:
Get-VMHostWSManInstance - VMHost (get-vmhost 'vmhost1') - OMC_IPMIIPProtocolEndpoint - ignoreCertFailures of the class | Select IPv4Address, MACAddress
will give the address IP/MAC of BMC.
BTW, I'm using PowerCLI 5.0.1 on Windows 7, is the host ESX 4.x
-
How to get more information about the users in oracle 11g
Hi all
I need to know more information on users in oracle 11g.
1. how to check when user times last connection to the database.
2. If the user account is blocking why it is blocked? If it is locked trying Loing with wrong password how to check how many times he tried with wrong password... and other reasons also
3 reaction strives to select user expire date is to show the value empty... we can check expire date by querys or we need to check the profile?
4. how to check while he was reset his password, the last time.
Please correct me if am wrong. Thank you
Concerning1. how to check when user times last connection to the database.
AUDIT
2. If the user account is blocking why it is blocked? If it is locked trying Loing with wrong password how to check how many times he tried with wrong password... and other reasons also
Check the profile of this user and attr.
3 reaction strives to select user expire date is to show the value empty... we can check expire date by querys or we need to check the profile?
SQL> select EXPIRY_DATE from dba_users ; EXPIRY_DA --------- 24-SEP-11 24-SEP-11 24-SEP-11 24-SEP-11 24-SEP-11 24-SEP-11 24-SEP-11 23-MAY-13 24-SEP-11 24-SEP-11 24-SEP-11
check
EXPIRY_DATE in dba_users is null4. how to check while he was reset his password, the last time.
SELECT SYS PTIME. THE USER$;
-
c# how to connect to vcserver webservice using the sessionid / cookie
" Is it possible to connect to the web service VcServer ' https://server.FQDN/SDK "using VimService2005.dll (VimObjects.cs)? "
There are methods called LoginbySSPI which takes the user/pw and Login and none works with the session id.
So far I managed to connect using cookies by using VimSoapService.25u2.dll - which is non-standard and get accessories object is too difficult to use.
Any help is very appreciated. -pls also provide examples of code (beginner, sorry)
Bernard
SessionID is a valid string that must be once authenticated by the server and when reuse must be living in the session pool.
Now to use sessionid, you need to use the API to login once to retrieve valid sessionid, you can then save it in a session file and later use the recorded session ID to fill your cookieString. For information about how to set this id in cookiestring, you should refer as a result of the LoadSession and SaveSession methods
public void LoadSession (String fileName, String urlString) {}
If (_service! = null) {}
Disconnect();
}
_Service = new VimService();
_Service. URL = urlString;
_Service. Timeout = 600000;
_Service. CookieContainer = new System.Net.CookieContainer ();
BF BinaryFormatter = new BinaryFormatter;
S Stream = File.Open (fileName, FileMode.Open);
C cookie = bf. Deserialize (s) cookie;
s.Close ();
_Service. CookieContainer.Add (c);
_Sic = service . RetrieveServiceContent (svcRef);
_State = ConnectionState.Connected;
If (AfterConnect! = null) {}
AfterConnect (this, ConnectionEventArgs()) of new;
}
}
public void SaveSession (String fileName, String urlString) {}
Cookie cookie is _service. CookieContainer.GetCookies)
New Uri (urlString)) [0];
BF BinaryFormatter = new BinaryFormatter;
S Stream = File.Open (fileName, FileMode.Create);
BF. Serialize (s, cookie);
s.Close ();
}
You should consult the latest SDK c# samples shipped long VI SDK for more details. Believe me, creating samples using vimService2005.dll is not at all confusing.
-
How to connect a TOSHIBA 28W23 to the other PC?
I posted this on a number of sites different forum but no one really knows the answer.
Thus, its whatIf I have an old TOSHIBA 28W23 - how it connectable to an other PC gx270s?
If someone has any advice id love it.
It depends on the ports/plugs available.
Don t know both devices but maybe your laptop supports a SCART.
In this case you must use a cable SCART.
Is the computer supports s-video port? If Yes, then you can use a cable SCART-s-video to connect the two devices. -
How to connect my laptop seconded to the display of lightning?
How to connect my laptop spare Windows PC to the display of lightning?
It doesn't seem likely... this thread explains a little bit problems > http://apple.stackexchange.com/questions/181277/connect-a-thunderbolt-display-to-windows-8-Bureau
-
I can't access my account... message says: "the user profile service could not connect..." User profile can not be downloaded... »
Help, please...
Hello
1st thing to try is the system in safe mode restore to before the problem
http://www.windowsvistauserguide.com/system_restore.htm
Windows Vista
Using the F8 method:
- Restart your computer.
- When the computer starts, you will see your computer hardware are listed. When you see this information begins to tap theF8 key repeatedly until you are presented with theBoot Options Advanced Windows Vista.
- Select the Safe Mode option with the arrow keys.
- Then press enter on your keyboard to start mode without failure of Vista.
- To start Windows, you'll be a typical logon screen. Connect to your computer and Vista goes into safe mode.
- Do whatever tasks you need and when you are done, reboot to return to normal mode.
If that does not solve it read more
read the tutorial below
When you log on a Windows Vista-based or a Windows 7 computer by using a temporary profile, you receive the following error message:
The user profile Service has not logon. User profile cannot be loaded.http://support.Microsoft.com/kb/947215#letmefixit
Your user profile was not loaded correctly! You have been logged on with a temporary profile.
http://support.Microsoft.com/kb/947242
If you tried to log on to Windows and received an error message telling you that your user profile is damaged, you can try to fix it. You will need to create a new profile and then copy the files from the existing to the new profile. You must have at least three user accounts on the computer to perform these operations, including the new account that you created.
http://Windows.Microsoft.com/en-us/Windows-Vista/fix-a-corrupted-user-profile
-
How to connect an additional monitor for the gateway all-in-one?
Hello you all, I have a question I hope you a lot more smarter computer people can help me with. I have a friend who has a gateway all in one model #-ZX4931. It has a VGA port on the back. It has been also updated for Windows 10. I'm house sitting and dog looking for her in a few weeks
I want to plug the additional monitor which by the way, it's a Dell (sorry) to work on a project I'am doing right now. I try to use the screen that she has on the All In One and I didn't like how my project came out looking
I see on the back of its All In One, it has a VGA port. I Google several times and different words from Google, which told me that you cannot plug an additional external monitor for all in one PC, so I'm confused as to why there is a VGA port, if you couldn't plug the external monitor
in any case, can someone please help me and give me details on how to connect an external monitor, in addition to its gateway all in one model #-ZX4931
Looking at your specific model, I think you can try to connect an external monitor via the VGA port.
Once you have connected the secondary monitor using the VGA port, press control + p and main Windows logo if you are able to extend or clone your desktop.
Maybe you are looking for
-
Hello guys! I use a 6 s iPhone for almost a year. Recently my cousin threw to the ground violently. I picked up and saw that the screen was cracked badly. There was a hole in the side at the bottom right, I could easily see the material of the speake
-
How can I keep MediaPlayer Visual replacement I want with their garbage?
I go on some websites and MediaPlayer inserts a sort of an advertisement on Ellen or some other stupid ad that I worry and become really boring how do I get out? There is also a popup on a facebook survey that keeps coming back. How can I get rid of
-
Portege R500 - WXP professional PL and AuthenTec software incompatibility
After several days of work without fingerprint AuthenTec software (which confirmed that withuit this software everything works fine), I decided tol the install once more. After installation I realized immediately there is an incompatibility between t
-
How on a HP Deskjet 6940 maintenance?
It seems that the options to clean and align the print heads have disappeared... I SWEAR they were there before!
-
I made the app in Flash professional. I used a .bat file to compile on the file bar. It works n someone else's computer but get erros on mine. Messages in the command line: Invalid file shows C:... (the path to the file) bar558007970575787244. MF Inv