SQL & PL/SQL :: Disconnect And Connect Sql Prompt In Loop Using Script File?
Nov 23, 2011
I want to disconnect and connect sql prompt in loop using script file.But whenever I try to do this it is giving error,check the below code.I save below code into some file and call that file using @"filename.sql", it won't work.
Basically I want to run one procedure in loop, and in each loop counter I want to disconnect the session and connect again. Becaue CONN and DISC not working while calling through @"..."
DECLARE
BEGIN
FOR N IN 1..5 LOOP
DISC
CONN SCOTT/TIGER@TEST;
EXEC MY_PROC;
END LOOP;
END;
now DB is hanging; i am not able to connect both SQL and RMAN prompt. Is it possibel to move some old archives using ASMCMD prompt to datafile mount point location? Once i got some free space, then i can try connect RMAN and fire my script manually to take the backup and delete the same. ....
ASMCMD [+QSTAGE_T1_BACKUP_01/QSTAGE/ARCHIVELOG] > ls -ltr cdType Redund Striped Time Sys Name Y 2011_07_15/ Y 2011_07_16/ Y 2011_07_17/ Y 2011_07_18/ Y 2011_07_19/ Y 2011_07_20/ i have free space at mount point : +QSTAGE_T1_DATA_01/QSTAGE/DATAFILE
i need to backup the archives first before deletion..as those are required for Streams.
backup script:
run { backup archivelog all delete completed before 'sysdate-1'; }
note: i would like to remove the file which are older than one day
I have a requirement in which i have list pdf files(from thousands of pdf files) having particular string from a command prompt.I have tried find command but that has some limitation. its working upto 3 digit string only.how can i acheive this.remember i have to do this through command prompt only.
Is there any setting on oracle that allows to disconnect users automatically and display a message to users such: "Try a new connection to the db in 30 minutes"?
I am running a pro*c its working fine but my connection gets disconnect to my db server so i want to continue my proc if connection between my machine & server reestablish again weather it starts from start or from where it was stooped because of connection break
Recently I came across a problem that 'ORACLE Client Side Disconnect every 5mins in app server' these days.
Situation: We have 3 APP servers, which was configured the same OS and ORACLE Client version and 1 DB server. 2 app servers ORACLE Client Side Disconnect every 5mins.but it's ok in another App server.
1. both Oracle SQL PLUS and PLSQL have this problem. 2. SQLNET.EXPIRE_TIME is the same for 3 APP 3. 2 APP server are virtual machine and balance server 3. APP servers : OS: 2003 Server ORACLE 9i DB server : ORACLE 11g 4. I don't think it's DB server problem because one App server hasn't this problem
Need to know how to connect to Oracle (11g) database from Log4net.config file. As I need to wright the logs to the Oracle (11g) database when any user logon to the web application.
Note: I am succesfully able to wright the logs to the text files but not able to wright the logs to the Oracle (11g) database.
CREATE OR REPLACE PROCEDURE IND_MONITOR(P_tab VARCHAR2) is type ind_table is table of varchar2(20); p_ind ind_table; v_sql varchar2(2000); begin select index_name bulk collect into P_Ind from user_indexes where table_name=upper(P_tab); for i in 1..p_ind.count loop v_sql :='alter index '||p_ind(i)|| ' monitoring usage' execute immediate v_sql using p_ind(i); end loop; end;
I have created a text prompt in layout editor by clicking a button 'TEXT'('A' symbol) from left hand side toolbar,text is created with name 'TEXT67' and graphics type 'TEXT'.
when i click that text(TEXT67),block showing <null>.
So i cant use the below code,bcoz no block for that text..
Whenever I deploy a PSU patch I receive the prompt below. I'm attempting to deploy PSU in an automated fashion. How do I suppress the prompt? "Enter 'yes' if you have unzipped this patch to an empty directory to proceed (yes/no):"
i want a procedure or any other way to change the prompt of a form with another nameand get the name from a table in database that table contain the old name ,, and the new name
i want to use this procedure to facilitate different language user to change the prompt of all item to the user language i have done one but it's not as good as i want i need it to work with a big sys with a lot of items and change all it;s prompt
all i have to do is to fill the table with the words only
I am writing a query where I'd like to pull one year's worth of data. Ideally I want to prompt for the END DATE and have the query go back in time one year from that date.
Here is what I've got after doing some research online... but It's not quite working for me.
select * from mrtcustomer.profile where reg_type = 'B' and contact_type = 0 and active_ind = 'Y' [code].....
Text field prompt displays ? while using bengali language but text field displays value in bengali language when retrieve data from database.
I am using oracle 11g database in windows platform and oracle 10g application server release 2 in linux(rhel 4) platform. For client machine I am using windows xp and jre version 6 update 14
To do this I add following line into user bash profile in application server:
export NLS_LANG=AMERICAN_AMERICA.UTF8
I also edit oracle_home/forms/java/oracle/forms/registry/Registry.dat file as below: ... .... #default.fontMap.defaultFontname=Dialog default.fontMap.defaultFontname=SolaimanLipi
I am able to start SQLPLUS from Start | Program files | Oracle - OraHome92 | Application development |
Unfortunately, when trying to start it from the "command prompt" window with the following command SQLPLUS, it generates the infamous error message like
"... unknown etc... "
Any variables i need to change on my client machine ?
C:Documents and SettingsAdministrator>sqlplus /@db10g SQL*Plus: Release 10.2.0.4.0 - Production on Wed Apr 13 22:53:06 2011 Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
ERROR: ORA-12534: TNS:operation not supported
Enter user-name:
so I Google around for the solution to the ORA-12534 error, one of the site,
[URL].......
here's my lsnrctl services
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521)) Services Summary... Service "MIKEXDB" has 1 instance(s). Instance "mike", status READY, has 1 handler(s) for this service... Handler(s): [code].....
The command completed successfully
right now I think I will be a fool to think that the solution is to resolve the ERROR: ORA-12514: TNS:listener does not currently know of service requested in connect descriptor. so what is wrong with my setup, or is it some patch that I need to apply?
I want to delete a backupset and get the flowing prompt,i want to delete it directly and no prompt,how can i do?
Do you really want to delete the above objects (enter YES or NO)? YES
RMAN> delete backupset tag 'TAG20120306T211654';
using channel ORA_DISK_1
List of Backup Pieces BP Key BS Key Pc# Cp# Status Device Type Piece Name ------- ------- --- --- ----------- ----------- ---------- 111 101 1 1 UNAVAILABLE DISK /u01/app/oracle/duplicate/al_t777244616_s111_p1
Do you really want to delete the above objects (enter YES or NO)? YES deleted backup piece backup piece handle=/u01/app/oracle/duplicate/al_t777244616_s111_p1 recid=111 stamp=777244617 Deleted 1 objects
We have siebel server on windows machine and db server on unix box. We have done some modification(added columns) in siebel tools level. Now we want to ddl synch through command line prompt. how ot do ddl sync?
I am able to connect to DATABASE from SQLAssistant only when I provide string like ABOVE........If I dont mention the SERVICE, m unable to connect to DB.Now the biggest issue is with SQL Developer.....m not at all able to connect to DB using SQL Developer.
Acer laptop, Intel Processor w/ Windows 7 Professional (64-bit) Delphi 2010 Professional Oracle XE (+ the Oracle XE client that comes with it)
I cannot can't to the Oracle database from Delphi. The error I keep getting is:
Alias is not currently opened. [Oracle][ODBC][Ora]ORA-12154:TNS: could not resolve the connet identifier specified.
Here's what I've done:
1. Create an ODBC connection to my Oracle database
- run C:WindowsSysWOW64odbcad32.exe to open the ODBC administrator. - Data source name: bt_user - TNS Server Name: localhost/xe - user bt_user - Clicked "test connection" -- Success.
2. Open Delphi and drop a TDatabase component on my main form.
- Set the Alias Name property to "bt_user" (the alias I set up in ODBC) - Set database name to "bt_user". - Checked "connected".
Alternatively, I tried using the Delphi ADO components (the dbGo components).
- Drop TADOConnection component on my form. - Select "connection string" and open the dialog. - Click "build string". - Select "Microsoft OLE DB Provider for ODBC Drivers" from the selection. - In "use data source", select "bt_user" from the drop-down list (my ODBC connection from #1) - Click "test connection".
Again the same error.
My questions are:
1. Can Delphi work with Oracle XE (Express Edition)?
2. If so, then do I need to install the "Instant Client"?
3. Will the instant client for Oracle 10g work with Oracle 10g XE?
4. Do I need to install any additional ODBC driver(s)?
5. Why was I successful in creating the ODBC connection in Windows, but it failed in Delphi?
6. Will Visual Studio.NET (C#) work with Oracle XE, and what are the steps for setting that up?