Connection String example required using ODAC 10.2

Hi All,
Apologies if this has already been covered...
I have a .net app running on W2K3 SP2 x86. It uses an Oracle 10G (10.2.0.4) database backend running on Redhat Linux x86_64.
I have two oracle client homes on the app server; one for full admin (10.2.0.4), the other for ODAC 10.2.0.2. The default home is the ODAC client.
Normally, I would use the following conn string in my web.config;
Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS =(PROTOCOL=TCP)(HOST=MYHOST.MYDOMAIN.LOCAL)(PORT = 1521)))(CONNECT_DATA = (SERVICE_NAME=MTDB)));User ID=MY_USER;Password=MYPASSWORD;
This works just fine. But now, I have a requirement to use Kerberos authentication.
I have configured Kerberos for the database, client and Active Directory successfully and have verified all the parameters and that I can connect to the database using the Windows credential successfully - well, at least from the Full Admin home. I have mirrored config changes the ODAC home (obviously updating any absolute file path references).
However, now I need to update the above connection string in web.config to use Kerberos. This is where I am struggling... Can anyone provide me with an example? I have not made any changes to web.config yet.
Many thanks, Richard.

Ok - I didn't need to raise a ticket with Oracle. Trial and error resolved this.
1. If you are using IIS, then you need to ensure that the identity account for the App Pool is set to the same credential used to authenticate against the database (in much the same way as one would for authenticating against a sql database). Remember to add the credential to the IIS_WPG group on the app server.
2. For the Website properties / Directory Security tab; depending on your requirements, enable/disable anonymous access tick-box and the Integrated Windows Security tick-box. I am not using Single Sign-ON for the application yet, so I enabled the anonymous access tick-box and set the credential to match the database credential.
3. If you are using a FULL ADMIN Oracle client home, then use this connection string "Data Source=MyDatabaseName; Integrated Security=SSPI;"
If you are using ODAC, then use this connection string "Data Source=MyDatabaseName; User Id=/;"

Similar Messages

  • How to create dynamic connection string with variables using ssis.

    Hello,
    Can anyone let me know on how to create dynamic connection string with variables using ssis?
    Any help would be appreciated.

    Hi vinay9738,
    According to your description, you want to connect multiple database from multiple servers using dynamic connection.
    If in this case, we can create a Table in our local database (whatever DB we want) and load all the connection strings.  We can use Execute SQL Task to query all the connection strings and store the result-set in a variable of object type in SSIS package.
    Then use ForEach Loop container to shred the content of the object variable and iterate through each of the connection strings. And then Place an Execute SQL task inside ForEach Loop container with the SQL statements we have to run in all the DB instances. 
    For more details, please refer to the following blog:
    http://sql-developers.blogspot.kr/2010/07/dynamic-database-connection-using-ssis.html
    If there are any other questions, please feel free to let me know.
    Regards,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Unable to connect using connect string in linus using sys user in Linux

    Hi,
    I am facing problem in using connect string while connecting as sys user in Linux OS
    For example:
    When I am connecting as
    sys/sysoracle as sysdba its getting connected.
    But when I am providing the connect string such as sys/sysoracle@TEST as sysdba its showing with error as:
    ORA-12505: TNS :listener does not currently know of SID in connect descriptor
    Any help will be benefitial for me
    Thanks and Regards

    >
    ORA-12505:
    TNS:listener does not currently know of SID given in connect descriptor
    Cause:     The listener received a request to establish a connection to a database or other service. The connect descriptor received by the listener specified a SID for an instance (usually a database instance) that either has not yet dynamically registered with the listener or has not been statically configured for the listener. This may be a temporary condition such as after the listener has started, but before the database instance has registered with the listener.
    Action:     
    - Wait a moment and try to connect a second time.
    - Check which instances are currently known by the listener by executing: lsnrctl services <listener name>
    - Check that the SID parameter in the connect descriptor specifies an instance known by the listener.
    - Check for an event in the listener.log file.>
    So are you sure that TEST is a right connection string that you are using and is rightly configured?
    HTH
    Aman....

  • Creating an Oracle connection in Net WCF using ODAC causes Exception

    Why am I getting a 'System.TypeInitializationException' when I create an Oracle connection in my .Net WCF web service?
    =========================================================================
    I'm currently working on implementing a WCF service which talks to an Oracle 10g database on the backend. When I attempt to connect to the database from within my service, I get the following exception: System.TypeInitializationException.
    •I'm running on a windows 7 (64 bit machine).
    •I'm using VS 2010.
    •I'm using Oracle 10g on the backend.
    I'm the Oracle.DataAccess.dll (ODP.Net) from the following installed instance
    c:\oracle\product\10.2.0\.....\ODP.NET\bin\1.x\Oracle.DataAccess.dll
    •I've included this DLL in the references for my WCF service.
    •I've included this service as a project within my VS WPF solution.
    •The service starts up automatically when I start my WPF application in VS 2010.
    At runtime I see the following output in my debug output window:
    'WcfSvcHost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\assembly\GAC\Oracle.DataAccess\1.102.2.20__89b483f429c47342\Oracle.DataAccess.dll' A first chance exception of type 'System.TypeInitializationException' occurred in Oracle.DataAccess.dll
    Sure enough, I look at the exception details in the debugger and I see the following information (this occurs when I attempt to create a new ORACLE connection):
    "The type initializer for 'Oracle.DataAccess.Client.OracleConnection' threw an exception." InnerException {"The provider is not compatible with the version of Oracle client"} System.Exception {Oracle.DataAccess.Client.OracleException}
    A Little Background:
    I'm basically migrating my data layer to a WCF service. The same service layer previously existed in a WinForm application. Everything works fine in my WinForm application. I include the same reference to the Oracle.DataAccess.dll and all my reads/writes with the database work fine.
    Is there something obviously different between the WCF and WinForm access/use of the DLL? Is there some limitation I'm unaware of? Is there an issue running this through VS2010 in the debugger?
    I have absolutely no idea what is going on here. Any hints/direction would be greatly appreciated.

    It's certainly possible to install .NET 1.x on the machine while still using VS 2010, but MS does not support and most likely never tested this combination. Running .NET Framework 1.x on Windows 7 also is not supported. I didn't know you had successfully used this combination previously. Nonetheless, it's good to be on a supported combination that has been certified by MS and Oracle if you run into a problem.
    I had another reason to ask you to upgrade to ODP.NET 11.2 As it will be the last version installed, ODP.NET's unmanaged DLLs will appear in your PATH first. The error you see is typical when ODP.NET from one version tries to use DLLs from another Oracle instance installed on your machine.
    If that doesn't work, set the DllPath setting in your web.config file to the BIN directory of your newly installed Oracle Client. Here's an example of that:
    http://docs.oracle.com/cd/E20434_01/doc/win.112/e23174/featConfig.htm#sthref109

  • Adworker using wrong JDBC connect string during upgrade to 12.1.3

    Our env
    APPS - 12.1.2 - running on SLES 11
    DB 11.2.0.3 - running on IMB System z
    We cloned PROD to a new host (instance was previously on DB host - debsdb01 and app host debsap03)
    The clone was made to debsdb04 - and app was reconfigured on debsap03
    I got the app to start up and run before taking it down to apply the 12.1.3 patch.
    However, in the process of the 12.1.3 patch, I see the following entry in the ADworker log files.
    JDBC connect string from AD_APPS_JDBC_URL is
    (DESCRIPTION=(ADDRESS_LIST=(LOAD_BALANCE=YES)(FAILOVER=YES)(ADDRESS=(PROTOCOL=tcp)(HOST=hostname1.companyname.com)(PORT=1549)))(CONNECT_DATA=(SID=DEV3)))
    where as it should be
    JDBC connect string from AD_APPS_JDBC_URL is
    (DESCRIPTION=(ADDRESS_LIST=(LOAD_BALANCE=YES)(FAILOVER=YES)(ADDRESS=(PROTOCOL=tcp)(HOST=hostname4.companyname.com)(PORT=1535)))(CONNECT_DATA=(SID=DEV3)))
    If I do an echo $AD_APPS_JDBC_URL on debspap03, it returns
    JDBC connect string from AD_APPS_JDBC_URL is
    (DESCRIPTION=(ADDRESS_LIST=(LOAD_BALANCE=YES)(FAILOVER=YES)(ADDRESS=(PROTOCOL=tcp)(HOST=hostname4.companyname.com)(PORT=1535)))(CONNECT_DATA=(SID=DEV3)))
    Where are the ADWORKERS getting the old value of the DB host name?
    Any help would be appreciated.
    Thanks
    Edited by: 864641 on Sep 16, 2012 7:32 AM

    I believe figured out what the issue was.
    I was (am) running the patch session from a VNC session that was established during the previous version of this instance - so the previous connect string was being used.
    Once I killed the old VNC session and established a new one, I was able to retrieve the correct value for $AD_APPS_JDBC_URL from the command prompt.
    Yes - the value of the $AD_APPS_JDBC_URL was showing the old value in the old VNC session.
    Thanks for all of your input esp on a Saturday - when I thought I would have to wait until Monday to get this figured out.

  • Connection string problem

    I am connecting to Oracle 11g from MFC application using CDatabase class. I need DSN less connection.
    I downloaded 64-bit ODAC 12c Release 1 (12.1.0.1.0) for Windows x64 from oracle.com. These contain 64-bit Oracle ODBC Driver 12.1.0.1.0.
    Using this driver, I am able to connect to Oracle using TNS service. This works fine. Following is the connection string,
    "Driver=Oracle in OraClient12Home1;Dbq=ORCL2;Uid=system;Pwd=manager"
    But if I try connect using hostname, port, database name, it gives error. Following is the connection string I am using,
    "Driver={Oracle in OraClient12Home1};Uid=system;Pwd=pass1;Server=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=xyz)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=ORCL)(SERVER=DEDICATED)));"
    I want to connect without using TNS service. Is it possible? Is there something wrong?
    Thanks.

    user9534250 wrote:
    I am connecting to Oracle 11g from MFC application using CDatabase class. I need DSN less connection.
    I downloaded 64-bit ODAC 12c Release 1 (12.1.0.1.0) for Windows x64 from oracle.com. These contain 64-bit Oracle ODBC Driver 12.1.0.1.0.
    Using this driver, I am able to connect to Oracle using TNS service. This works fine. Following is the connection string,
    "Driver=Oracle in OraClient12Home1;Dbq=ORCL2;Uid=system;Pwd=manager"
    But if I try connect using hostname, port, database name, it gives error. Following is the connection string I am using,
    "Driver={Oracle in OraClient12Home1};Uid=system;Pwd=pass1;Server=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=xyz)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=ORCL)(SERVER=DEDICATED)));"
    I want to connect without using TNS service. Is it possible? Is there something wrong?
    Thanks.
    ERROR? What Error?
    I don't see any error.

  • VS2010, Entity Framework, and TNS Less connection strings

    I am playing around with the Oracle 11g ODP.NET stuff and the Visual Studio 2010 integration. I am trying to create and entity data model, but I am connecting to a RAC cluster with a TNS Less connection string (Example at bottom). Previously I've had to use Oracle's OLE DB drivers to connect, however I would love to be able to leverage the Entity Framework in my next project. When I go to create a new connection in my VS project, the Connection Properties dialog pops up with option to choose the Data Source. I choose Oracle, but then I don't see a way to connect in the way that I have to. Any help would be appreciated. Thank you.
    Connection String Example:
    Data Source=(DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = someHost.prod.someDomain.net)(PORT = 9991)) (ADDRESS = (PROTOCOL = TCP)(HOST = someHost2.prod.someDomain.net)(PORT = 9991)) (ADDRESS = (PROTOCOL = TCP)(HOST = someHost3.prod.someDomain.net)(PORT = 9991)) (ADDRESS = (PROTOCOL = TCP)(HOST = someHost4.prod.someDomain.net)(PORT = 9991)) (LOAD_BALANCE = yes) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = myService.myDomain.com)));User Id=myUser;Password=myPassword;

    Hello cshay, you're right, I had the wrong version installed. I'm sure I selected the beta first, but I suppose I downloaded the stable version after creating my Oracle account.
    Thanks cshay, and sorry to bother you all with such a question!

  • Provider Connection String and Extended Protection

    Good morning,
    I have an application which by default uses OLEDB as Provider in the Connection String and I cannot change this. The Connection String that it uses is the following:
    "Provider=SQLOLEDB.1;Data Source=ServerName;Initial Catalog=DatabaseName;Persist Security Info=False;Integrated Security=SSPI"
    The database server (SQL Server 2012) and the client application are placed in two different computers but in the same domain. 
    The problem is that I cannot connect to the server from the application when I configure the SQL with Force Encryption On and Extended Protection as Required or Allowed. If I disable Force Encryption, then the connection works (Extended protection as Required
    and Allowed). This happens when I use Windows Authentication, with SQL Server Authentication there is no problem.
    I've tried to use this connection string in a Visual Basic script and it doesn't work either. But when I change the provider to "Provider=SQLNCLI11" then it works (with Force Encryption On, Extended Protection as Required/Allowed, and using Windows
    Authentication).
    With SQL Server Management Studio everything works fine.
    Anyone can explain me the reason why this happens? and if is there a solution?
    Thank you!

    public static void DoTestDbOracle()
    // OracleConnection takes the settings from TNSNAMES.ORA
    OracleConnection connOracle = new OracleConnection("SERVER=FRED.WORLD;PWD=uFRED;UID=pFRED");
    String strSQL = "SELECT DISTINCT MARKET_ID, SWITCH_NO, CELL_ID, SECTOR_ID FROM FRED_TABLE";
    connOracle.Open();
    OracleCommand cmdOracle = new OracleCommand(strSQL, connOracle);
    OracleDataReader rdrOracle = cmdOracle.ExecuteReader();
    while (rdrOracle.Read())
    Console.WriteLine("{0:G}-{1:G}-{2:G}-{3:G}",
    rdrOracle["MARKET_ID"],
    rdrOracle["SWITCH_NO"],
    rdrOracle["CELL_ID"],
    rdrOracle["SECTOR_ID"]);
    connOracle.Close();
    }

  • Error connecting to PTG repo using service designer.

    I am trying to login into my ptg repousing service designer but have problems.i have install 9ias on a different server and my db on server. this is the message i get back.
    oracle.panama.pasm.PASMException: Exception creating connection to: ERIC; nested exception is:
    java.net.SocketException: connect (code=10061)
    at oracle.panama.pasm.ConnectAction.connect(ConnectAction.java:148)
    at oracle.panama.pasm.PASM$1.windowOpened(PASM.java:439)
    at java.awt.AWTEventMulticaster.windowOpened(Unknown Source)
    at java.awt.Window.processWindowEvent(Unknown Source)
    at javax.swing.JFrame.processWindowEvent(Unknown Source)
    at java.awt.Window.processEvent(Unknown Source)
    at java.awt.Component.dispatchEventImpl(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Window.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at java.awt.EventDispatchThread.pumpOneEventForComponent(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForComponent(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.run(Unknown Source)
    oracle.panama.PanamaException: Exception creating connection to: ERIC; nested exception is:
    java.net.SocketException: connect (code=10061)
    oracle.panama.PanamaException: Exception creating connection to: ERIC; nested exception is:
    java.net.SocketException: connect (code=10061)
    at oracle.panama.core.rmi.client.RMIServer.createModelConnection(RMIServer.java:54)
    at oracle.panama.pasm.ConnectAction.connect(ConnectAction.java:184)
    at oracle.panama.pasm.ConnectAction.rmiConnect(ConnectAction.java:178)
    at oracle.panama.pasm.ConnectAction.connect(ConnectAction.java:142)
    at oracle.panama.pasm.PASM$1.windowOpened(PASM.java:439)
    at java.awt.AWTEventMulticaster.windowOpened(Unknown Source)
    at java.awt.Window.processWindowEvent(Unknown Source)
    at javax.swing.JFrame.processWindowEvent(Unknown Source)
    at java.awt.Window.processEvent(Unknown Source)
    at java.awt.Component.dispatchEventImpl(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Window.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at java.awt.EventDispatchThread.pumpOneEventForComponent(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForComponent(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.run(Unknown Source)
    java.rmi.ConnectIOException: Exception creating connection to: ERIC; nested exception is:
    java.net.SocketException: connect (code=10061)
    java.rmi.ConnectIOException: Exception creating connection to: ERIC; nested exception is:
    java.net.SocketException: connect (code=10061)
    java.net.SocketException: connect (code=10061)
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    at java.net.PlainSocketImpl.doConnect(Unknown Source)
    at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
    at java.net.PlainSocketImpl.connect(Unknown Source)
    at java.net.Socket.<init>(Unknown Source)
    at java.net.Socket.<init>(Unknown Source)
    at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(Unknown Source)
    at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(Unknown Source)
    at sun.rmi.transport.tcp.TCPEndpoint.newSocket(Unknown Source)
    at sun.rmi.transport.tcp.TCPChannel.createConnection(Unknown Source)
    at sun.rmi.transport.tcp.TCPChannel.newConnection(Unknown Source)
    at sun.rmi.server.UnicastRef.newCall(Unknown Source)
    at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
    at java.rmi.Naming.lookup(Unknown Source)
    at oracle.panama.core.rmi.client.RMIServer.createModelConnection(RMIServer.java:50)
    at oracle.panama.pasm.ConnectAction.connect(ConnectAction.java:184)
    at oracle.panama.pasm.C onnectAction.rmiConnect(ConnectAction.java:178)
    at oracle.panama.pasm.ConnectAction.connect(ConnectAction.java:142)
    at oracle.panama.pasm.PASM$1.windowOpened(PASM.java:439)
    at java.awt.AWTEventMulticaster.windowOpened(Unknown Source)
    at java.awt.Window.processWindowEvent(Unknown Source)
    at javax.swing.JFrame.processWindowEvent(Unknown Source)
    at java.awt.Window.processEvent(Unknown Source)
    at java.awt.Component.dispatchEventImpl(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Window.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at java.awt.EventDispatchThread.pumpOneEventForComponent(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForComponent(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.run(Unknown Source)
    some body help
    thanks.

    What is the connect string you are using to connect Service Designer, e.g. "Localhost"? See my reply to an earlier question in this forum.

  • Parent Variable Configuration - Passing Connection strings..

    I have one parent package and a few child packages. I am using SQL Server 2008 R2.
    I want to pass variables from Parent Package containing Connection String and other data to the child package. I created few variables in parent package e.g. ParentConnectionString & child package e.g. ChildConnectionString. I set the child package variables
    using Package Configurations > Configuration Type = Parent package variable and map the ChildConnectionString value to ParentConnectionString.
    I have put a script component that displays variables value set in the child package from parent package.
    In child package i have a Connection of ConnectionManagerType = OLEDB. I have added an expression to set the ConnectionString using the ChildConnectionString.
    When i run the parent package during the validation phase, it calls the child package. The script component displays the values are being set in child package from parent package but after that it fails saying  - invalid username/password; logon denied.
    I suspect that the connectionstring expression are going to be executed at run time and not at validation time.
    If i put the complete connection string in ChildConnectionString it works fine.
    I am not sure if i am doing anything wrong?

    It could be that you simply need to put the DelayValidation property to True.
    Thing is, when the package starts it validates itself; but at this time the design time connection string property is used, whereas the "real" conn string has been designed to come at a later - runtime, hence you need to set the DelayValidation to true to
    make the package not checking the connectivity in advance, and thus successfully start.
    Arthur My Blog

  • Opening a new form using a different connect string

    Hi All
    I have the following requirement. I want to open an new form (when button pressed) using a different connect string. I am planning to use open form so that the new form has its own session. But I donot want the new form to connect to the same database. How do I pass the database that I want to connect using open form.
    Rgds
    Arvind Balaraman

    The only way to change the connection is to execute the built-in LOGIN and connect to the desired database. You cannot pass this through the OPEN_FORM built-in.
    Example:
    LOGOUT;
    LOGON(uname, upass || '@' || conn_str);
    However, be aware that this will impact the first form too. This is expected behavior.
    See Oracle Bug 5004661 or the Forms Online Help for more details.
    http://www.oracle.com/webapps/online-help/forms/10g/state?navSetId=_&navId=3&vtTopicFile=designing_forms/multform_db/at0505.html

  • The connection string for coded UI Data driven test using excel data source is not working

    Hello,
    I am using the visual studio 2012 coded UI test, i added the following connection strings to connect to an excel data source:
    [DataSource("System.Data.Odbc", "Dsn=Excel Files;Driver={Microsoft Excel Driver (*.xls)};dbq=C:\\Users\\shaza.said.ITWORX\\Desktop\\Automation\\On-track Automation Framework\\On-track_Automation\\Automation data file.xls;defaultdir=.;driverid=790;maxbuffersize=2048;pagetimeout=5;readonly=true",
    "Sheet1$", DataAccessMethod.Sequential), TestMethod]
    [DataSource("System.Data.Odbc", "Dsn=Excel Files;dbq=|DataDirectory|\\Automation data file.xls;defaultdir=C:\\Users\\shaza.said.ITWORX\\Desktop\\Automation\\On-track Automation Framework\\On-track_Automation\\Automation data file.xls;driverid=1046;maxbuffersize=2048;pagetimeout=5",
    "Sheet1$", DataAccessMethod.Sequential), TestMethod]
    But i get the following error:
    "The unit test adapter failed to connect to the data source or to read the data. For more information on troubleshooting this error, see "Troubleshooting Data-Driven Unit Tests" (http://go.microsoft.com/fwlink/?LinkId=62412) in the MSDN Library.
    Error details: ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified"
    Thanks,
    Shaza

    Thanks for Adrian's help.
    Hi shaza,
    From the error message, I suggest you can refer the Adrian's suggestion to check the date source connection string correctly.
    In addition, you can refer the following about how to Create a Data-Driven Coded UI Test to check your issue:
    http://msdn.microsoft.com/en-us/library/ee624082.aspx
    Or you can also try to use a Configuration File to Define a Data Source for coded UI test.
    For example:
    <?xml
    version="1.0"
    encoding="utf-8"
    ?>
    <configuration>
    <configSections>
    <section
    name="microsoft.visualstudio.testtools"
    type="Microsoft.VisualStudio.TestTools.UnitTesting.TestConfigurationSection,
    Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
    </configSections>
    <connectionStrings>
    <add
    name="ExcelConn"
    connectionString="Dsn=Excel Files;dbq=E:\Unit Test\AddClass\AddUnitTest\add.xlsx;defaultdir=.;
    driverid=790; maxbuffersize=2048; pagetimeout=60;"
    providerName="System.Data.Odbc"/>
    <add
    name="ExcelConn1"
    connectionString="Dsn=Excel Files;dbq=E:\Unit Test\AddClass\AddUnitTest\sum.xlsx;defaultdir=.;
    driverid=790;maxbuffersize=2048;pagetimeout=60"
    providerName="System.Data.Odbc"/>
    </connectionStrings>
    <microsoft.visualstudio.testtools>
    <dataSources>
    <add
    name="ExcelDS_Addition"
    connectionString="ExcelConn"
    dataTableName="Addition$"
    dataAccessMethod="Sequential"/>
    <add
    name="ExcelDS_Multiply"
    connectionString="ExcelConn1"
    dataTableName="Multiply$"
    dataAccessMethod="Sequential"/>
    </dataSources>
    </microsoft.visualstudio.testtools>
    </configuration>
    For more information, please see:https://msdn.microsoft.com/en-us/library/ms243192.aspx
    Best Regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Connect to Azure SQL DB with Security Enabled Access required using SSMS

    I'm looking to connect to an Azure SQL DB with Security Enabled Access required using SQL Server Management Studio 2014. I have tried checking off "Encrypt connection", but still errors out with "Cannot open database 'db name' on server 'hostname'
    requested by the login. Access to the database is only allowed using a security-enabled connection string."
    Thanks,
    Scott

    Hi Scott,
    Sorry, I missunderstood your initial question and the documentation I referenced is not updated appropriately. You have to change the connection string to <server-name>.database.secure.windows.net when you enable the security/auditing features.
    Documentation for this can be found
    here
    Thanks,
    Jan

  • How to build a connection string if "Only variable names (i.e.: $variable) may be used as the target of an assignment statement."

    im looping through databases on a server & building  a connection string to each database.
    $SQLConn.ConnectionString = "Server=$SrvName; Database=$DBName; User ID =DBLogin; Password=myPassword;"
    The problem is i get this error:
    Only variable names (i.e.: $variable) may be used as the target of an assignment statement
    I can put the code into an Inlinescript, but then I lose the ability to perform paralellism. Is there any way to construct the connection string in PS Workflow without using an Inlinescript?

    Hi Winston,
    Why not just wrap the InlineScript blocks in a Parallel block, to cause them to execute in parallel?
    For example:
    workflow foo {
    parallel {
    inlinescript {
    start-sleep -Seconds (Get-Random -Minimum 1 -maximum 5)
    "a"
    inlinescript {
    start-sleep -Seconds (Get-Random -Minimum 1 -maximum 5)
    "b"
    Sometimes outputs "a b" and sometimes outputs "b a"

  • How to create SQL Connections String using JSP

    Hi, Dear I wrote sample Jsp program(Create a table and Inserted to Table) using SQLConnection
    I got this Error, how to rectify please help me?
    This is my Connection String
    <%
    String driver = "com.microsoft.sqlserver.jdbc.SQLServerDriver";
         Class.forName(driver).newInstance();
         Connection con=null;
         ResultSet rst=null;
         Statement stmt=null;
         try
              String url=java.sql.DriverManager.getConnection("jdbc:sqlserver://10.1.5.6:1433;Database=manickaraj;User=sa; Password=test*");
              con=DriverManager.getConnection(url);
              stmt=con.createStatement();
         catch(Exception e)
    System.out.println(e.getMessage());
         if(request.getParameter("action") != null)
              String CategoryName=request.getParameter("Category1");
              String Description=request.getParameter("Description1");
    String Status=request.getParameter("Status1");
              stmt.executeUpdate("insert into Category(CategoryName,Description) values('"+CategoryName+"','"+Description+"','"+Status+"')");
              rst=stmt.executeQuery("select * from Category");
    %>
    org.apache.jasper.JasperException: Unable to compile class for JSP
    An error occurred at line: 5 in the jsp file: /CategoryAction.jsp
    Generated servlet error:
    C:\Documents and Settings\manickaraj\.netbeans\5.5\apache-tomcat-5.5.17_base\work\Catalina\localhost\SampleJsp\org\apache\jsp\CategoryAction_jsp.java:61: incompatible types
    found : java.sql.Connection
    required: java.lang.String
    An error occurred at line: 5 in the jsp file: /CategoryAction.jsp
    Generated servlet error:
              String url=java.sql.DriverManager.getConnection("jdbc:sqlserver://10.1.2.4:1433;Database=manickaraj;User=sa; Password=test*");
              ^
    1 error
         org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:368)

    package shop;
    import java.sql.*;
    import java.sql.Connection;
    import java.sql.SQLException;
    import java.sql.Statement;
    import javax.naming.InitialContext;
    import javax.sql.DataSource;
    public class DAClass {
         private static Connection conn;
         private static ResultSet rs;
         private static PreparedStatement ps;
         public static void connect(String dsn, String un, String pwd) {
              try {
                   //access or Mysql odbc connectivity
                   //Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                   //conn=DriverManager.getConnection("jdbc:odbc:"+dsn,un,pwd);
                   //mysql
                   //Class.forName("com.mysql.jdbc.Driver");
                   //conn=DriverManager.getConnection("jdbc:mysql://127.0.0.1:3306/eshop?user=root&password=root");
                InitialContext ctx = new InitialContext();
         DataSource ds = (DataSource) ctx.lookup("jdbc/eshop");
          conn = ds.getConnection();
         //DataSource ds = (DataSource)ctx.lookup("java:comp/env/jdbc/MySQLDB")
              catch(Exception e) {
                   //return "not soory";
         public static boolean chkPwd(String un, String pwd) {
              try {
                   boolean b=false;
                   ps=conn.prepareStatement("select * from cust_info where cust_name=? and cust_pwd=?");               
                   ps.setString(1,un);
                   ps.setString(2,pwd);
                   rs=ps.executeQuery();
                   while(rs.next()) {
                        b=true;
                   return b;
              catch(Exception e) {
                   return false;
    }changed the code like this other part is same.implemented connection pooling but still its too lazy loding can you guide me?

Maybe you are looking for

  • HT4897 How can I change my @me email address to a @icloud email address?

    How can I change my @me email address to a @icloud email address?

  • Forms6i - Search by hours, or minutes in Date Format.

    Hi All: Is it possible to search by hours,minutes, or seconds in the date format? I've tried the below SQL but it doesn't work. SELECT to_char(start_date, 'MM/DD/YY HH24:MI:SS') start_date FROM table_name WHERE start_date like '%05%'; It returns no r

  • Kernel Panics : Office for Mac or Safari ?

    Hi everyone, Happy New Year 2015 for a start ! I have been experiencing Kernel panics with my mac book pro mid 2010radomly for a few months now but I am not very good in reading the reports provided once the mac reboots. I observed that Powerpoint an

  • HT201372 The copy of the installer app failed.

    I'm trying to create a USB bootable with Yosemite, but the process doesn't complete. I launched the command from terminal as explained here  /Applications/Install\ OS\ X\ Yosemite.app/Contents/Resources/createinstallmedia --volume /Volumes/YOSEMITE/

  • Blue font in document need to print black

    Hello, need to print an Adobe Reader 8.1.2 where the font is in blue. When I print the blue text is way too light and I can't read it. How to either change the font to black in the document or print the blue font in black? TIA Gi