2 Replies Latest reply: Jun 12, 2013 2:04 AM by Stefan Jager RSS

    Oracle Connection String for ODP.NET with Workspace Manager

    rcx4009v2

      Hi,

       

      Is the an Oracle connection string format for Schemas with Workspace Manager and Version Enabled tables?

       

      Someting like:

       

      OracleConnection con = new OracleConnection();

      con.ConnectionString = "User Id=scott;Password=tiger;Data Source=oracle;Workspace=LIVE";

       

      Thanks

        • 1. Re: Oracle Connection String for ODP.NET with Workspace Manager
          davidp 2

          The connection string is exactly the same as for any other schema. You just connect to the schema that owns the versioned table, which is the schema that owned the table before versioning was enabled. On connection, you get the latest item from the LIVE workspace. To go to another workspace you have to call the DBMS_WM.GotoWorkspace('workspaceName') PL/SQL procedure.

           

          I don't think there is any other way to set the workspace for a connection.

          E.g. There's none listed for the .NET provider http://docs.oracle.com/html/E10927_01/featConnecting.htm#i1006259

          • 2. Re: Oracle Connection String for ODP.NET with Workspace Manager
            Stefan Jager

            davidp2 wrote:

            I don't think there is any other way to set the workspace for a connection.

            No, there isn't. There's no "automatic" way to go to a workspace when logging on. That said, you could build something yourself quite easily using an after logon trigger, which could issue a GoToWorkspace based on the user or other variables.

             

            If you have control over your .Net application, you could provide a pulldown with the available workspaces for the user when he or she is logging in with your application. But you'll have to do that seperately from your connection string.

             

            HTH,

            Stefan