How to determine database name I am connected to ?

I would like as simply and fast as possible to determine the database name, which I am currently connected to. Maybe the property jbo.sql92.JdbcDriverClass would do, but how to get its value ? Thanks for any suggestions.

Ricky,
don't understand that, why you don't use the session, when you are in BC4J (AM.getSession()) - which will give you at least the URL you connect too (in case you use a datasource - bad luck, as it is defined within the container ..)
thx clemens

Similar Messages

  • How to determine database growth for new B1 instalation

    Hello B1 people,
    I'm working on the capacity planning of my new business one project and must know how to determine database growth. Does anyone did something like that before?
    Wich tables should I consider?
    Thanks in advance.

    Hello Gabriel,
    I think it is difficult to make any predictions about database growth because this depends on the volume of your business transactions, the number of users, the continuity of your master data...
    For example a small number of users can create a lot of transactions (accounting, logistics) with big documents like sales orders with more than 100 items, or a lot of users who primarily look up things but only create small transaction won't create too much data and thus influence database growth in totally different ways.
    You should collect information about the volume of daily business to make any forecasts.
    If you start with an empty database, the first big growth will be when you upload your master data, but if only few business transactions follow, you shouldn't use that first increase for your calculation.
    Is this your very first B1 installation, or do you already have B1 systems running? If you use the EWA service on a running B1 installation on a regular basis, then you will get a good impression of database growth and transaction volume but you should only use this as a basis for your calculation if the business of the new installation is similar to already running company's.
    Hope that helps,
    Sandra

  • How to determine domain name in db_link?

    Hi all,
    when executing:
    create database link TST connect to myuser identified by pippo using 'MYTNS';I obtain the db link name with a suffixed domain, for example:
    TST.DOMAIN.COM
    Where does that domain come out from?
    How to determine it before db link creation?
    thanks a lot
    aldo

    solution found in thread
    REGRESS.RDBMS.DEV.US.ORACLE.COM  concates to every databaselink name.

  • How to remove database name from SQL query

    We have an MS SQL server with several databases that are of the same schema but have different data.  We do this for testing different environments.  We are using Crystal reports for the first time and we are having trouble changing the database location in the designer.  If update the data source location to the same database server, but different database name, the data still comes from the original database used when creating the report.  We look at the SQL query and it contains the database name and does not change when updating the data source.  Therefore the data always comes from the database used when originally creating the report.
    How can I remove the database name from the SQL query so the proper database is used when testing the report?

    Hi C F
    Please ensure you have followed the procedure mentioned below:
    In Crystal Reports, there are two ways to set the location of the data source your report points to, depending on your connection type.
    For ODBC and Native Connections:
    1. On the 'Database' menu, click 'Set Datasource Location'.
    2. In the 'Current Data Source' section, click the data source to be changed. You must click each individual table in the data source one by one. If the data source is a stored procedure you will not see individual tables.
    NOTE     In Crystal Reports 10, XIR1, and XIR2, if you are mapping from a data source such as a stored procedure where the report designer can not determine which fields should be mapped automatically, you will see a 'Mapping' dialog box where you can manually map fields, as in the procedure cited above.
    3. In the 'Replace with' section, click the data source you want the report to use.
    4. Click 'Update'.
    5. Close the 'Set Datasource Location' window.
    The report now points to the new location.
    For Native Connections Only:
    1. On the 'Database' menu, click 'Set Datasource Location'.
    2. In the 'Current Data Source' section, click 'Properties' to expand it and right-click 'Database Name: <path to database>'.
    3. Click 'Edit' and then type the path to the
    new data source location.
    4. Close the 'Set Datasource Location' window.
    The report now points to the new location.
    Regards
    Girish

  • How to know database name and schema name

    Hi ,
    Once after logging in the database,how is it possible to know the current database and schema which we r using?Is there any system table where we can get the database names and schema names?
    please help me out.itz urgent.
    Regards,
    Sravan

    Probably not.
    If the database name is the name of the current database, it would be essentially redundant. If the database name is the name of some other database, in order to get the names of all the tables in the specified schema, you could create a database link to the remote system (which assumes you have a login and password to the remote database with appropriate privileges, that the database server's tnsnames.ora file has an entry for the remote database, etc) and query the remote data dictionary tables. Even if you could do that, however, you could not dynamically create triggers on the remote database since DDL over a database link.
    In theory, you could also load an appropriate JDBC driver into the database and write a Java stored procedure that would connect to the remote database (again, with an appropriate user name & password, host name, and port number) and issue DDL against that remote database. I have a hard time believing, however, that this would be a particularly beneficial approach. It would be easier just to put the appropriate code into each database that needs triggers generated or to have a separate Java application that generates triggers for a number of different databases.
    Justin

  • How to display database name in page footer in webi report

    Hi Every one,
    I have migrated deski report from BO 6.5 to BI 4.1. and converted Deski to WEBI in 4.1.
    In Bo 6.5 page footer displaying database name but BI 4.1 it showing database type (like Oracle 10g,9i ..etc..).
    I want database name in page footer.
    Please any one help me to solve this issue.
    Thanks

    Hi Thanks for your reply.
    We have tried this option but its not helpful.
    Below syntax is  in both BO 6.5 and BI 4.1.but in 6.5 it showing database name where as in BI 4.1 it showing database type
    ="Track GPQ Database - " + Upper(Substr(Connection((DataProvider(([product])))) ;Pos(Connection((DataProvider(([Product])))) ;"DATABASE")+9 ;7)).

  • How to get database name

    How do i get the database name in reports. we can get this in form by get_application_property, do we have anything like that in reports
    thanks

    Check the database dictionary tables.
    sys.v_$parameter certainly contains a parameter with the name 'db_name'and the value of the database name.
    see what you get when you run:
    select * from sys.v_$parameter where name='db_name'
    If the user running the report won't have the select priviledge on sys.v_$parameter, then you will have to create a function that returns the value for the db_name parameter (that is in the schema of a user that has that priviledge) and grant execute on it to the user that runs the report and create a synonym for that function.

  • How to know database name and schema name by providing package name?

    Hi,
    Could someonw will help me to get database name and schema name by providing package name ?
    I have used the query : select * from all_objects where object_name='Package_name'; but it simply returns schema name where as i need DB name and username.
    --Prajakta

    but it simply returns schema name where as i need DB name and username.
    i want to retrive the DB name for package name
    Based on your questions, I wonder if you are used to working in SQL Server? (The server, database, and schema are part of the 4-part  name of an object, independent of any user.)
    In SQL Server, schema and username are two separate physical concepts.  "Schema" is purely logical in Oracle: a user which owns objects is often called a "schema".
    In Oracle, "database" is roughly equivalent to the SQL Server concept  "server" (what you log in to).  It is not part of the naming path to a specific object  (unless there is a database link involved, but there is no indication that's what you have here).  In Oracle you connect to an Instance (or Service) and people often call this the "database", but there is a fine semantic distinction there (separate topic). 
    Once connected in Oracle, you fully-qualify an object by only a 2-part owner and object name (possibly 3-part if a database link is involved user.object@link).
    12c added another wrinkle to all of this, but I'll assume this question was more basic than that, because you likely would have mentioned if this was a 12c question.

  • How to put database name/server name insted of  SQL

    Hi,
    I need to put a data base name/server name insted of SQL>, means
    if DATABASE NAME is db1, then
    db1>. insert into ----
    Thanks & Regards,
    Venkat

    Hi,
    Thank u. But I am looking with out my set SQL... Query. Automatically data base name comes at there. Becuase i am loading data into diffrent servers before run the script, for my reference, is it into correct server or not.
    When ever i exit it Return to SQL>. I need always at there.

  • How to set database name default for oracle discoverer 10g

    Hi
    Do you have idea of setting the database name default for oracle discoverer 10g

    I mean to say while login to discoverer 10g, it will ask for following options. In this Database should select the database name by default instead of any value
              User Name
              Password
              Database
              End User Layer

  • How to rename seller name in iTunes connect

    HI,
    In app Store we see that App Name and exactly below that seller name i.e. the name of individual or company name how to rename this name in itunes store?

    This would be a question probably best asked of Apple Developer Support:
    https://developer.apple.com/contact/
    Regards.

  • How to access database from applet using connection pooling.

    Hi,
    I am using tomcat 4.1, JRE 1.4.2_10, MySQL 5.0, and IE 6.0. I can access the database using connection pooling from JSP without problems. But, if I try to acess from the applet, I get the following exception (related to JNDI.):
    javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
    at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
    at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
    at javax.naming.InitialContext.getURLOrDefaultInitCtx(Unknown Source)
    at javax.naming.InitialContext.lookup(Unknown Source)
    I know what this acception means, but I don't know how to fix it. I set up connection pooling in my Tomcat 4.1 that talks to MySQL 5.0. As I said, when I access from jsp, JNDI works. But, applet complains. Please help. In my applet, the following code accesses the database:
    ArrayList toolTipData =
          access.getToolTipData (projectName,interfac);This is the snipet of my Access class:
    public ArrayList getToolTipData (String projectName, String interfac) {
        System.out.println("In getToolTipData");
        ArrayList toolTipData = new ArrayList();
       try{
        Context ctx = new InitialContext();
        if(ctx == null )
            throw new Exception("No Context");
        DataSource ds = (DataSource)ctx.lookup("java:comp/env/jdbc/interfacesDB");
        if (ds != null) {
          Connection conn = ds.getConnection();
          if(conn != null)  {
              Statement s = conn.createStatement();
              //For some reason paramtized queries don't work, so I am forced
              //to this in slighly less eficient way.
              ResultSet rst = s.executeQuery("select * from interfaces");
              while (rst.next()) {
                 if (rst.getString("Project_Name").equals(projectName) &&
                     rst.getString("Interface").equals(interfac)) {
                   System.out.println("getToolTipData: ITG #" + rst.getString("ITG"));
                   toolTipData.add("ITG #: " + rst.getString("ITG"));
                   toolTipData.add("SPNE Prime Name: " +
                                   rst.getString("SPNE_Prime_Name"));
                   toolTipData.add("PD Prime Name: " +
                                   rst.getString("PD_Prime_Name"));
                   toolTipData.add("IT Prime Name: " +
                                   rst.getString("IT_Prime_Name"));
                   toolTipData.add("MLC Priority: " +
                                   rst.getString("MLC_Priority"));
                   toolTipData.add("Gary's Prime: " + rst.getString("Garys_Prime"));
                   toolTipData.add("QA Prime: " + rst.getString("QA_Prime"));
                   toolTipData.add("Brief Description: " +
                                   rst.getString("Brief_Description"));
                   toolTipData.add("Project_Status: " +
                                   rst.getString("Project_Status"));
              conn.close();
      }catch(Exception e) {
        e.printStackTrace();
      return toolTipData;
    ....

    The jsp runs on the server, whereas the applet runs on the client so
    you must package with your applet any jndi implementation specific classes
    and
    Properties props = new Properties();
    props.setProperty("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory" );
    props.setProperty("java.naming.provider.url", "url:1099");
    Context ctx = new InitialContext(props);
    Object ref = ctx.lookup("...");

  • How to determine the name or type of a control in a existed VI?

    I got a couple of VIs other engineers created before. There are a couple of controls I can not tell the type or name of that control.
    I used LabVIEW ctrl-H to try to figure out what control was used but failed. I also tried to use "Edit\Customize Control" to determine that control, still could not find it.
    Please advise how can I figure out what kind of controls were used in some existed VI. Thanks,
    RY

    The name of the control is its label. It may have an empty label, meaning no name. It's also possible its label is invisible. Right click it and go to Visible Items to find out.
    As for the type, the color and shape of the icon is usually the best way to tell.
    Right click the diagram terminal of the control and select View as Icon. This might help you. If it doesn't, I suggest you post the 2 controls in an empty VI, and I'm sure someone can figure it out.
    Try to take over the world!

  • How to get Database name/IP address of the database server from forms10g

    Hi everybody,
    How do I get the database instance name and IP address of the database server?
    I am using Foms 10g and the database server is Oracle 10g.
    Sukanta

    Dear...........
    Plz use this code
    select SYS_CONTEXT('USERENV', 'IP_ADDRESS', 15) ipaddr from dual;
    SELECT utl_inaddr.get_host_address IP ,UTL_INADDR.get_host_name NAME FROM dual;
    select SYS_CONTEXT('USERENV', 'HOST') HELLO from dual;
    select SYS_CONTEXT('USERENV', 'TERMINAL') HELLO from dual;
    select SYS_CONTEXT('USERENV', 'OS_USER') HELLO from dual;
    SELECT SYS_CONTEXT ('USERENV', 'SESSION_USER') FROM DUAL;
    SELECT SYS_CONTEXT ('USERENV', 'DB_UNIQUE_NAME') FROM DUAL;
    thx.

  • "Who ran me" - how to determine the name of the dbms_scheduler job that ran me

    Hi Community
    I can see plenty of examples out on the interweb which shows how you can use dbms_utility.format_call_stack to find the hierarchy of procs, functions and packages that got me to a particular point in my code.
    For example, if proc (procedure) A calls proc B, which in turn calls proc C, in the code for proc C, I can query the call stack to find out that proc C was called by proc B which in turn was called by proc A
    However, I want to extend this further.
    For example, using the example above, if proc A in turn was started by a dbms_scheduler job, I want to determine (within proc C) the name of the dbms_scheduler job which started the whole process off.
    The reason I want to do this is that I have inherited a (massive) system which is undocumented. In many places within the code, email alerts are sent out using a custom "MAIL" package to designated users (now including me) when certain long-running processes reach certain milestones and/or complete.
    I have added to the custom "MAIL" package a trailer on the mails to show the call stack. I also want to show the name of the dbms_scheduler job which started it all.
    Over time, this info may help me in building the "map" of how the whole undocumented system hangs together and in the meantime, to assist in troubleshooting problems
    Looking forward to hearing from you
    Alan

    Use USER_SCHEDULER_RUNNING_JOBS or DBA_SCHEDULER_RUNNING_JOBS there is column SESSION_ID and when you know your session ID build query is very simple.
    select owner, job_name
    into ...
    from dba_scheduler_runnig_jobs
    where session_id=sys_context('USERENV','SESSIONID');
    You must declare local variables in PL/SQL procedure to read owner and job_name into them. Second thing, you must handle possible exception no_data_found than can be raised when procedure is not run from job.

Maybe you are looking for