f



username and password on Oracle connection string (jdbc:oracle:thin:@host:Port:dataBase)

Hi, 

Can an Oracle JDBC connection string take a username and password?  
The plain version of an Oracle connection string is username and
password on Oracle connection string
jdbc:oracle:thin:@host:Port:dataBase

If it's possible to add username/password to that string, what is the
prorper  syntax?

Thanks for your help.

Wolfgang.


0
Mott
10/7/2003 9:34:57 PM
comp.lang.java.databases 3049 articles. 0 followers. samyaksulabh (16) is leader. Post Follow

4 Replies
1603 Views

Similar Articles

[PageSpeed] 29

"Wolfgang" <Mott@nospam.UNM.edu> wrote in message
news:3f8330a6.24586984@nntp.ucsb.edu...
> Hi,
>
> Can an Oracle JDBC connection string take a username and password?
> The plain version of an Oracle connection string is username and
> password on Oracle connection string
> jdbc:oracle:thin:@host:Port:dataBase
>
> If it's possible to add username/password to that string, what is the
> prorper  syntax?

Try to use:
jdbc:oracle:thin:username/password@host:Port:dataBase

>
> Thanks for your help.
>
> Wolfgang.


-- 
WBR,
Andrey Vakhnin


0
Andrey
10/8/2003 9:32:39 AM
Try:

DriverManager.getConnection ("jdbc:oracle:thin:@" + dbmsHost + ":" +
dbmsPortNumber +  ":" + dbmsName, userName, passWord);

Frank.

"Wolfgang" <Mott@nospam.UNM.edu> wrote in message
news:3f8330a6.24586984@nntp.ucsb.edu...
> Hi,
>
> Can an Oracle JDBC connection string take a username and password?
> The plain version of an Oracle connection string is username and
> password on Oracle connection string
> jdbc:oracle:thin:@host:Port:dataBase
>
> If it's possible to add username/password to that string, what is the
> prorper  syntax?
>
> Thanks for your help.
>
> Wolfgang.
>
>


0
Frank
10/8/2003 10:14:15 AM
Wolfgang wrote:
> Hi, 
> 
> Can an Oracle JDBC connection string take a username and password?  
> The plain version of an Oracle connection string is username and
> password on Oracle connection string
> jdbc:oracle:thin:@host:Port:dataBase
> 
> If it's possible to add username/password to that string, what is the
> prorper  syntax?

Get the connection as follows:

String url = "jdbc:oracle:thin:@host:port:sid";
Properties props = new Properties();
props.setProperty("user", <user>);
props.setProperty("password", <password>);

Connection con = DriverManager.getConnection(url, props);

HTH A.G.


0
ISO
10/8/2003 12:36:22 PM
Wolfgang wrote:
> 
> Hi,
> 
> Can an Oracle JDBC connection string take a username and password?
> The plain version of an Oracle connection string is username and
> password on Oracle connection string
> jdbc:oracle:thin:@host:Port:dataBase
> 
> If it's possible to add username/password to that string, what is the
> prorper  syntax?
> 
> Thanks for your help.
> 
> Wolfgang.

Wolfgang,
Wow! A multi-post! I assume you haven't read the following piece:

http://www.cs.tut.fi/~jkorpela/usenet/xpost.html

As you can see, posting separately to both

comp.databases.oracle.tools

and

comp.lang.java.databases

doesn't really increase your chances of getting a better answer.

Avi.
0
Angus
10/9/2003 12:52:41 AM
Reply:

Similar Artilces:

Oracle JDBC connect problems-ojdbc6.jar using Native Java commands OK from Matlab,but database toolbox not working -pls help with database toolbox configuration
Hi, I am having some trouble using oracle and jdbc drivers. When I use the native java commands it works from Matlab and I can connect to a database, here is how I do this: javaaddpath('T:\tmp\ojdbc6.jar') aa = oracle.jdbc.pool.OracleDataSource() aa.setDriverType('thin') aa.setNetworkProtocol('tcp') aa.setDatabaseName('TESTDB') aa.setServerName('192.0.0.1') aa.setPortNumber(1521) aa.setUser('testuser') aa.setPassword('testpassword') aa.setServiceName('TESTING') conn = aa.getConnection() stmt = conn.createState...

How to connect Java application with Oracle Database using JDBC?
Hi friends , Myself dilip while learning java, JDBC:ODBC bridge to connect java application with Ms-Access we easily do using DriverManager,Connection,Statement,PreparedStatement,ResultSet, ResultSetMetaData. But when i try to connect java program to Oracle it's gives a number of errors.please ,If anyone has appropriate solution to this provide me. Thanks . Dilip Kumar http://www.intelcs.com/IT-Companies/ public OracleConnection connect() throws Exception {String connectString ="jdbc:oracle:thin:@some.server.name:someportnumber:somedatabasename";OracleDriver driver = new Oracle...

SN#12788 Java[TM] DataBase Connectivity API Features in Oracle 10g Database
SYSTEM NEWS FOR SUN USERS Vol 74 Issue 2 2004-04-12 Article 12788 from section "Developer's Section" Tutorial on Concepts and Usage The Oracle Technology Network provides a tutorial that outlines the features of Java[TM] DataBase Connectivity (JDBC[TM]) technology in relation to the new enhancements that they bring to the Oracle 10g database. The tutorial evaluates Web RowSets, Connection Cache, and Named Parameters, IEEE datatypes -- BINARY_DOUBLE and BINARY_FLOAT, and PL/SQL Index-by Tables. Each secti...

Dump Database / Porting Database to Oracle
Hi, I do not know much about informix. I have no running instance here, but its my job to transfer data from informix to oracle. - Is there a tool to dump a whoole database into an ASCII file? - In mysql there is a tool called "mysqldump" which dumps the whole database and create a file with sql statements (create, insert , insert ...), so you can transfer the whole database with mysqldump >file.sql and mysql <file.sql. Is there such a tool in informix? (I have seen that there is a infdump direcorty) - Is there a good way or a (cheap) tool to transfer a database from infomix to oracle? Best Regards Sven Anders, Digitec GmbH Sven Anders wrote: > Hi, > I do not know much about informix. I have no running instance here, > but its my job to transfer data from informix to oracle. > > - Is there a tool to dump a whoole database into an ASCII file? > > - In mysql there is a tool called "mysqldump" which dumps the whole > database and create a file with sql statements (create, insert , > insert ...), so > you can transfer the whole database with mysqldump >file.sql and mysql > <file.sql. Is there such a tool in informix? (I have seen that there > is a > infdump direcorty) dbexport > - Is there a good way or a (cheap) tool to transfer a database from > infomix to oracle? dbexport? -- Ciao, The Obnoxious One "Ogni uomo mi guarda come se fossi ...

Database Toolbox
I need to connect a MATLAB application I am writing to an Oracle database (both 10 and 11) to acquire data from the tables stored there. While I am experienced in MATLAB, I have no prior experience with working with databases, however, I have read a few of the other posts on the MATLAB newsgroup regarding subject. I would like confirm how to connect to an Oracle database. I know that the connection command for the database toolbox is: conn = database('<Database Instance>','<username>,'<password>','oracle.jdbc.driver.OracleDriver','jdbc:or...

DataBase DataBase DataBase DataBase
DataBase DataBase DataBase DataBase Porfessional Programmable Database Ver. 2.0 2.1 Million Record Capacity. Search Rate: 2000/Records/Second. DataBase Type: Random Access. Can Create Unlimited Databases. Programmable fields for any Application. Build Time One Second, (Auto Creates DB). Setup Time: Instantly, Just Enter DB Name. Ultra Easy to Learn (Typically 30 Seconds) Ultra Cheap Price, Special $20, Paypal Accepted. Application Mailed Instantly (file Attached Email). Easy Paypal Online Ordering. See Site Below. http://www.vehiclerepair.org/dbPro/dbpro.html Scott: #DataBase...

Re: Dump Database / Porting Database to Oracle
Hi Sven. Try the following command. dbexport <your database>. Then creating current directry <your database.dbs> ..unl is ASCII file ..sql is create table script. Regards. -- Tsutomu Ogiwara from Tokyo Japan. ICQ#:168106592 >From: s.anders@digitec.de (Sven Anders) >Reply-To: s.anders@digitec.de (Sven Anders) >To: informix-list@iiug.org >Subject: Dump Database / Porting Database to Oracle >Date: 15 Oct 2003 23:35:11 -0700 > >Hi, >I do not know much about informix. I have no running instance here, >but its my job to transfer data from informix to oracle. > >- Is there a tool to dump a whoole database into an ASCII file? > >- In mysql there is a tool called "mysqldump" which dumps the whole >database and create a file with sql statements (create, insert , >insert ...), so >you can transfer the whole database with mysqldump >file.sql and mysql ><file.sql. Is there such a tool in informix? (I have seen that there >is a >infdump direcorty) > >- Is there a good way or a (cheap) tool to transfer a database from >infomix to oracle? > >Best Regards > >Sven Anders, Digitec GmbH _________________________________________________________________ Tired of spam? Get advanced junk mail protection with MSN 8. http://join.msn.com/?page=features/junkmail sending to informix-list ...

Establishing connection from Oracle Database to DB2 database
Hi, Can any one help me in connecting oracle database to DB2 database oracle is on unix and DB2 is on AS400. Please guide me step by step on the same. Waiting for reply. Its critical umeshchoudhary@gmail.com (U C) wrote in news:d06590c8.0504252348.71a5c6f8@posting.google.com: > Hi, > Can any one help me in connecting oracle database to DB2 database > oracle is on unix and DB2 is on AS400. Please guide me step by step on > the same. > > Waiting for reply. Its critical > use PERL between the two DBs. >Hi, > Can any one help me in connecting oracle database...

DataBase DataBase DataBase DataBase
DataBase DataBase DataBase DataBase Porfessional Programmable Database Ver. 2.0 2.1 Million Record Capacity. Search Rate: 2000/Records/Second. DataBase Type: Random Access. Can Create Unlimited Databases. Programmable fields for any Application. Build Time One Second, (Auto Creates DB). Setup Time: Instantly, Just Enter DB Name. Ultra Easy to Learn (Typically 30 Seconds) Ultra Cheap Price, Special $20, Paypal Accepted. Application Mailed Instantly (file Attached Email). Easy Paypal Online Ordering. See Site Below. http://www.vehiclerepair.org/dbPro/dbpro.html ...

Re: Dump Database / Porting Database to Oracle #2
Tsutomu Ogiwara wrote: > Hi Sven. > > Try the following command. > > dbexport <your database>. > Then creating current directry <your database.dbs> I think you mean it creates a directory called <your database>.exp. > .unl is ASCII file One per table. > .sql is create table script. But no LOAD commands, as they are handled my dbimport into Informix. So you will need to modify the script to load the data for you into Oracle. Cheers, -- Mark. +----------------------------------------------------------+-----------+ | Mark D. Stock mailto:mdstock@MydasSolutions.com |//////// /| | Mydas Solutions Ltd http://MydasSolutions.com |///// / //| | +-----------------------------------+//// / ///| | |We value your comments, which have |/// / ////| | |been recorded and automatically |// / /////| | |emailed back to us for our records.|/ ////////| +----------------------+-----------------------------------+-----------+ sending to informix-list ...

Re: Dump Database / Porting Database to Oracle #3
Hi Mark. >>Then creating current directry <your database.dbs> > >I think you mean it creates a directory called <your database>.exp. Yes, thanks. -- Tsutomu Ogiwara from Tokyo Japan. ICQ#:168106592 _________________________________________________________________ Tired of spam? Get advanced junk mail protection with MSN 8. http://join.msn.com/?page=features/junkmail sending to informix-list ...

jdbc connection to database Oracle 10g
I have this problem: I am using Eclipse as development for java web apps. I am using Oracle 10g as back end specifically Oracle Toad 8 for handling db. I am using Eclipse BIRT ( business intelligent reporting tools ) for report generation. Upon testing the connection for the Data Source in database, the reply is this: " IO Exception : The Network Adapter could not the establish the connection. " Any suggestion or help is most welcome ... ? On May 7, 7:27 am, glordnavarr...@gmail.com wrote: > I have this problem: > > I am using Eclipse as development for java web apps. ...

is OCI API for accessing Oracle database, and Oracle RAC (database cluster) same or different?
Hi, My application uses OCI to access Oracle database. Now, I came to know about the Oracle RAC failover kind of configuration. Is OCI API for accessing an Oracle cluster is same or different? Is my existing application works well with a cluster (taking the advantage of failover) or do I need to do any changes in my application? Thanks in advance, Ramakrishna. On 14 Jun 2006 23:41:29 -0700, "RamaKrishna Narla" <rknarla@gmail.com> wrote: >Hi, > >My application uses OCI to access Oracle database. >Now, I came to know about the Oracle RAC failover kind of >configuration. Is OCI API for accessing an Oracle cluster is same or >different? Is my existing application works well with a cluster (taking >the advantage of failover) or do I need to do any changes in my >application? > >Thanks in advance, >Ramakrishna. It makes no difference, unless the instance parameters are different. -- Sybrand Bakker, Senior Oracle DBA Sybrand Bakker wrote: > > It makes no difference, unless the instance parameters are different. > > -- > Sybrand Bakker, Senior Oracle DBA Hi Sybrand, Thanks for giving reply on this. Can you please elaborate your response. Is Instance parameters mean Global Database Name, user name and password? Thanks, Ramakrishna. On 15 Jun 2006 01:37:28 -0700, "RamaKrishna Narla" <rknarla@gmail.com> wrote: > >Sybrand Bakker wrote...

Connectivity Between two saperate Database (oracle 8 and oracle 9i)
Dear Sir, We Would like to migrate to oracle 9i from oracle 8. Presently We are on oracle 8 (live) . Can anyone suggest a way by which we can phase out the migration process. We intend to migrate User-wise. We have aprx 10 live users.(e.g. finance, payroll, production etc..). My problem is inter-connectivity between diff. users. like 'Payroll' select/update rows in 'Finance'. If I migrate Finance from oracle 8 to Oracle 9i How to ensure that these select/update does not fail. Kishan Thakker kishanthakker@gmail.com wrote: > Dear Sir, > > We Would like to migrate to oracle 9i from oracle 8. Presently We are > on oracle 8 (live) . Can anyone suggest a way by which we can phase out > the migration process. We intend to migrate User-wise. We have aprx 10 > live users.(e.g. finance, payroll, production etc..). My problem is > inter-connectivity between diff. users. like 'Payroll' select/update > rows in 'Finance'. If I migrate Finance from oracle 8 to Oracle 9i How > to ensure that these select/update does not fail. > > Kishan Thakker How much data? Which version of 9i? Which version of 8? How much downtime is possible? -- Daniel A. Morgan University of Washington damorgan@x.washington.edu (replace x with u to respond) Puget Sound Oracle Users Group www.psoug.org ...

Oracle JDBC connection string : how to hide password ?
Hello, I'm new with Oracle JDBC connection. Is it a way to crypt, hide the password string into a Oracle JDBC connection string ? The goal is to hide the password within script file. Thank's in advance > Is it a way to crypt, hide the password string into a Oracle JDBC > connection string ? > The goal is to hide the password within script file. Why don't you build the connection string in your app and then store the encrypted password in your property file / configuration file. Then when you've loaded the encrypted password, you decrypt it and build your connection string. // Soeren ...

Unable to connect to Oracle 9i database via Oracle 6i Developer
I've successfully installed Oracle 9i Release 9.2.0.1.0 and Oracle Forms Developer and Forms Server 6i (Patch 2) on a stand-alone PC running on Windows XP Pro but cannot connect to my Oracle databases via Developer's various functions -- Graphics Builder, Query Builder, Schema Builder, Procedure Builder, and Translation Builder. As you know, these functions want to connect to a database but I get this error at the Connect screen: ORA-12154: TNS:could not resolve service name As info, the user name and password are fine for both Oracle 9i and Developer. Oracle 9i works fine. I can connect to my databases (Demo and OpsData) with no problem in 9i's SQLPlus window. It's the connections via Developer that's the problem. (In case you need to know, Oracle 9i reside in the C:\Oracle\ora92 directory with ora92 as the HOME. Developer 6i resides in the C:\Oracle\ora9i directory with ora9i as its HOME.) The TNSNAMES.ORA file for Oracle 9i reads as follows: # TNSNAMES.ORA Network Configuration File: C:\oracle\ora92\network\admin\tnsnames.ora # Generated by Oracle configuration tools. OPSDATA = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = jgyk801)(PORT = 1521)) ) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = OpsData.jgyk801) ) ) INST1_HTTP = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = jgyk801)(PORT = 1521)) ) (CON...

How to write shell script to export oracle 8.1.6 database to import oracle 10g database
Hi, I am trying to write or understand the conj process for export the data from oracle 8i to oracle 10g database. I have constraint that the previous loaded data into oracle10g should not be deleted or replace by newly imported database. Regards Nikhil ...

Can we write trigger on Oracle Database level for abnormal loss of connection to database?
ORACLE: I want a trigger to get fired when my application=92s connection to the database gets disconnected abnormally. I plan to monitor the Server Name and its status in the =93 v$session=93 table. Can I write a trigger that gets fired when =93 v$session=93 table gets edited? How can I achieve it? Is there any other way to execute a stored procedure and perform some steps when a connection is lost to a database? Thanks... Any comments/suggestions would be appreciated. shilpa wrote: > ORACLE: > > I want a trigger to get fired when my application�s connection to the > database gets disconnected abnormally. > > I plan to monitor the Server Name and its status in the � v$session� > table. > > Can I write a trigger that gets fired when � v$session� table gets > edited? How can I achieve it? > > Is there any other way to execute a stored procedure and perform some > steps when a connection is lost to a database? > > Thanks... > > Any comments/suggestions would be appreciated. Look up SYSTEM EVENT TRIGGERS in Morgan's Library at www.psoug.org and in the docs at http://tahiti.oracle.com. Consider the AFTER SERVERERROR and BEFORE LOGOFF triggers. -- Daniel A. Morgan Oracle Ace Director & Instructor University of Washington damorgan@x.washington.edu (replace x with u to respond) Puget Sound Oracle Users Group www.psoug.org On Fri, 29 Aug 2008 06:53:58 -0700 (PDT...

Connection to different databases from Oracle Java Stored Procedure
Hi, Is it possible to make JDBC connection to a Sybase DB from whithin an Oracle 9i java stored procedure. Thanks Yes, provided you have a pure Java JDBC drivers (type 4) of the target database. I have a SQL Server example that you can easily replicate for Sybase in book (look for "JDBC Call-Out to non-Oracle database" in chapter 4). http://db360.blogspot.com/2006/08/oracle-database-programming-using-java_01.html Kuassi murat.arslan@turkcell.com.tr wrote: > Hi, > > Is it possible to make JDBC connection to a Sybase DB from whithin an > Oracle 9i java stored procedure. > > Thanks ...

Oracle database works properly but from designers tools I can't connect to database
I've installed Oracle 10G on my computer. I can log in using system account. by plsql. I've installed designer and tried to log from designers plsql to the same databse also using sys account - I could not't, I got ora-1017 error. What I'm doing wrong, why plsql from database installation connects me and one from designer installation disallow me from connecting ? I need databse just to run designer for entity and processes diagrams. I need Barkers notation so I can only use Oracle Designer because it's the only tool with Barkers notation. Hope to get some help from You, J...

Using Oracle 8.1.7 OCI JDBC Driver WIth Oracle 9i Database
Has anyone had any problems using the 8.1.7 OCI JDBC driver with a 9i database? Oracle states they are compatible at the following URL: http://otn.oracle.com/tech/java/sqlj_jdbc/htdocs/jdbc_faq.htm#_1_ "Matt" <mdavey4@csc.com> wrote in message news:f2892d3a.0307241304.6295d05c@posting.google.com... > Has anyone had any problems using the 8.1.7 OCI JDBC driver with a 9i database? > > Oracle states they are compatible at the following URL: > http://otn.oracle.com/tech/java/sqlj_jdbc/htdocs/jdbc_faq.htm#_1_ Any reason not to trust that statement? If you do have any reason, why don't you post it rightaway? -- Sybrand Bakker Senior Oracle DBA to reply remove '-verwijderdit' from my e-mail address ...

US-DC: Washington-Oracle DBA - Oracle Database Administrator
************************************************************** JobCircle.com is the largest regional job board in the Mid-Atlantic region, with tens of thousands of job offerings in PA, NJ, DE, MD, NY, and Washington D.C. To learn more, visit http://www.jobcircle.com?source=ng ************************************************************** Job Title: Oracle DBA - Oracle Database Administrator - Oracle 11g... Job Location: DC: Washington Pay Rate: competitive Job Length: full time Start Date: 2010-11-19 Company Name: Cybercoders Contact: Shea Stone Pho...

US-VA: McLean-Oracle DBA - Oracle Database Administrator - RAC
************************************************************** JobCircle.com is the largest regional job board in the Mid-Atlantic region, with tens of thousands of job offerings in PA, NJ, DE, MD, NY, and Washington D.C. To learn more, visit http://www.jobcircle.com?source=ng ************************************************************** Job Title: Oracle DBA - Oracle Database Administrator - RAC - Oracle Job Location: VA: McLean Pay Rate: competitive Job Length: full time Start Date: 2010-11-19 Company Name: Cybercoders Contact: Shea Stone Phone: ...

Web resources about - username and password on Oracle connection string (jdbc:oracle:thin:@host:Port:dataBase) - comp.lang.java.databases

Resources last updated: 3/3/2016 2:46:11 AM