Skip to Main Content

Programming Languages & Frameworks

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Login to oracle db using nodejs as sysdba

e7cdd8c5-e665-4ff9-aece-14656423a795Dec 14 2015 — edited Feb 11 2016

I am working on nodejs oracledb.I would want to login to oracle db from nodejs oracledb client asSYSDBA.Please suggest

Below is the snippet which am trying

oracleSYS3.getConnection({ user  :"sys", password  :"*******", connectString :"connectionString"},function(){}) 

But I'm getting an error:

ORA-28009: connection as SYS should be as SYSDBA or SYSOPER

This post has been answered by Christopher Jones-Oracle on Dec 16 2015
Jump to Answer

Comments

User_AMB14

/**
* Load a set of loot items into loot table from a Comma Separated Value (CSV) file
* @param fileName expected CSV format: | String name | int tries |
* @throws NumberFormatException if 2nd column isn't an integer (extra space?)
* @throws FileNotFoundException if can't find the CSV file (path & extension?)
* @throws IOException other I/O & storage problems
*/
public void load(String fileName){
try {
BufferedReader fileReader = new BufferedReader(new FileReader(fileName));
String lineItem;

  while ((lineItem = fileReader.readLine()) != null) {  
    String\[\] lootDetails = lineItem.split(",");  

    lootRecord record = new lootRecord();  
    record.name       = lootDetails\[0\];  
    record.tries      = Integer.valueOf(lootDetails\[1\]);  
    record.dropChance = calcDropChance(record.tries);  

    table.add(record);  
  }  
  fileReader.close();  
}  
catch (NumberFormatException e) {  
  System.out.println("Invalid String: Integer count of tries expected");  
  e.printStackTrace();  
}  
catch (FileNotFoundException e) {  
  e.printStackTrace();  
}  
catch (IOException e) {  
  e.printStackTrace();  
}  

} // load

1 - 1

Post Details

Added on Dec 14 2015
5 comments
2,695 views