Resource / - MySQL String Problem

Hey guys! What's up?
I'm a begginer with JSP and Servlets and I'm having some problems when I try to connect to MySQL Database.
This is my Context.xml :
<Resource     auth="Container"     driverClassName="com.mysql.jdbc.Driver"     maxActive="100"     maxIdle="30"     maxWait="10000"     name="MegaByte/DB"     type="javax.sql.DataSource"     username="root"     password="root"     url="jdbc:mysql://localhost:3306/megabyte" />
And this is the error that I receive:
<ol><li>java.sql.SQLException: Access denied for user ''@'localhost' (using password: NO)  </li> </ol>
Anyone could help?
Cya!

In your config file, it should be user, not username.

Similar Messages

  • PHP and MySQL Connection problem

    I am trying to make a PHP MySQL on a remote server connection in Dreamwesaver CS3.
    When I enter the information (host, user, password, etc.) and hit TEST, I get the following error message.
    "Access Denied. The file may not exist, or there could be a permission problem. Make sure you have proper authorization on the server and the server is properly configured."
    I know the user, password, etc. work, as I can access the MySQL database with other software.
    I checked with my host and they say there are no permission problems on their end.
    I have checked the settings on the Test Server page in Site Setup and everything looks correct and works there.
    I have not seen this particular problem described in other forum postings (although there are a LOT of postings on this topic!).
    Any help would be appreciated.

    I thought my testing server was the remote server and is always on as far as I know. I don't know how to turn it on or off.
    Is there some other testing server that I should be aware of?
    Frank
    Date: Wed, 3 Jun 2009 15:43:02 -0600
    From: [email protected]
    To: [email protected]
    Subject: PHP and MySQL Connection problem
    I know you are using remote, but is your testing server on? if not turn that on and see if that does it. it just happened to me working on remote server and could not get mysql conn to work, until I turn on my testing (developer server), then I was able to connect to mysql and the tables that I created in phpmyadmin remotly was downloaded.
    >

  • Error resolving resource bundle "strings"

    Hi
    I'm trying to use Flex 3 to compile the Flex 2 PhotoViewer
    sample project, and encountered this error: 'Unable to resolve
    resource bundle "strings" for locale "en_US".'
    I found the Flex 2 TechNote which suggested to add
    "-use-network=false -library-path+=locale/{locale}
    -source-path+=locale/{locale} -locale=en_US" as compiler options.
    So I tried adding the above options into the build.bat files
    I can find at:
    a) C:\Program Files\Adobe\Flex Builder
    3\sdks\3.1.0\samples\explorer
    b) C:\Program Files\Adobe\Flex Builder
    3\sdks\3.1.0\templates\automation-runtimeloading-files
    but still the error persists.
    Can anyone please advise where I should change the compiler
    options? Thanks!
    Regards
    freshflex

    << Do not post the same question across a number of forums >>

  • Skinning resource string problem

    Hi
    jdev 11.1.1.5
    There are some message that not have any key in http://jdevadf.oracle.com/adf-richclient-demo/faces/components/skinningKeys/inputFile.jspx
    and show in client side without postback like when the inputfile is too large in af:inputFile and required message "A value is required" above the message box of required?
    how can I change this message?
    what is the key for this kind of message???

    Hi,
    the "A value is required" ma ynot come from the component but a validator (though from the top of my head I don't know the skin resource string for this). However, I suggest (if you have a support contract) to file a service request and get missing selectors provided
    Frank

  • Resources inside JAR - problem

    I have a strange problem with resources inside JARs.
    I can't load any resource form a JAR file (for example a .property file or .png icon).
    It's not a problem with my progams only. JDBC drivers doesn't work because they cannot find .properties files while they work well when, the driver JAR i uncompressed. It happens every time when some resouces are inside JAR library (classes are loade correctly). The same project runs well on my friend's computer while I've got an error on my computer.
    I tried it on WinXP and Win2003 Server - the same. My java version 1.5.0_06-b05 (but I had the same problem with older versions).
    I figured out that I can find a file inside a JAR, open a stream, load data and everything is OK but data is always 0bytes length. For example using:
    ImageIcon myImageIcon = new ImageIcon(getClass().getResource(pathandfilename));
    I get empty ImageIcons without any error.
    Can anyone help me. Maybe I should find something somwhere in java configuration.
    Message was edited by:
    peper

    But can anyone tell me why my servlet can not access the
    contents inside a jar file?? Any suggestions please?
    Thanks.Without seeing your code, it is likely that you are trying to use file names (like /some/path/yourFileName.ext), not resource names (loadable from the class loader) like /yourFileName.ext.
    Example:
    Instead of:
    FileInputStream stream = new FileInputStream("/some/path/yourFileName.ext");
    do this:
    InputStream stream = getClass().getResourceAsStream("/yourFileName.ext");
    There are other API's which take either a string file name or a URL. You want to go the URL way, where the URL is taken from the classpath as:
    URL url = getClass().getResource("/yourFileName.ext");

  • MySQL Connectivity problem

    Hi all,
    I am new to JSP. I am using Eclipse 3.2. with all lpugins. The following code throws an error. Pleas help me.
    <html><body>
    <%@ page import="java.sql.*, java.lang.ClassNotFoundException"%>
    <%
         String connectionURL = "jdbc:mysql://localhost:3306/online_hotel_booking";
         String userName = "root";
         String password = "root";
         // Load the driver class and establish a connection
         try {
              Class.forName("com.mysql.jdbc.Driver").newInstance();
              Connection con = DriverManager.getConnection(connectionURL,userName,password);
              Statement stmt = con.createStatement();
              ResultSet rs = stmt.executeQuery("select * from hotel_details");
              while (rs.next()) {
                   out.println(rs.getString(1));
                   out.println(rs.getDate(2));
              /* closing the connection */
              rs.close();
              stmt.close();
              con.close();
         catch (Exception e) {
              out.println("Exception!"+e);
    %>
    </body></html>It throws ClassNot FoundException: com.mysql.jdbc.Driver
    Thanks in advance

    JDBC questions should be posted in the JDBC forum: http://forum.java.sun.com/forum.jspa?forumID=48
    If you take the time to look the active topic listing of the JDBC forum, you'll see that you're not the only one who encountered the problem. Yesterday I answered similar topic on this issue.

  • JSP Mysql Connection Problem

    Hi Friend,
    I am facing some problem in connecting mysql with jsp .
    When I try and connect to mysql with the following connection string
    Class.forName("org.gjt.mm.mysql.Driver").newInstance();
    Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/testdhiraj?user=root&password=dh");
    Statement statement     = con.createStatement();
    I get an error :
    java.sql.SQLException: Communication link failure: Bad handshake
    I don't know what is wrong,
    as I had tested mysql using telnet and it connects and executes sql nicely.
    Waiting for ur reply,
    Dhiraj Agrawal
    mail to : [email protected]

    Hi,
    You need to make sure that , you have given correct database name, user id and password in the connection url. and also check the jdbc driver is loaded properly. If your mysql is running in the standard port, you need not give the port as 3306.
    Here is the example :
    import java.sql.*;
         Notice, do not import org.gjt.mm.mysql.*
    or you will have problems!
    public class XampleClass
    public static void main(String[] Args)
    try {      
    Class.forName("org.gjt.mm.mysql.Driver").newInstance();
    catch (Exception e) {
    System.err.println("exception while loading
    driver.");
    e.printStackTrace();
    try {
    Connection C = DriverManager.getConnection(
    "jdbc:mysql://localhost/test?user=myuser&password=mypwddb");
    // Do something with the Connection
    catch (SQLException e) {
    System.out.println("Exception: " + e);
    This is the format for conenction url :
    jdbc:mysql://[hostname][:port]/dbname[?param1=value1][&param2=value2]...
    Hope this helps you.
    Thanks,
    Senthil_Slash

  • J2EE RI and MySQL, JNDI problems

    Hi.
    I am trying to write a simple J2EE application that would use Entety EJB with bean persisatance. I have downloaded driver from the www.mysql.org, copied it to the lib/system directory and modified J2EE_CLASSPATH in bin/userconfig.bat. I am using reference implementation server and with deploytool in �tools/serverconfiguration/datasourses/standard� I am specifying driver: org.gjt.mm.mysql.Driver or com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource and in datasourses in JNDI Name I write �jdbc/mydb� and in JDBC URL �jdbc:mysql://localhost:3306/this�, problem comes up when I try to reference �jdbc/mydb� from an entity bean, during deployment process of application it says that it is not bound
    Binding name:`java:comp/env/jdbc\persondb`
    Warning: Reference reference java:comp/env/jdbc\persondb is using a JNDI name that is not bound: jdbc\mydb
    I do not get it, what I am doing wrong? Please help me to find out how to bind a JNDI name to MySQL

    Ive been playing with the J2EE RI server for a bit now..
    and dispite documentation to the contrary the latest RI DOES NOT use standard naming conventions when referencing jndi resources.
    ie:
    so if you trying to get : java:com/env/jdbc/persondb
    then try accessing it by
    jdbc/persondb
    omit the java:com/env/

  • Mm.mysql Driver problems

    Im trying to get Tomcat to function with mysql database.
    I am using Tomcat 4.0.
    I recieve this error when trying to connect to mysql:
    javax.servlet.ServletException: org.gjt.mm.mysql.Driver
    java.lang.ClassNotFoundException: org.gjt.mm.mysql.Driver
    I have a classpath setting of:
    C:\jdk\lib\mysql.jar
    I dont know why it is not finding the class... Maybe its a problem with Tomcat 4.0??

    Jim
    Here is code I use to connect:
    context = Server.getContext();
         try {
         String dbName = context.getInitParameter("DbName");
         String dbUsr = context.getInitParameter("DbUserName");
         String dbPwd = context.getInitParameter("DbUserPwd");
         String conStr = "jdbc:mysql://localhost/" + dbName + "?user=" + dbUsr + "&password=" + dbPwd;
         Class.forName("org.gjt.mm.mysql.Driver").newInstance();
         dbCon = DriverManager.getConnection(conStr);
         } catch (Exception ex) {
    Server.logErr("DBManager: failed to init connection",ex);
    throw ex;
    I am using Tomcat 3.2.1 with mm.mysql 2.0.4 and it all seems to work fine.
    Hope this helps
    Regards
    David

  • Netbeans + MySQL + Tomcat (problem with: not a known entity type)

    I try to create WebApplication with Stripes in netbeans, but I have problem with connect to DB.
    I have this code:
    EntityManagerFactory emf = Persistence.createEntityManagerFactory("jpaPU");
    EntityManager em = emf.createEntityManager();
    em.getTransaction().begin();
    Person p = new Person();
    p.setFirstName("name1");
    p.setLastName("name2");
    try
    em.persist(p);
    } catch(Exception e)
    System.out.println(e.toString());
    em.getTransaction().commit();
    em.close();
    emf.close();But in try{..} is em.persist(p); ant it prints into console this error: "java.lang.IllegalArgumentException: Object: db_entity.Person@13c7c35 is not a known entity type."
    I do not know where is problem. Could you help me, please?
    This is my persistence.xml:
    <?xml version="1.0" encoding="UTF-8"?>
    <persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
      <persistence-unit name="jpaPU" transaction-type="RESOURCE_LOCAL">
        <provider>oracle.toplink.essentials.PersistenceProvider</provider>
        <properties>
          <property name="toplink.jdbc.user" value="root"/>
          <property name="toplink.jdbc.password" value="adminadmin"/>
          <property name="toplink.jdbc.url" value="jdbc:mysql://localhost:3306/test"/>
          <property name="toplink.jdbc.driver" value="com.mysql.jdbc.Driver"/>
          <property name="toplink.ddl-generation" value="create-tables"/>
        </properties>
      </persistence-unit>
    </persistence>When I run my application I can see in console:
    [TopLink Info]: 2008.11.15 09:01:13.265--ServerSession(4794542)--TopLink, version: Oracle TopLink Essentials - 2.0.1 (Build b09d-fcs (12/06/2007))
    [TopLink Info]: 2008.11.15 09:01:13.578--ServerSession(4794542)--file:/D:/Workspace/NetBeansProjects/jpa/build/web/WEB-INF/classes/-jpaPU login successful..so, I hope persistence.xml is good
    This is my class Person.java:
    @Entity
    public class Person implements Serializable {
        @Id
        @GeneratedValue
        private Long id;
        private String firstName;
        private String lastName;
        public void setId(Long id) { this.id = id; }
        public Long getId() { return id; }
        public String getFirstName() {  return firstName; }
        public void setFirstName(String firstName) { this.firstName = firstName;  }
        public String getLastName() { return lastName; }
        public void setLastName(String lastName) { this.lastName = lastName;  }Please, help me.

    I had the same "is not a known entity type" error when running under a development environment Eclipse/Tomcat using Toplink. But the almost same code and configuration worked when running under Eclipse as a stand-alone Java app.
    Eventually I figured out (actually trial and error), that I had checked the toplink-essentials.jar libraries to be exported under: Eclipse Project/Java Build Path/Order and Export. I was messing around with libraries. Unchecking the export option there fixed the problem.
    While its unlikely that this could have been your exact problem, I would check the library order and export configurations. Looking at other message boards about this problem, many seemed to have been caused or fixed by playing with their libraries.

  • MySQL CFMX Problems

    CFMX 6.1
    MySQL 4.1
    Connector J 3.0.17
    I've recently changed from MS Access to MySQL. I've read all
    about the bugs and problems with the connectors and everything has
    been updated the way it has been described to. I can get a simple
    query working, but for some reason when i use several queries
    (loading a page with content from different tables) it just stops,
    the MySQL Administrator indicates that the threads are "Sleeping"
    but the page hasn't completely loaded... any ideas?

    There are some other things that must be done to connect to
    the database
    (such as passing the usernamee, password, and host info to
    mysql_connect()
    and storing the connection resource), and those might be in
    the include
    files. I generally place all of the connection parameters in
    a separate file
    that is located in a folder that can't be accessed by a
    browser, for
    security purposes.
    Paul Swanson
    Portland, Oregon, USA
    "Amy Blankenship *AdobeCommunityExpert*"
    <[email protected]>
    wrote in message news:edk6ui$69c$[email protected]..
    > What's in the include(s)?
    >
    > "83Dons" <[email protected]> wrote in
    message
    > news:edk5s5$4uk$[email protected]..
    > > Here is the php code for the 'read' and 'write'
    parts:
    > >
    > >
    > >
    > > <?php
    > > include '......';
    > > mysql_select_db('clinskills') or die("UNABLE TO
    CONNECT TO
    DATABASE");
    > > $sql = "select A1Answer from authorware where id =
    '13'";
    > > $result = mysql_query($sql);
    > > $answer1 = mysql_result($result,0,"A1Answer");
    > > print $answer1;
    > > ?>
    > >
    > > <?php
    > > include '............';
    > > mysql_select_db('clinskills') or die("UNABLE TO
    CONNECT TO
    DATABASE");
    > > $newdata = $_GET['data'];
    > > mysql_query("insert into authorware (A1Answer)
    values('$newdata')")
    or
    > > die(mysql_error());
    > > mysql_close(); ?>
    > >
    >
    >

  • Null String and Empty String problem

    Hello everyone,
    since i am totally new in JSP, i am getting problem in handling strings.
    Suppose i have a variable users = ""; then
    I want to ask when to use:
    if (users.equals(""))
    and
    if(users == "")
    in my code, variable users has value "regional" for regional users.
    and i am checking this code as:
    if (users.equals{"regional")) {
    out.print ("I am inside code");
    at that time, the code is throwing error (run time error)
    and when i changed the code as:
    if (users == "regional") {
    out.print ("I am inside code");
    this time, the code is not generating error but the part message "I am inside code " is not displaying. The code do not inserts inside the if condition
    I hope u understand my problem. Can anybody help me out with this.

    This has basically nothing to do with JSP, but with basic Java knowledge.
    When using the '==' operator to compare Objects (yes, String is actually a subclass of Object), then it will look if they are of the same reference. Using the '==' operator to compare primitive datatypes (int, boolean, char, etc) will look if they have the same value.
    That is why the Object class has the equals() method to give the ability compare with another objects. And you can only invoke it when the Object is actually instantiated. So if it is not null.
    if (string != null && string.equals("somevalue")) {
    // or
    if ("somevalue".equals(string)) {
    }should work.
    Edit rym82: this will not throw a NPE, but an ordinary compilation error ;)
    Message was edited by:
    BalusC

  • POI getCellStyle and empty string problem

    I'm having a problem getting the style of a cell from and excel input file and setting to an output file.
    I also have a problem recognizing blank cells that are not null in the input file here is my code any help would be great.
    package Trace;
    import java.io.*;
    import org.apache.poi.hssf.usermodel.*;
    import org.apache.poi.hssf.util.HSSFColor;
    import java.util.StringTokenizer;
    import org.apache.poi.poifs.filesystem.*;
    import java.lang.Runtime;
    public class Converter1 {
         private static short bhyvb= 0;
         private static short foreground, background;
         private static String[][] cellGridOut;
         private static int numRows, numColumns, clock;
         private static POIFSFileSystem fs;
         private static HSSFWorkbook wbin, wbout;
         private static HSSFSheet sheetIn, sheetOut;
         private static HSSFRow rowIn, rowOut;
         private static HSSFCell cellIn, cellIn1, cellOut;
         private static FileOutputStream fileOut = null;
         private static String rowIterator, rowIterator1;
         private static HSSFCellStyle style, style1;
         public static void main(String[] args) {
              //Take in 2 inputs mandatory, Input Event Trace excel file and Time Interval respectively
              if (args.length != 1)System.err.println("Input Excel File"); 
              //Create a new POI file system and HSSF workbook with your excel input file
              InputStream input = Converter.class.getResourceAsStream(args[0]);
              try{
                   fs = new POIFSFileSystem(input);
                   wbin = new HSSFWorkbook(fs);
              }catch (Exception e){System.err.println("File input error");}
              wbout = new HSSFWorkbook();
              sheetIn = wbin.getSheetAt(0);
              numRows = sheetIn.getLastRowNum();//numRows=723
              style = wbout.createCellStyle();
              //style.setFillForegroundColor(HSSFColor.LIGHT_YELLOW.index);
              //style.setFillPattern(HSSFCellStyle.SOLID_FOREGROUND);
              //get number of columns
              rowIn = sheetIn.getRow(0);
              boolean done = false;
              int testNullPointer;
              numColumns=0;
              while(!done){
                   //System.out.println(ColumnInc);
                   cellIn = rowIn.getCell((short)numColumns);
                   numColumns+=1;
                   try{
                        testNullPointer = cellIn.getCellType();
                   }catch(NullPointerException npe){
                        done = true;
              numColumns-=1; //number of columns = 25
              converterIt();
              //Create new output file, if it exists delete it
              File myFile = new File("converted.xls"); 
              if(myFile.exists()){
                   myFile.delete();
              //Create new file output stream
              try {
                   fileOut = new FileOutputStream(myFile);
              } catch (IOException ioe) {}
              //write all conversion data to output file
              try{ 
                   wbout.write(fileOut);
                   fileOut.close();
              }catch (IOException ioe) {} 
         public static void converterIt(){
              boolean nextDone = false;
              boolean nextDone1 = false;
              for(int i=0; i<numColumns; i++){
                   clock =1;
                   rowIn = sheetIn.getRow(0);
                   cellIn = rowIn.getCell((short)i);
                   String getTopRow = cellIn.getStringCellValue();
                   sheetOut = wbout.createSheet(getTopRow+"_s"+i);
                   sheetOut.setColumnWidth((short)0, (short)(13 * 256));
                   sheetOut.setDefaultColumnWidth((short)25);
                   for(int j=0; j<=numRows; j++){
                        if(j==0){
                             rowIn = sheetIn.getRow(j);
                             cellIn = rowIn.getCell((short)i);
                             String temp2 = cellIn.getStringCellValue();
                             rowOut = sheetOut.createRow((short)j);
                             cellOut = rowOut.createCell((short)j);
                             cellOut.setCellValue(temp2);
                             cellOut = rowOut.createCell((short)(j+1));
                             cellOut.setCellValue("CLOCK");
                        if(j==1){
                             rowIn = sheetIn.getRow(j);
                             cellIn = rowIn.getCell((short)i);
                             double temp3 = cellIn.getNumericCellValue();
                             rowOut = sheetOut.createRow((short)j);
                             cellOut = rowOut.createCell((short)0);
                             cellOut.setCellValue(temp3);
                             cellOut = rowOut.createCell((short)1);
                             cellOut.setCellValue("");
                        nextDone=false;
                        nextDone1=false;
                        if(j>1){
                             rowIn = sheetIn.getRow(j);
                             try{
                                  cellIn = rowIn.getCell((short)i);
                             }catch(NullPointerException npe){
                                  rowIterator = "";
                                  nextDone=true;
                             if(!nextDone){
                                  try{
                                       rowIterator = cellIn.getStringCellValue();
                                       style = cellIn.getCellStyle();
                                  }catch(NullPointerException npe){}
                             if(j==2){
                                  rowOut = sheetOut.createRow((short)(clock+1));
                                  cellOut = rowOut.createCell((short)0);
                                  cellOut.setCellValue(rowIterator);
                                  cellOut = rowOut.createCell((short)1);
                                  cellOut.setCellValue(j-1);
                                  clock+=1;
                             }else{
                                  rowIn = sheetIn.getRow(j-1);
                                  try{
                                       cellIn = rowIn.getCell((short)i);
                                  }catch(NullPointerException npe){
                                       rowIterator1 = "";
                                       nextDone1=true;
                                  if(!nextDone){
                                       try{
                                            rowIterator1 = cellIn.getStringCellValue();
                                       }catch(NullPointerException npe){}
                             if(rowIterator1!=rowIterator && j>2){
                                  rowOut = sheetOut.createRow((short)clock+1);
                                  cellOut = rowOut.createCell((short)0);
                                  cellOut.setCellValue(rowIterator);
                                  //System.out.println(style);
                                  cellOut.setCellStyle(style);
                                  cellOut = rowOut.createCell((short)1);
                                  cellOut.setCellValue(j-1);
                                  clock+=1;
                        }//if
                   }//for
              }//for
         }//converterIt
    }//Converter1 CLASSEND

    I am not sure about the cell style as it looks like you are doing it right. For the null or blank cells it looks like you are only checking for null not "".

  • Search and replace string problems

    Hi to all,
    I have problem with Search and replace string function. It shows me a wrong Value (Number) from 15 to 100 is everything OK (15=0, 30=1, 45=2, 100=3), but after 100 ........
    Take look in VI and if you have any ideas post them please
    THX
    Igor 
    Attachments:
    indexing.vi ‏10 KB

    there will be no 15115 string, but 15 or 115 and 15 is 0, 115 is 4. Anyway, i have changed string input format and now its working THX for your help
    Attachments:
    indexing.vi ‏10 KB

  • Host String Problem

    Hi everyone, i searched the forum and found same problem with me but i did not work for me. The problem is i cannot connect my sql plus. i enter my username and password then it asks me gor host string but when i type it and enter "ok" it says "TNS Listener does not currentl know of service requested in connect descriptor. i looked at my tnsnames.ora file and is exactly like this.
    # tnsnames.ora Network Configuration File: C:\oracle\product\10.2.0\db_1\network\admin\tnsnames.ora
    # Generated by Oracle configuration tools.
    EXTPROC_CONNECTION_DATA =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
    (CONNECT_DATA =
    (SID = PLSExtProc)
    (PRESENTATION = RO)
    CSE348 =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = Canavar)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = cse348)
    So what shoul i type to connect sql plus?

    Given the tnsnames.ora content, the following needs to be entered for sqlplus in order to have it use that connection string in the file:
    sqlplus scott/tiger@CSE348As you have not qualified the alias with a domain, it will default to "+.world+" as far as I recall. If the default domain in your local sqlnet.ora differs, than that default will be used to find alias CSE348 in the local tnanmes.ora file. So make sure that you do not mix default and explicit domain names. Rather specify a default domain in sqlnet.ora and use the same domain for defining full qualified domain name TNS aliases in tnsnames.ora.
    As for the error - the Listener receives a connection request for a service called cse348 - and no such service has registered with it. You can check the known services of the listener using the "+lsnrctl services+" command on the server.
    Often in this case, it is easier to request a specific database instance using its system identifier, or SID. In which case you can change your connection string for the alias to use a SID as follows:
    CSE348 =
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = Canavar)(PORT = 1521))
        (CONNECT_DATA =
          (SERVER = DEDICATED)
          (SID = cse348)
      )This assumes that the SID is cse348. The default SID is for example orcl. SIDs like dev and prod are also often used.

Maybe you are looking for