Pass Variables For UserID And Password To Sqlplus In Windows From Text File?

Jul 23, 2013

I would like to store user-id, password and the TNS-Entry in a small text file and pass them to a script to log in and execute another script on the database from Windows.

Example of the text file samp.txt that stores user info:

username=Jdoe
password=candybar
db_sid:orcl

main script main.bat is as follows:

--read the samp.txt do not know how to do it

sqlplus -s &username/&password@&db_sid @db_info.sql

db_info.sql contents:

column tm new_value file_time noprint
select to_char(sysdate, 'YYYYMMDD') tm from dual ;
spool C:\server\DB_Report_&file_time..log
select * from v$instance;
spool off;
exit

View 1 Replies


ADVERTISEMENT

Application Express :: Prefix Text Entered Into Text Area With Userid And Timestamp?

Sep 12, 2012

Have got basic form on a table and have a textarea which holds Notes added by user.

So Notes database field is updated on Save / Apply changes button being pressed.But would really like any text added / appended to the Notes field to be prefixed by userid and date / timestamp.

Is it possible via dynamic actions or Javascript to have any new text added / typed to be auto prefixed as per above.

Would only want the first key press in the filed to trigger the auto-prefix and if added text was deleted then the auto prefix to be deleted as well ?? If user doesn't press Save / Apply changes obviously want to leave existing Notes as is.

View 5 Replies View Related

Oracle Sqlplus Unique UserID / Username?

Oct 5, 2007

I each user in my table to have a unique username and user_id. So the table cant contain 2 users with the same user id and it cant contain 2 users with the same username.

oracle doesn't support more than one primary key in a table

so what could I use a secondary key?creating alternate keys in sql plus?

View 1 Replies View Related

Client Tools :: Display Clob Column In Text File In Sqlplus

Mar 30, 2012

I have extracted data from table and write into one text via sqlplus utility in shell scripts. i got correct output. i am having two issues on the output file

1) Outfile file size is huge high compare then table segment data.

2) last column having extra space.

The output column is clob datatype. so i have added set long 50000 and set longchunksize 50000 parameter. after adding these only i got above issues. without two options, i am not getting this isssue but lines are wrapped.

#Set the scripts Path
SCRIPTS_PATH="/usr/local/ccms/gpa/svr/scripts"
echo $SCRIPTS_PATH

[Code]....

View 2 Replies View Related

Forms :: Oracle 11g Windows 64bit / File Extraction Password

Nov 27, 2012

I downloaded Oracle Fusion Middleware11g Forms and Reports (ofm_frmrpts_win_11.1.2.0.0_64_disk1_1of1). When I begin to extract I am getting bogged down with a password message and that is:

File Windows-amd64 is password protected. please enter the password in the box below.

BTW- I downloaded Windows64 based forms and reports on my windows xp pro machine. I am trying to unzip them and burn it on a DVD so that I can install them on my new dell windows 7 professional laptop.

View 7 Replies View Related

SQL & PL/SQL :: Creating Global Variables In Sqlplus On 11g

May 4, 2011

I have taken some procedures code from SVN repository.These procedures are split into different schema. There are some client and common parameters used in the from clause of table in these sp.for example

select *
from client.emp;

during the compling procedure, we replace the client value into some schema name.

select *
from scott.emp;

The client and common parameter should be different for every schema.

Is any possible to create global varaible for client and common parameter and subsitute value in it.i.e without editing client and common parameter?

View 8 Replies View Related

How To Pass Values From Bash Shell Script To Sqlplus

May 3, 2012

I want to run parallel queries of 16 sqlplus jobs through shell script.i don't know to pass values dynamically from shell script to sqlplus.

here i am hard coded the values but i want to pass the values dynamically. and how i will know each job is running successfully.if any job is fail the it will exit from script.

my shell script is :

sqlplus -s username/password @script_file.sql 1001 1004 &
sqlplus -s username/password @script_file.sql 1006 1010 &
sqlplus -s username/password @script_file.sql 1011 1015 &
sqlplus -s username/password @script_file.sql 1016 1025 &

my sql file is:

CLEAR BUFFER
SET SQLBLANKLINES ON
SET ECHO OFF
SET FEEDBACK OFF
SET FLUSH OFF
SET HEADING OFF
[code]........

View 1 Replies View Related

Call Interface :: Sql Statement Works In SQLPLUS But Will Not Pass Checking In PRO*C

Apr 22, 2013

I am in the process of converting my skill in oracle and this time PRO*C from Windows to Linux. I have oracle 11g R2 installed on a UBUNTU (12.04) server and have installed the instant client as described in

[URL]

This has a query which will run in SQLPLUS but fails with PRO*C

:~/Projects/proc/proctest1$ proc INAME=proctest.pc SQLCHECK=NONE ONAME=proctest.c LNAME=proctest.lis LTYPE=long
Pro*C/C++: Release 11.2.0.3.0 - Production on Mon Apr 22 21:00:18 2013
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
System default option values taken from: /home/neill.rutherford/instantclient_11_2/precomp/admin/pcscfg.cfg
PCC-W-02109, SQLCHECK=NONE is no longer supported.. using SYNTAX

[code]....

View 0 Replies View Related

Loop - Two Variables (username / Password) Not Clearing Out?

Apr 15, 2008

The idea of the program below is to create a sql "module" (just a .sql file) that will loop and ask for a user id until the user enters the correct one. Here is the code I have thusfar:

set serveroutput on;
accept username prompt 'Enter user name here: ';
accept password prompt 'Enter password here: ';

declare
usernameCONFIRM VARCHAR(30);
passwordCONFIRM VARCHAR(30);
begin
select USERID into usernameCONFIRM from GAMEUSER where USERID = '&username';

[code]...

The main problem I'm seeing is that the two variables I ask for (username and password) aren't clearing out.

View 12 Replies View Related

Forms :: Export Text File With Same File As Imported Text File?

May 30, 2011

Is it possible to get the same name of file name from imported text file?

What i've is, I import the text file then I exported it.

can I get the same name of the imported text file?

View 2 Replies View Related

Unable To Change Password In SQLPLUS After Trigger Added

Aug 17, 2012

One of my Customer had followed the document applied pertaining to mitigate against vulnerability CVE-2012-3132.

New Document Mitigation steps for CVE-2012-3132 [ID 1482694.1]

This was applied to a database and it stopped the 'password' command from succeeding in SQLPLUS. Once the trigger was disabled, it worked fine.

ORA-00604: error occurred at recursive SQL level 1
ORA-06531: Reference to uninitialized collection
ORA-06512: at "SYS.NAME_SECURITY", line 165
ORA-06512: at line 2

Why is this behavior seen? By the way, he was able to change the password using TOAD. Only sqlplus is the issue.

View 2 Replies View Related

Client Tools :: Changing DB Password Using SQLPlus Command Line

Jul 21, 2010

I'm trying to change a password. I can connect to the db then at the SQL prompt I'm using:

alter user <name> identified by <new password>

The dos window comes back with '2' - then just sits there

View 4 Replies View Related

Security :: Create Password File / Don't Know Password Of Sys User

Jun 5, 2012

I want to know what if any person don't know the password of SYS, can he create password file, becauase i dont know the password of sys users, generally login with '/ as sysdba',

View 4 Replies View Related

ORA-01017 / Invalid Username / Password Logon Denied But SQLPLUS Works

Oct 15, 2012

"ORA-01017: invalid username/password; logon denied" when attempting to log on to db, in three different applications. Error is observed in Toad, Crystal Reports, and MS ODBC Administrator connect test. However, same db credentials work in SQLPLUS.

Customer is attempting to log into reporting database hosted by my company, and using Cisco VPN client.I am unable to reproduce this at this time, on my machine, using same credentials and VPN profile.

Here is what we know/tried:
 
1. PING HOSTNAME is successful on CUSTOMER’S machine

2. TNSPING HOSTNAME is successful on CUSTOMER’S machine

3. SQLPLUS is successful with USER2/(pw)@HOSTNAME.int on CUSTOMER’S machine

4. We corrected timeout error on CUSTOMER’S side, by adding TCP.CONNECT_TIMEOUT=1000 in SQLNET.ORA (Also observed extremely slow performance on CUSTOMER SIDE)

5. We corrected dns suffix problem on CUSTOMER’S side, observed in NSLOOKUP by adding: IP ADDRESS AND HOSTNAME to Windows HOSTS file and commenting out default suffix COMPANY.com from SQLNET.ORA file

6. VPN configuration and VPN credentials are good. 

We tested CUSTOMER’S VPN profle, CUSTOMER’S VPN credentials, and user USER2/(pw)@HOSTNAME on my machine (WIN7). I am able to maintain persistant connection to HOSTNAME for hours

7. TNSNames entries are good. Able to connect to db in Toad, and Crystal, on CUSTOMER’S machine using different Oracle user, USER3 (only has grant connect). Unable to logon to db, with Oracle user USER1, or USER2. (USER2 was created to try to resolve login problem w USER1, but issue still exists.)

8. CUSTOMER has Windows VISTA, does not have admin privileges, has Oracle 10 installed for client. Using same Cisco VPN client I have installed.

9. Database on our servers is 11g

View 11 Replies View Related

ORA-09314 - Program Cannot Recognize Variables In Text To Be Translated

May 29, 2013

on 11g (11.2.0.3)
RMAN backup fails :

run{                                   
backup as compressed backupset format '\server
manpsv9$ackupMYDB
manfullal_%%d_%%T_%%s_%%p' archivelog all delete input;
}

RMAN-03009: failure of backup command on ORA_DISK_1 channel at 05/29/2013 09:11:01
ORA-09314: sltln: error translating logical name
OSD-04503: we found
OSD-04503
Text contains no translatable elements
Cause: Program cannot recognize variables in text to be translated.
Action: Check and, if necessary, correct text to be translated. but what is wrong with my text ?

I used also :
backup as compressed backupset format 'S:ackupMYDB manfullal_%%d_%%T_%%s_%%p' archivelog all delete input;The same error.

View 1 Replies View Related

PL/SQL :: Passing Variables From Shell Script To Separate Sqlplus Script

Apr 5, 2013

I am having issues passing variables to a separate sqlplus script invoked by the shell script, e.g.

#!/bin/sh
DB_NAME=TEST
PWD1=PA55W0rd

echo exit | sqlplus / as sysdba @${DB_NAME}.sql ${DB_NAME} $PWD1 >> ${DB_NAME}.sql

exit 0

The script picks up the $DB_NAME variable fine, and therefore invokes the required sql script. However, when I pass the variable $PWD1 to the sql script I get an error. The script creates a database link:

create or replace procedure new.link
is
begin
execute immediate 'create database link TEST
connect to TESTSCH identified by '$PWD1'
using ''TEST''';
end;
/
exec new.link;
/

output is:

ERROR at line 1: ORA-00911: invalid character ORA-06512: at "NEW.LINK", line 4 ORA-06512: at line 1

View 13 Replies View Related

Forms :: Text Box To Accommodate Large External File Text

Dec 30, 2010

I have a requirement in one of my forms screen.I have a text box(large text area) which should display a help text file when i move my cursor on the topics displayed on the screen.know the code and the properties to be changed in the text box to accommodate large external file text.

View 1 Replies View Related

Sqlplus And MS Windows Command Line

Feb 18, 2013

I have some Oracle Databases and sometimes for me is easier to access to the databases with SQLPLUS instead SQLDEVELOPER or TOAD.

But i can't reach to a good configuration of command line prompt to do queries against the database, normaly if it returns a lot o rows and columns it is unreadable.

View 5 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

Server Administration :: How To See Schema User Password In Text

Oct 1, 2012

I need to see all schema users password in a text.I am database admin,but it difficult to remember the password of all users created in single database So we also dont want to change password of all time,table to view password in text. Also we all know we can see using dba_users, but it was showing in hash value i need it in a text

View 3 Replies View Related

How To Not Expose Password (clear Text) In Expdp Parfile

Jul 3, 2013

I like to create an expdp parfile that would not expose my password in clear text. 

PARFILE:userid=MyAccountName/$MYPASSWORD  <-----this substitution does not work in a parfiledumpfile=xxxxxlogfile=xxxxtables=xxxx

View 3 Replies View Related

Windows :: How To Pass Date Time From PL To BAL / DAL To Database

Apr 24, 2013

1) how to pass date from .net using odp.net to oracle database for storage. so that it should not be affected if any one changes os(windows xp or 2003 /2008 server) date formate.

database and application both are on different server and can be on same server also. so if any one keeps different date formate on both OS then it should not get affected.

View 1 Replies View Related

Client Tools :: SQLPLUS Windows In Oracle 11g

Feb 27, 2011

the reason for not availability of ISQLPLUS & SQLPLUSW window from oracle 11g.

View 3 Replies View Related

Windows :: How To Pass Null Values In OracleCommand As Parameters

Jul 19, 2012

How to pass null values in OracleCommand as a parameters

i am doing like this

((OracleCommand)cmdMySql).Parameters.Add(":1" ,Varchar2).Value = DBNull.Value;

Its giving error when dataadapter is going to fill.

View 3 Replies View Related

Client Tools :: Windows 7 / Oracle 10g - Not Getting Editor From Sqlplus

Jan 29, 2012

I am using Windows 7 and oracle 10g; From sqlplus* I can not use editor (using ed). but when I see the variable from DEFINE.. It shows that default editor is notepad..

I can use editor in winxp.How to get (use) editor ?

View 1 Replies View Related

PL/SQL :: How To Print SQL File Name In Same File Using Sqlplus

Jun 26, 2012

Oracle 10g on Linux platform.

I am trying to print the name of .sql script file in that file but could not. Following is the file:

test.sql
select '&0' from dual;But instead of printing, it is asking for input:
SQL> @test.sql
Enter value for 0:

how can i print the file name.

View 6 Replies View Related

Windows :: How To Get Password Post Installation Of Oracle

Jul 1, 2011

I have installed Oracle 10g on Windows 7 64 bit today by own from the following link with data.

[URL]

1. At the start of my installation

Global Database Name : oracl
Password : my own password

2. At last i got the message "The installation of Oracle Database 10g was successful."

I have tried logon with

User Name as scott with tiger with Host String as oracl
User Name as scott with tiger
User Name as system with manager with Host String as oracl
User Name as system with manager

But i am unable to login to SQL.

Note: In between installation, i have not set any password.

View 7 Replies View Related

SQL & PL/SQL :: Pass The File Into CLOB?

Nov 9, 2012

Is it possible to pass the file into CLOB column in real-time without DIRECTORY in oracle sp. I have not come across but would like to know is there anyway to pass the file directly from .net to oracle.

View 2 Replies View Related

Backup & Recovery :: ORACLE Dump File To Text File

Apr 9, 2011

Oracle10g to Sybase12.5 Migration:- How a Oracle dump file can be converted to any text file/xls file which will be loaded in sybase database later through BCP.

means
1.Exporting objects as dump file from Oracle.
2.Is there any tool/process available that can convert this into csv/txt/xls file.
3.This files can be loaded in sybase.

View 2 Replies View Related

Sqlplus Query Output Into File?

Feb 4, 2004

How can I put an Oracle sqlplus query output into file?

SQL> select myfield from userDB where IMSI like '22803%' and rownum < 11;

I would like to put the output in a file, say '/tmp/mydata.dat'

View 6 Replies View Related







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