Skip to Main Content

Breadcrumb

May 4th

Question and Answer

Connor McDonald

Thanks for the question, Francesco.

Asked: January 19, 2018 - 1:29 pm UTC

Last updated: January 22, 2018 - 3:22 am UTC

Version: 11.2.0.4.0

Viewed 1000+ times

You Asked

would like to know why it is not advisable to use "two_tasks"
Thank you
Regards

and Connor said...

Where did you hear that is it "inadvisable" ?

One thing worth noting with TWO_TASK is that it is incompatiable with wallet credentials. Take a look here

https://connor-mcdonald.com/2015/09/21/connection-shortcuts-with-a-wallet/

on how you can setup wallets to avoid passwords on the command line, but notice below that it will not work with TWO_TASK.


C:\Users\hamcdc>sqlplus /@mydb

SQL*Plus: Release 12.2.0.1.0 Production on Mon Jan 22 11:18:52 2018

Copyright (c) 1982, 2016, Oracle.  All rights reserved.

Last Successful login time: Sun Jan 14 2018 17:38:26 +08:00

Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production


SQL> exit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production

C:\Users\hamcdc>set TWO_TASK=mydb

C:\Users\hamcdc>sqlplus /

SQL*Plus: Release 12.2.0.1.0 Production on Mon Jan 22 11:19:00 2018

Copyright (c) 1982, 2016, Oracle.  All rights reserved.

ERROR:
ORA-01017: invalid username/password; logon denied




Is this answer out of date? If it is, please let us know via a Comment

More to Explore

Administration

Need more information on Administration? Check out the Administrators guide for the Oracle Database