Changing Database connection on webservice deployment

Hi All,
I am having a problem changing the Database connection when deploying a PL/SQL generated webservice.
What I have done is to use the WebService wizard to create a webservice based on a database Pl/SQL procedure. During this you have to specify the database connection (which initially is our dev server).
When I come to deploy the service to our production platform I want to change the database descriptor name to point to an existing App Server data source.
This is the problem - the Database Connection information is protected in the properties of the webservice - which means I cannot deploy to our production platform with the connection names I need.
I can change the names of the Connections defined in the Connections tab - but then I cannot access the webservice in JDev.
Everytime I deploy to our production platform I keep getting the development data sources created.
Basically I need to develop a PL/SQL webservice using a Development connection (with a unique connection name), and then deploy to a production application server (10g AS) with a different connection name that points at our production env.
I could create generic names, but that then would make my development system very confusing with the potential of messing up the production platform.
Anyone got any ideas????
Thanks and Regards
Neil

When you deploy the web service to the app server, if the connection to the other database is available from JDev at deployment time, the data sources xml file should be set up correctly with the db connection info. Otherwise this will have to be modified by hand on the app server to contain the connection details for the other DB.
There are 3 files that will also have to be hand modified to reflect the different db connection details. 2 deployment descriptors, web.xml and oracle-webservices.xml which have references to the connection's jndi name, and also one of the JPublisher generated classes (the one whose name ends in 'Base') also has references to the jndi name (to look up the connection from the data source file) which will have to be modified, recompiled and redeployed.
The simplest way to change the connection would actually be to leave everything alone and just modify the data sources xml file on the server such that the same jndi lookup points to a new connection, but it looks like the customer wants to change the name as well.
An alternative to all this hand editing is to regenerate the service against the producion DB connection, test & then deploy the service.
dai
JDev devt. team

Similar Messages

  • Change database connection for FRS Report

    currently we are using ASO BSO model and all FRS reports are retrieve against BSO Database.Now we are converting to ASO only model. can i use the same report against ASO database .
    There is a option of chang database connection under tool in workspace . will this work or do i have to make all reports again
    can you please help me with this
    thank you

    IN some cases even if the report has additional dimensions it will work. After you change the connection. Open the report in designer. The new dimensions will automatically update. Save the report and you should be good to go. If dimensionality is exactly the same you don't even have to do that, just change the connection, point ot the new database and run the report.

  • Changing database connection details aftre WAR file deployment

    Hello,
    I create a WAR deployment file and distribute this to a Tomcat web container. The package unpacks as expected however the production database details are different from my devlopment environment. The database connection name is the same. I thought if I simply change the connection details in the connections.xml file and restart the web app this would do the trick. It does not. What am I missing?

    Maybe your application is using a connection as defined in data-sources.xml. Check there.

  • Changing Database connection at runtime in CR2008

    Hi,
    I have a VS2008 application which is using CR2008 to generate pdf reports for the user. Problem is I am not able to change the database connection to any server other than the one that was used to create the report template.
    My environment has CR2008 SP2. I have tried reports with no paramter as well as the ones with parameters both dont seem to work.
    I have already tried a couple of things:
    a) report document refresh after loading it
    b) setting the database connection as
    this._crReport.DataSourceConnections[0].SetConnection(dbServerName, dbName, dbUserId, dbPwd);
    c) setting the database connection as
    tbls = this._crReport.Database.Tables;
                    bool test = false;
                    foreach (Table tbl in tbls)
                        tblLogonInfo = tbl.LogOnInfo;
                        tblLogonInfo.ConnectionInfo = connInfo;
                        tbl.ApplyLogOnInfo(tblLogonInfo);
                        test = tbl.TestConnectivity(); ** note this alwys return a true for the changed database server
    I have read a couple of thread but none has worked for me...Is this a known issue with CR2008?
    Thanks
    Kajal

    Hi Kajal,
    I am assuming that you are not changing the schema of the report at any point of time. I would suggest you to try pointing to the other database through designer to make sure that you can hit the database and the schema is correct. You can also create a udl file to check the database connectivity.
    Then just for testing purpose you can try the following code:
    ReportDocument reportDoc = new ReportDocument();
    reportDoc.Load("path of the report");
    reportDoc.SetDatbaseLocation("uid","pwd","Servername","tablename");
    reportDoc.SetParameterValues("Parameter-Name","values");
    CrystalReportViewer.ReportSoure=reportDoc;
    Does that help?
    Thanks.

  • Changing database connection at runtime

    Hi All,
    I have multiple screens based from different database instances. How can I make a single menu screen which will allow log in for another database connection? I tried using the LOGIN_SCREEN built in but it does not change the connection once you are already connected to one database.

    If you want to change connections, you first have to logout. Besides the logon_screen builtin does not change the connection, but it only sets several application properties.
    In the Forms Help there is an example how to use the logon_screen. It basically comes to the next pl/sql code:
    declare
    MyUsername VARCHAR2(40);
    MyPassword VARCHAR2(40);
    MyConnect VARCHAR2(40);
    begin
    logon_screen;
    MyUsername := Get_Application_Property(USERNAME);
    MyPassword := Get_Application_Property(PASSWORD);
    MyConnect := Get_Application_Property(CONNECT_STRING);
    logout;
    if MyConnect is not null then
    logon(MyUsername,MyPassword| |'@'| |MyConnect);
    else
    logon(MyUsername,MyPassword);
    end if;
    end;
    null

  • Change database connection in SQL-Worksheet to a not connected db

    Hi,
    change the active database connection of a SQL-Worksheet to a currently not connected database does not work. The login window pops up, but the password entry field cannot be activated to enter the password. On dragging the login window the screen does not get refreshed correctly. The only way to get back to work is to kill the sqldeveloper.exe process.
    The affected version is 3.2.09.23 on the 32 bit MS Windows plattform.
    sincerely yours
    Matthias

    Hi Matthias,
    Thanks for reporting this. It is caused by a deadlock between Java threads. I will log a bug for it.
    Regards,
    Gary
    SQL Developer Team
    Edited by: Gary Graham on Aug 23, 2012 4:26 PM
    Bug 14532491 - FORUM - DEADLOCK OCCURS WHEN SWITCHING WORKSHEET CONNECTIONS
    Edited by: Gary Graham on Aug 23, 2012 4:27 PM
    Bug 14534488 - DEADLOCK OCCURS WHEN OPENING WORKSHEET CONNECTION FOR A SQL FILE

  • OBIEE 11g database connection error after deploying to server.

    Hi,
    I deployed RPD to obiee 11g server and when I run a report it is giving database connectivity error. In 10g we just specify OLAP_DSN, OLAP_USER and same in connection pool with database password. I did the same in 11g as well but it's not working.
    Is there any other place I need to specify database connection detail?
    Thanks
    Jay.

    coming with different names :) If you respond to your older threads will happy to respond you.
    When we answer your question we love to know how it helped you. we are not asking your $$$$$$$$$$$$$

  • Error when changing database connection

    I changed my connections.properties file to a database other than the one I used to develop my application. I was able to connect to the new database successfully from the application but when I tried to insert a new row I received the following error:
    JBO-26041: Failed to post data to database during "Insert". SQL Statement "BEGIN INSERT INTO ITEMS (ITEM_ID, ITEM_STATUS, CATEGORY, SOURCE_TYPE, IMAGE_TYPE) VALUES (:1,:2,:3,:4,:5) RETURNING ITEM_ID INTO :6; END;".
    ORA-06550: line 1, column 102: PLS-00103: Encountered the symbol "RETURNING" when expecting one of the following...
    Does anyone know what is causing this problem?
    Thanks,
    Joanna.
    null

    Your new database connection must be pointing to an older database which doesn't support the returning clause. I believe this was added in the 8.x series.
    Rob
    null

  • Dynamically Changing Database Connections Information

    Post Author: Robert Flaherty
    CA Forum: .NET
    USing Crystal 2008 and Visual Studio 2008 in C#:
    Below is the code that I am using to set the database connection at runtime.  This does not work when the Server/Database is different from the Server/Database that was used when the report was generated.  What happens is a dialog box appears with the original connection information,  The textbox for the server and the database are disabled.
    public partial class ViewOrder : Form
    string sqlStmt;
    public ViewOrder(string SqlStmt)
    InitializeComponent();
    GlobalVaribles gv = GlobalVaribles.Instance;
    sqlStmt=SqlStmt;
    ConnectionInfo connectionInfo = new ConnectionInfo();
    connectionInfo.ServerName = gv.Server;
    connectionInfo.DatabaseName = gv.Database;
    connectionInfo.UserID = gv.UserID;
    connectionInfo.Password = gv.Password;
    crystalReportViewer1.SelectionFormula = sqlStmt;
    string reportPath = Util.BuildFileName(gv.ReportPath, "Order001.Rpt");
    crystalReportViewer1.ReportSource = reportPath;
    crystalReportViewer1.ShowGroupTreeButton = true;
    crystalReportViewer1.EnableDrillDown = false;
    SetDBLogonForReport(connectionInfo);
    private void SetDBLogonForReport(ConnectionInfo connectionInfo)
    TableLogOnInfos tableLogOnInfos = crystalReportViewer1.LogOnInfo;
    foreach (TableLogOnInfo tableLogOnInfo in tableLogOnInfos)
    tableLogOnInfo.ConnectionInfo = connectionInfo;

    Post Author: Robert Flaherty
    CA Forum: .NET
    USing Crystal 2008 and Visual Studio 2008 in C#:
    Below is the code that I am using to set the database connection at runtime.  This does not work when the Server/Database is different from the Server/Database that was used when the report was generated.  What happens is a dialog box appears with the original connection information,  The textbox for the server and the database are disabled.
    public partial class ViewOrder : Form
    string sqlStmt;
    public ViewOrder(string SqlStmt)
    InitializeComponent();
    GlobalVaribles gv = GlobalVaribles.Instance;
    sqlStmt=SqlStmt;
    ConnectionInfo connectionInfo = new ConnectionInfo();
    connectionInfo.ServerName = gv.Server;
    connectionInfo.DatabaseName = gv.Database;
    connectionInfo.UserID = gv.UserID;
    connectionInfo.Password = gv.Password;
    crystalReportViewer1.SelectionFormula = sqlStmt;
    string reportPath = Util.BuildFileName(gv.ReportPath, "Order001.Rpt");
    crystalReportViewer1.ReportSource = reportPath;
    crystalReportViewer1.ShowGroupTreeButton = true;
    crystalReportViewer1.EnableDrillDown = false;
    SetDBLogonForReport(connectionInfo);
    private void SetDBLogonForReport(ConnectionInfo connectionInfo)
    TableLogOnInfos tableLogOnInfos = crystalReportViewer1.LogOnInfo;
    foreach (TableLogOnInfo tableLogOnInfo in tableLogOnInfos)
    tableLogOnInfo.ConnectionInfo = connectionInfo;

  • Changing database connection in bpel process

    Hi i have a problem and three different choices.
    Problem:
    i have an application made in oracle forms that calls an oracle bpel process and interacts with the database.
    the problem is that i have 3 differents databases with differents users to impact that form.
    i have already working that process in 1 database.
    I have three choices and only two are worthy.
    First choice:
    create 2 new process for each database from zero. (setting different string connections to the databases,so the form will call differents url depending on what database is in).
    second choice:
    create 2 new process by copying the first one and changing the process name and the string connection and the url connection (but dunno how to do this).
    third choice:
    Switch inside the process somehow between the 3 different string connections to different databases.
    The first one is not actually an option because the flow of the process is really large and have a huge amount of variables.
    If someone could help me i would really apreciate it. THANKS!

    what I understood is that your forms may call any of the 3 databases. give a try to Dynamic PartnerLink http://www.oracle.com/technology/pub/articles/bpel_cookbook/carey.html. You will have one parent process that will be called by the forms. Now this bpel process based on the parameters sent by form, will call any of the three bpel process pointing to three different databases.
    Please explain in further details if my understanding is wrong.

  • Change database connection string

    Hi, does anybody know if it possible (and eventyally how) to change the DB connection string of the farm (both WF and SB). I do not need to change DB or server, just a parameter of the connection string.
    Thanks,
    Simone

    The Connection string will be persisted in the config database as well as in the registry. I don't think there are any APIs to change it.
    This post is my own opinion and does not necessarily reflect the opinion or view of Slalom.

  • Allow users to change database connection at runtime

    Folks,
    CR 12.2.0.290
    BOE 12.1.0
    I develop CR on desktop and then save to the BOE repository.  Users need the ability to point the report to a different Oracle schema.  Tables and elements are the same, just the data is stored via streams so that each location has its own reporting schema.  So one (16 total) report needs to run against multiple schemas based on which origin the user is trying to report against; one at a time.  Other than having a set of reports for each site, how can I allow the users to select the schema to run against at runtime?
    Thanx
    Mike

    When you schedule a report with InfoView, there is a Database option where an ODBC connection, user and password can be specified.  Can this be used?  (I'm not familiar enough with Oracle to know for sure...  Also, this option doesn't show if the report uses Business Views.)
    HTH,
    Carl

  • Changing database server on a report with subreports = formula error

    Good morning,
    I currently have several reports that print out, and were developed attached to our development database. However, I need to be able to dynamically change the server that the report uses according to the server configured in our application. Each of these reports contains one or more subreports, which point to the same server and database as the main report. All reports, both the main and subreports, are based on manual SQL commands.
    I'm running into some significant issues. So significant, in fact, that we were forced to deploy our application with reports that had been switched to our production environment in the designer in order to get them functional. This is, obviously, not an acceptable or long-term solution.
    I've gone round and round a couple of times I get different results with different methods of changing this information. I'll outline them below. First, my current code:
    ConnectionInfo connectionInfo = new ConnectionInfo();
                    TableLogOnInfo logOnInfo = new TableLogOnInfo();
                    Console.WriteLine("Report \"{0}\"", report.Name);
                    foreach (Table table in report.Database.Tables)
                        logOnInfo = table.LogOnInfo;
                        connectionInfo = new ConnectionInfo(logOnInfo.ConnectionInfo);
                        connectionInfo.ServerName = "panthers-dev";
                        connectionInfo.DatabaseName = "Prosys";
                        logOnInfo.ConnectionInfo = connectionInfo;
                        //table.Location = "Prosys.dbo." + table.Location.Substring(table.Location.LastIndexOf(".") + 1);
                        table.ApplyLogOnInfo(logOnInfo);
                        table.LogOnInfo.ConnectionInfo = connectionInfo;
                        Console.WriteLine("\t\"{0}\": \"{1}\", \"{2}\", \"{3}\", {4}", table.Name, table.LogOnInfo.ConnectionInfo.ServerName, table.LogOnInfo.ConnectionInfo.DatabaseName, table.Location, table.TestConnectivity());
                    foreach (Section section in report.ReportDefinition.Sections)
                        foreach (ReportObject ro in section.ReportObjects)
                            if (ro.Kind == ReportObjectKind.SubreportObject)
                                SubreportObject sro = (SubreportObject)ro;
                                ReportDocument subreport = report.OpenSubreport(sro.SubreportName);
                                Console.WriteLine("\tSubreport \"{0}\"", subreport.Name);
                                foreach (Table table in subreport.Database.Tables)
                                    logOnInfo = table.LogOnInfo;
                                    connectionInfo = new ConnectionInfo(logOnInfo.ConnectionInfo);
                                    connectionInfo.ServerName = "panthers-dev";
                                    connectionInfo.DatabaseName = "Prosys";
                                    logOnInfo.ConnectionInfo = connectionInfo;
                                    //table.Location = "Prosys.dbo." + table.Location.Substring(table.Location.LastIndexOf(".") + 1);
                                    table.ApplyLogOnInfo(logOnInfo);
                                    table.LogOnInfo.ConnectionInfo = connectionInfo;
                                    Console.WriteLine("\t\t\"{0}\": \"{1}\", \"{2}\", \"{3}\", {4}", table.Name, table.LogOnInfo.ConnectionInfo.ServerName, table.LogOnInfo.ConnectionInfo.DatabaseName, table.Location, table.TestConnectivity());
    Using this approach, my console output prints what I expect and want to see: the correct server and database information, and True for TestConnectivity for all reports and subreports. The two reports I have that have no subreports print out correctly, with data from the proper server. However, all of the reports with subreports fail with formula errors. If this procedure is not run, they work just fine on either server.
    I had to place the assignment of table.LogOnInfo.ConnectionInfo = connectionInfo after the call to ApplyLogOnInfo, as that function did not behave as expected. If I perform the assignment first (or not at all), then calling ApplyLogOnInfo on the outer report's table did NOT affect the values of its ConnectionInfo object, but it DID affect the values of the ConnectionInfo object's of its subreports!
    In any event, if anyone could post a code sample of changing database connection information on a report containing subreports, I would appreciate it.
    Any help is greatly appreciated and anxiously awaited!

    Hi Adam,
    Code for changing database connection information on a report containing subreports :
    private ReportDocument northwindCustomersReport;
        private void ConfigureCrystalReports()
            northwindCustomersReport = new ReportDocument();
            string reportPath = Server.MapPath("NorthwindCustomers.rpt");
            northwindCustomersReport.Load(reportPath);
            ConnectionInfo connectionInfo = new ConnectionInfo();
            connectionInfo.ServerName = "localhost";
            connectionInfo.DatabaseName = "Northwind";
            connectionInfo.IntegratedSecurity = false;
            SetDBLogonForReport(connectionInfo, northwindCustomersReport);
            SetDBLogonForSubreports(connectionInfo, northwindCustomersReport);
            crystalReportViewer.ReportSource = northwindCustomersReport;
        private void Page_Init(object sender, EventArgs e)
            ConfigureCrystalReports();
        private void SetDBLogonForReport(ConnectionInfo connectionInfo, ReportDocument reportDocument)
            Tables tables = reportDocument.Database.Tables;
            foreach (CrystalDecisions.CrystalReports.Engine.Table table in tables)
                TableLogOnInfo tableLogonInfo = table.LogOnInfo;
                tableLogonInfo.ConnectionInfo = connectionInfo;
                table.ApplyLogOnInfo(tableLogonInfo);
        private void SetDBLogonForSubreports(ConnectionInfo connectionInfo, ReportDocument reportDocument)
            Sections sections = reportDocument.ReportDefinition.Sections;
            foreach (Section section in sections)
                ReportObjects reportObjects = section.ReportObjects;
                foreach (ReportObject reportObject in reportObjects)
                    if (reportObject.Kind == ReportObjectKind.SubreportObject)
                        SubreportObject subreportObject = (SubreportObject)reportObject;
                        ReportDocument subReportDocument = subreportObject.OpenSubreport(subreportObject.SubreportName);
                        SetDBLogonForReport(connectionInfo, subReportDocument);
    Hope this helps!!
    Regards,
    Shweta

  • Financial Report Database Connection

    Hello Guys,
    Is there any way to change the Financial Report Database Connection for multiple reports at a time?
    Thanks in Advance.
    Raz

    Try this (I am in HFM version 9.3.1)
    1) Put all the reports you want to change in the same folder
    From the web (Explore)
    2) When you go into Tools/Change Database Connections and get to the "Select Financial Documents to Change Database Connection" highlight all the reports you want changed.
    3)Click ok and then in the next screen change the connection.

  • Changing the Database connection after deployment.

    Dear All,
    I have deployed an application and want to change the connection to live database so how do i change it..
    Do i have to redeploy the application ?. Both db's are oracle.
    -Thanks

    Hi Santosh,
    As Frank said u can connect ur Application using a JDBC Datasource.. So u can change in ur Connection Settings in WLS... u can find the documentation as below....
    Section 9.3.1 http://download.oracle.com/docs/cd/E14571_01/web.1111/b31974/bcservices.htm#sm0203
    For Weblogic Server : Section 35.8 http://download.oracle.com/docs/cd/E12839_01/web.1111/b31974/deployment_topics.htm#CHDFJADJ
    Regards,
    Suganth.G

Maybe you are looking for

  • Calling different pages in a single sap script based on conditions?

    Hi All,          Can anyone please give me an example of how to call different pages in a single sap script based on condition. Eg., i need to call 5 differnet pages from a single sap script based on 5 company codes. Please help Regards Priya

  • LSMW - How to handle delimited records?

    Greetings everyone, I want to change infotype records with LSMW. I've done this with the use of a batch input recording. This works, but only when the record is not delimited. Otherwise, the first record is modified but an error is given for subseque

  • Enhancement for vl02n partner

    Hi Experts, I got a requirement to validate the partner function (header) in vl02n. I am searching for BADI. But I didnt found sutable BADI. Can anyone suggest me the enhancement. Requirement is : after providing the partner function like 'TU' and pa

  • IMovie or iDvd with USB2

    Is there a way import from a digital camera into imovie or iDvd through the USB 2 port and not firewire?

  • Change Locale

    Hi all, is it possible to change the locale of an WebDynPro applicatin after it was loaded? What I want is something like a dropdown-box with available locales, the user can then select one and the webdynpro gets reloaded. After that reload the whole