Count Field Not Resetting When Connecting Through VB
Jul 13, 2010
I am working with an asp.net/vb.net application whose users have oracle accounts to connect to the application.The database is set up to allow three failed login attempts. When connecting directly to the database, the sys.user$ lcount field increments on unsuccessful login attempts, and resets to 0 on successful login attepts. This is what I expect should happen.
However, when logging in through the application, using:
objConnection = New OracleConnection(m_strConnectionString)
objConnection.Open()
the lcount field sporatically increments on unsuccessful login attempts (sometimes it does, sometimes it doesn't), and never resets to 0 on successful login attempts. I would have expected it to behave as it does when connecting directly to the database.
Why does the lcount field not reset on a successful login through the application? How can I make it increment on each unsuccessful login attempt and reset on each successful login attempt?
I have a form that contains some data and I would like to count them in a new "Item text" ... I don't want to use the Item Text's property where we set the data type to number, database to No, Query all record to Yes and etc... I want to use the SQL statement code to count the records (using trigger)... I named the Item Text as Count_Records .
I want to create a SELECT, that shall give back only a special amount of rows, depending on the sum of one of the selected fields.
At first a code sample of the complete selection:
SELECT DISTINCT mnr, ktxt, (SELECT Sum(meng_4)FROM reldb d1 WHERE d1.mnr=d.mnr)qty FROM reldb d WHERE mnr IN (SELECT mnr FROM relac WHERE Lower(rlnr) NOT LIKE 'platte geprägt%') AND saext='M' ORDER BY qty DESC,ktxt;
This selection produces some lines of output (in my case i.e. like 300). What I want to see is only that much lines that the condition 'sum of all items listed below meng_4<=sum of all items meng_4 of the whole selection * 0.9' is fulfilled.
So, if the whole selection produces a total of 10000 as sum for all items meng_4, I want to see only that amount of rows that sums a total of at least 9000 for all items meng_4. I hope, this specification is exactly enough to understand my intent.
I have a table that cannot be changed with a field called transaction_reference in the transactions table. This field contains any number of some values in a look-up table called codes.
The table codes contains 'AA', 'BB', 'CC'.
A typical transaction_reference field may look like 'CC BB' or 'AA' or 'AA CC' or 'AA CC BB' - any number, any order.My goal is to get a count of records grouped by another field from the transactions table.
Transactions table example: transaction_id | transaction_reference | family --------------------------------------------- 1 | AA BB | foo 2 | BB CC | bar 3 | BB | hello 4 | AA CC BB | foo 5 | BB AA | bar
So the results should look like:
family | code | count foo | AA | 2 foo | BB | 2 foo | CC | 1 bar | AA | 1 bar | BB | 2 bar | CC | 1 hello | AA | 0 hello | BB | 1 hello | CC | 0
If the counts of 0 (like the third to last and last line above) don't show up I'm ok with that.I put together an explode function like this one here but I'm really not sure where to go from here. I can split the transaction_reference, but I'm not sure what to compare it to or how.
I realize that a field in the transactions table for AA, BB, and CC would be ideal, but I can't do that... the powers that be won't let me change the table.
for each exploded segment from transaction_reference look for it in the codes table if it exists, add 1 to the count
Find the date difference. I need to find that how many days the task is pending, if ACT_NAME field switching from 'SET PENDING%' to 'RESUME PENDING%' by using ACTIONTAKENDATETEXT field in the History table.
Example as needed: NoPendingDays = 23 (8+15)
I have attached Create table and Insert table values sample as SQL file.
I'm wondering how I can use a counter to number records in a table I'm inserting into. I need the counter to reset based on changing data in my table. For example, I have the following
seq_number name_type 1 Short Name 1 Short Name 1 Short Name 2 Short Name 2 Short Name
I'd like my results to be the following: seq_number name_type 1 Short Name - 1 1 Short Name - 2 1 Short Name - 3 2 Short Name - 1 2 Short Name - 2
I'd like my counter to increment so that I can add a sequence number to the end of my name type, but when my seq_number field changes I'd like to reset and restart my counter.
We have procedure that writes text to an Excel file.
The 10g database is setup for US7ASCII character set. This causes the characters on the Excel spreadsheet to appear strangely. As an example an 'a' would appear with a character similar to '~' on top of the 'a'.
If there anyway of resetting the character set at runtime of the procedure.
My supervisor wants to remove all the archivelogs since it was just a test for 1 year the DB is not actually YET been used. Problem is they want it to be used as soon as possible w/o recreating again the database and just removing some data on tables and removed archive logs. how to safely removed the existing archived logs and create a full backup with archived fresh to sequence 1.
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - 64bit PL/SQL Release 11.1.0.6.0 - CORE 11.1.0.6.0 TNS for Linux: Version 11.1.0.6.0 - NLSRTL Version 11.1.0.6.0
When I checked the status of $emctl status dbconsole. I got this error OC4J Configuration issue.
I was told by the forums to drop and recreate the repos. But I noticed the moment you drop the repos you will loose the passwords of SYSMAN and DBSNMP. emca -deconfig dbcontrol db -repos dropemca -config dbcontrol db -repos createI tried default passwords does not worked. it looks like the only option I have is to reset the passwords. but my main concerns is this impact the DB in generally or its common. or is there any other way we can get the OEM back(I already dropped the repos).
I just found out that the LISTENER I've creating with a password was with "-inherit" settings. Twice I succeeded in doing this, but it seems that it's not working when I tested it. Thus, I opted to get rid of it's listener.bak file and set the password again. Now I just can't stop it because of this error message: "TNS-01169: The listener has not recognized the password".
I've tried every passwords I made, and tried resetting it, but I'm not successful either, it's the same error message.My last option would be to restart the db Server (since the original listener.ora is already intact),
Is there any way could alter the sequence depending on specific condition to start with 1 in the form builder?
i wanna to reset the sequence to 1 whenever the month change.is there any way?
Could i make detail block invisible and whenever button pressed i will display the block? I want to put the where clause for that block in the button and if the button did not pressed i want to display nothing in the detail block?
I have a table where i need to update one field values based on another field of the same table , simply as it is.I have done this using one select all check box , on clicking that all check boxes of item_trans table will get selected , then i will un select some of check box and then using one button, i will update the value of the fields which are checked only.
I have put the sample code but when i am updating its taking long time and hanging.I am also attaching the form based on the test case provided.
insert into item_trans(TRANS_ITEM,TRANS_QTY,TRANS_ACT_QTY) VALUES ('TREE1',40,NULL); insert into item_trans(TRANS_ITEM,TRANS_QTY,TRANS_ACT_QTY) VALUES ('TREE2',20,NULL); insert into item_trans(TRANS_ITEM,TRANS_QTY,TRANS_ACT_QTY) VALUES ('TREE3',20,NULL);
--i want to set the value of trans_Act_qty as trans_qty
--i create one dummy or test block to keep the select all check box. for that table test script is
CREATE TABLE TEST ( C VARCHAR2(2000 BYTE), B NUMBER, A NUMBER );
insert into test (C,B,A) values ('A',1,1);
--code written in select all check box which is created on test.block.
BEGIN GO_BLOCK('item_trans'); FIRST_RECORD; LOOP :M_END_YN := :M_END_ALL; [code].......
--code written in M_END_YN ( actual check boxes where i will uncheck).
IF :M_END_YN = 'N' THEN :M_END_ALL := 'N'; END IF;
--code written on button to update those values which are checked.
BEGIN GO_BLOCK('item_trans'); FIRST_RECORD; LOOP IF :M_END_YN = 'Y' THEN [code]......
What i wnat is to update the Customer_inactive_date with the Incative_date field from Customer_type based on their Customer_type... So james and Jill would have their rows updated in this scneario ..How can i achive this in pl/Sql
I have teh code using merge function..I want something in traditional old fashion..
difference between count(1) and count(*). As i know count(*) will give number of rows irrespective of null and count(1) will not count the null.My Oracle version is 10 g.
SQL> select * from t1;
A B C ---------- -------------------- -------------------- 1 2 3 2 5
SQL> select rownum,a.* from t1 a;
ROWNUM A B C ---------- ---------- -------------------- -------------------- 1 1 2 3 2 2 3 5 4 [code]....
I got ORA-12528 while i was connecting sys as sysdba from remote machine to theinstance which is started in nomount mode. Although tnsping for that instance is working.
I'm trying to make a connection to sql server from an ORACLE 8.0.4 (I know, it's ancient) but can't seem to get it to work. I've read a lot of articles on the internet regarding the Heterogeneous Services but just can't get it to work on my system. Therefor I tried an example on connecting to an Excel workbook I found on another forum [URL] but that gives me the same problem as with connecting to sql server.
Here is what I've got: initFRUIT.ora CODEHS_FDS_CONNECT_INFO = SPONGE HS_FDS_TRACE_LEVEL = OFF LISTENER.ORA CODESTARTUP_WAIT_TIME_LISTENER = 0
[code]....
One thing I noticed is that I do not have an hsodbc.exe file in my \bin, should it be there? (I also tried Tgmsql80 in stead of hsodbc as program in Listener, resulting in an extended time of testing the connectivity but with the same result)
Is there any way I can test parts of the connection to limit the location of the problem? (e.g. does the listener get to the TNS)
Microsoft Windows [Version 5.2.3790] � Copyright 1985-2003 Microsoft Corp. C:\>set ORACLE_SID=PRODDB C:\>set ORACLE_HOME=C:\oracle\product\10.2.0 C:\>rman target / Message file RMAN<lang>.msb not found Verify that ORACLE_HOME is set properly C:\>sqlplus / as sysdba Error 6 initializing SQL*Plus Message file sp1<lang>.msb not found SP2-0750: You may need to set ORACLE_HOME to your Oracle software directory
I am making a form in which i could intigrate with scanner to capture image and stored it database. I also want to use OCR too. I am making document management System. I want to know how can i directly get connected with with scanner image to save it at runtime.
I am building the Oracle on RHEL 5(on Virtual machine with fixed disk space). I could install, after configuring and tried to connect to the database using "sqlplus system" on the command prompt(logged in as root), I get the following error message:
ORA-01034: ORACLE not available ORA-27101: shared memory realm does not exist Linux Error: 2: No such file or directory
My Oracle user which i created 5-6 months ago is not getting today when i tried to connect.But sys is getting connected.Also i queried dba_users in which my user was present. Also i did Alter user to change its password successfully., but it is not connecting.
When I attempt to connect to the DB as SYS, SYSTEM using sqldeveloper I get:
ORA-01017:invalid username/password; logon denied
Now I am certain the username and password are correct, I think it has something to do with remote login of SYS account. Are DBA accounts not allowed to connect via network? I get the same error when I try to sqlpython wrapper which I believe uses TCP
[oracle@oracle ~]$ sqlpython sys as sysdba which: no gedit in (/u01/app/oracle/product/11.2.0/db_1/bin:/usr/sbin:/sbin:/bin:/usr/sbin:/usr/bin) which: no kate in (/u01/app/oracle/product/11.2.0/db_1/bin:/usr/sbin:/sbin:/bin:/usr/sbin:/usr/bin) Password: Connection failure. Opens the DB connection. Some sample valid connection strings: [code]....
The users are getting an error when connecting to the DB. I'm also not able to connect thru sqlplus . I get the message
$ sqlplus "/as sysdba"
SQL*Plus: Release 10.2.0.5.0 - Production on Wed Dec 26 14:39:55 2012 Copyright (c) 1982, 2010, Oracle. All Rights Reserved.
ERROR: ORA-01075: you are currently logged on
ORA-04031: unable to allocate ORA-04031: unable to allocate 4064 bytes o bytes of shared memory ("","","","") ORA-04031: unable to allocate ORA-04031: unable to allocate 4064 bytes of shared memory ("shared pool","select a.obj# OBJOID, a.clas...","sga heap(1,0)","kglsim hea