title: Connect Oracle via Batch file
body: <p>I am very new to windows batch program. I have one requirement, i.e., I want to get the Oracle database username password &amp; connection string from the user via command prompt. Depends on the user input I need to connect a particular user in the Oracle.  How can I do that using Windows batch file?</p>
  
  <p>I tried, but I can't solve the problem.</p>
  
  <pre><code>enter code here
  @ECHO OFF
  ECHO *****************************
  ECHO     Database Login
  ECHO *****************************
  
  
  SET /p username    =User/Schema:
  SET /p passwd      =Password   :
  SET /p tns         =Database   :
  
  
  sqlplus %username%/%passwd%@%tns
  </code></pre>
  
  <p>When I execute the batch file I don't see any action, it just runs and exits from the command prompt.</p>