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;

View 4 Replies


ADVERTISEMENT

Server Administration :: Unable To Connect Both SQL And RMAN Prompt?

Jul 21, 2011

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

View 8 Replies View Related

PL/SQL :: Overcome Prompt User ID And Password To Connect Oracle DB From Unix Environment?

Mar 23, 2013

How to overcome the prompt user id & password to connect oracle DB from Unix environment.

View 2 Replies View Related

Windows :: How Search Specific String In PDF File From Command Prompt

Nov 21, 2012

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.

View 1 Replies View Related

SQL & PL/SQL :: Disconnect User Who Are Blocking Sessions

Apr 11, 2011

I have an assignment, i am suppose to disconnect all the users that are blocking sessions for over three hours. Below is my code which is not working

Create or replace procedure b_user IS
Declare
ssid number;
serial number;
Begin
[code]......

View 7 Replies View Related

Security :: Disconnect From Oracle Database

Jul 21, 2010

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"?

View 7 Replies View Related

Precompilers, OCI & OCCI :: Reconnect Proc If Disconnect?

Nov 11, 2011

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

View 9 Replies View Related

Networking And Gateways :: ORACLE Disconnect Every 5 Mins

Jul 11, 2012

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

View 5 Replies View Related

Restore Control File To Connect With Oracle

May 13, 2011

I deleted the control file using $rm control01.ctl. But i perform the back up

rman> backup incremental level 0 database;

i have no any backup

so how can i recover the my lost control file to connect with oracle instance.

View 1 Replies View Related

Connect To Oracle DB And Write SQL Results Into Excel File

Sep 27, 2013

I would like to connect to oracle database and would like to execute series of SQLs and write those SQL results into Excel file (sheet1).

my requirement is simple :
------------------------
db_user_id scott
db_user_pwd tiger
db_sid orcl

select count(*) from emp;
select count(*) from dept;

print the same SQLs in A column and result should be in B column in excel file.

column A column B
select count(*) from emp; 14
select count(*) from dept; 4

thats it.

View 1 Replies View Related

SQL & PL/SQL :: Connect To Oracle Database From Log4net.config File?

Apr 26, 2012

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.

View 6 Replies View Related

PL/SQL :: Possible To Use Forall Instead Of For Loop - End Loop

Nov 19, 2012

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;

can i use forall instead of 'for loop ..end loop'

View 10 Replies View Related

Prompt User For Value

Apr 29, 2010

What is the function to prompt a user for a value when running a script and where would it be used?

I was also wondering if it is possible to populate a list from a table that would be displayed in a drop down box for the user to choose from?

View 1 Replies View Related

PL/SQL :: How To Call Procedure From Sql Prompt

Jun 12, 2012

I have a procedure with signature as proc_temp(deptno in number, empdetails out sys_refcursor);

how can i call this procedure from sql prompt.

View 2 Replies View Related

Connecting To Oracle 10g Via Command Prompt?

Jul 5, 2010

I decided to uninstall oracle 10g, and APEX 4.0.

I then reinstalled oracle 10g express and downloaded APEX 3.2..

However, wen its time to upgrade to APEX3.2 via the command prompt... the previous version of APEX 4.0 (11.1.0.6.0) is being read.

how to reset this to the original value 10.2.0.10 (10g express edition) ?

View 1 Replies View Related

Forms :: How To Hide Text Prompt

Jul 27, 2011

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..

SET_ITEM_PROPERTY('<BLOCK_NAME>.<TEXT_NAME>',PROMPT_TEXT,' ');

then i tried below,i.e i skip block name i gave only text name..

SET_ITEM_PROPERTY('TEXT67',PROMPT_TEXT,' ');

not working...

View 2 Replies View Related

Windows :: How To Run Dos Command From Sqlplus Prompt

Feb 19, 2008

how to run dos command from sql prompt.

i.e.
SQL>!DIR

Same can be done in unix using ! character.

SQL>!ls -lrt

View 6 Replies View Related

Suppress Prompt When Deploying PSU In Auto

Aug 2, 2012

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):"

View 0 Replies View Related

Forms :: Change Prompt Of Form With Another Name?

Jul 5, 2010

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

View 2 Replies View Related

SQL & PL/SQL :: Prompt To Pull Year Worth Of Data

Dec 30, 2011

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].....

View 4 Replies View Related

Forms :: Text Field Prompt Displays?

Jun 2, 2010

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

View 1 Replies View Related

Access TNS_ADMIN Value In Oracle Through Command Prompt

Jul 6, 2012

I am trying to get the TNS_ADMIN value but I m an not getting Expected Results . My tnsNames.Ora are located at the following locations : -

1) C:oracleproduct10.2.0client_1NETWORKADMIN
2) C:oraclexeapporacleproduct11.2.0server

NetworkADMIN

As you can see from the belowcode, TNS_ADMIN is not displaying the correct location.

C:>set TNS_ADMIN=%ORACLE_HOME%
etworkadmin

C:>echo %TNS_ADMIN%
%ORACLE_HOME%
etworkadmin

C:>echo %ORACLE_SID%
%ORACLE_SID%

C:>

View 4 Replies View Related

Client Tools :: SQLPlus Not Starting From Command Prompt

Jan 21, 2011

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 ?

View 11 Replies View Related

Security :: Creating Wallet - System Does Not Prompt For Password

Apr 14, 2011

I'm trying to hide the password for the batch programs that connect to the DB Server

as Cadot pointed out in

[URL].........

Quote:
use secure external password store

with reference to

[URL].........

when I create wallet, the system does not prompt me for password

C:>mkstore -wrl "C:ora102NETWORKADMIN" -create

when creating login credentials, again the system never prompts me for password

C:>mkstore -wrl "C:ora102NETWORKADMIN" -createCredential db10g scott tiger

here's my sqlnet.ora configurations

WALLET_LOCATION =
(SOURCE =
(METHOD = FILE)
(METHOD_DATA =
(DIRECTORY =C:ora102NETWORKADMIN)
)
)
SQLNET.WALLET_OVERRIDE = TRUE
SSL_CLIENT_AUTHENTICATION = FALSESSL_VERSION = 0

here's my tnsname.ora settings

DB10G =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = mike)
)
)

here's the outcome

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?

View 9 Replies View Related

Backup & Recovery :: Delete Backupset Directly With No Prompt?

Jun 5, 2012

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

View 4 Replies View Related

Reports & Discoverer :: RTF Report Execution Through Command Prompt?

Dec 7, 2012

is it possible to call the .rtf report through command prompt (ms dos), narrate the procedure.

View 1 Replies View Related

How To Do DDL Sync On Windows Machine Through Command Line Prompt

Mar 26, 2013

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?

View 4 Replies View Related

Client Tools :: Able To Connect From SQL-Assistant BUT Unable To Connect From SQL Developer

Jul 7, 2012

I have been troubling with this issue for the last two weeks...tried so much, but could not able to resolve....

sqlplus username/password@IPAddress:port/ServiceName

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.

View 3 Replies View Related

Client Tools :: Connect Oracle Developer 6i Without Connect String

Aug 17, 2010

I have installed oracle developer 6i. in sqlplus i want to put my username and password but nothing in the connect string field.

View 1 Replies View Related

Connect Oracle Database From Delphi - Could Not Resolve Connect Identifier Specified

Oct 6, 2010

I have the following computer/setup:

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?

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved