.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

JDBC Connection using Dynamic Ports

Posted By:      Posted Date: September 28, 2010    Points: 0   Category :Sql Server

I have a sql cluster running 3 instances.One of the user is trying to connect to these instances using JDBC connectivity.We have configured to use Dynamic ports so the url with the default port is not working for us and I cannot change the port.Can you please plese let me know the URL for this.Also on the Surface Area Configuration Manager I sec Client Protocols ,How is this different from the Protocols for each instance.




View Complete Post

More Related Resource Links

SQL JDBC Connection timed out, please help, I am in urgent

Hi there, i am working on SQL JDBC 2005 version 1.1. I have a liferay portal database located at server 1, wsrp portlets' database located at server 2 (with instance name instance1). The producer (liferay) have to create a connection with server 2 (use connection string) to authenticate the consumer. If the registration properties is valid, then the consumer are able to consume the wsrp portlet. (Note that i use tomcat as web container)But when the producer connect to server 2, tomcat throws error:com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host  has failed. java.net.ConnectException: Connection timed out: connect    at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(Unknown Source)    at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(Unknown Source)    at com.microsoft.sqlserver.jdbc.SQLServerConnection.loginWithoutFailover(Unknown Source)    at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(Unknown Source)    at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(Unknown Source)    at java.sql.DriverManager.getConnection(DriverManager.java:525)    at java.sql.DriverManager.getConnection(DriverManager.java:193)     at   com.mypackage.utils.DBUtils.getDBConnection(DBUtils.java:45)My connection string pattern is : "jdbcqlserver://{0}:{1};User={2};Password={3};DatabaseName={4}"Which {0}: s

JDBC connection to SQLserver failing with ERROR [JDBCExceptionReporter] The connection is closed.

SQL server version: MS 2005 9.00.3050.00 Std edition Development version is on a stand alone server. Production is on an active/active cluster. Full error message below. There is an explanation and solution as noted below. However we do not see this issue in all our environments. Can anyone tell me why we see this issue in our production environment but not on our development environment, especially as the issue seems to arise following low usage times. Explanation / Solution If you are using the v1.2 driver, and you can positively rule out transient network connectivity issues and multithreaded usage, the next most common cause I am aware of is where a connection pool is being used and the pooling manager (e.g. DBCP or C3PO) does not test pooled connections for validity before handing them out to the app. What happens in this case is connections that sit idle in the pool for a very long time get closed by the TCP/IP stack, routing hardware, etc. Then they're already dead when the pooling manager hands them out. The solution is to configure the pooling manager to validate connections before handing them out, typically using a validation query like "SELECT 1". Error Message INFO | jvm 1 | 2010/09/07 07:52:11 | [09.07 07:52:11.396] LOG ERROR BROKO-EY-TBF-REDUCED-ENV-DP> INFO | jvm 1 | 2010/09/07 07:52:11 | - broko.quark.QueueMonitorThread.getNextCommand(QueueM

I need a dynamic connection string for my windows forms application.


Hello folks


I am brand new to forms applications and visual studio 2008 I am building a forms application to connect to a 3rd party's sdf file. There is no password or username required to connect however the 3rd party app installs the sdf in the users folder for me I am on windows 7 but I have clients on xp.


I went to add a data connection and chose sql ce file and browsed out to my location and it connects and works. But I need this connection string to be for whoever is logged into there laptops or computers no matter the operating system version xp,vista,7.


Data Source=C:\User\username\AppData\Roaming\PS\GES\surve.sdf


Can someone tell me how to do that. Also please explain in words a new borne could understand cause like I said I am new to this.


Thank you


SQL 2008 R2 Dynamic Ports and Static Ports


We have a single application (Interaction) that needs the port number specified in the application itself in order to 'talk' to its SQL database. The SQL environment consists of a two node cluster with two named instances. Each of the instances are divided equally between the nodes. We are obviously using dynamic ports on both of our names instances. I gave the application owner the port that the instance the database is currently running on. He hasn't gotten back to me yet, however, I suspect that when he specifies that port in the application it will connect to the database just fine. If it does, I need to come up with a plan for this one application.

Is there a way to use both dynamic ports with a static port specified? In the TCP/IP properties under the instance name, dynamic ports are used because the 'TCP Dynamic Ports' is set to '0'. Can I set it to something like '0,5100'? That way it'll still use dynamic ports with a specific port to always listen on? It seems like a stretch, but I'd rather not change my whole environment due to one silly application.

Another solution is to maybe create another instance for this one application and set the port statically? That's also very silly in my opinion to have a dedicated instance with only one database to set a static port. If anyone has any other creative ideas, besides just using the

Dynamic DB Connection


Hi All,

How to handle the DB Server connection depends on client?

for eg. for a product based application one client wants sql server DB and another one wants oracle DB.

few days later if anyone wants mySql DB, then how we can maintain connectionstring in web.config dynamically?

let me know how we handle or best way to handle without changing the application code.



SSIS Dynamic Connection Provider



I am working on SSIS 2008. My requirement is that I need to connect to SQL Server or Oracle datbase in lookup, but I will get to know this at runtime whether its SQL Server or Oracle. So one option is to create separate connection for each and use separate lookups. But my question is can I use only one connection and one lookup and achieve this? I short can I can change oledb connection provider at runtime?




Is a Dynamic Config Possible for SSAS BIDS Projects? (Data Source / Connection, and Deployment Targe


How do we automate SSAS Project configs such that (a) RDBMS data source server (connection) and (b) SSAS deployment target server are dynamic? 

As it stands, just before I script the ASDB (for deployment/promotion from Dev to QA, or QA to Prod, for example), I use BIDS designer interfaces to change the source connection and deployment targets, then script the ASDB. 

Is there a more dyamic alternative?  Perhaps something analogous to SSIS package configurations?  I can't believe that everybody is doing this as manually as I've done.

Change Dynamic Data database connection string


I have recently started to learn Dynamic Data Web application.

I have built a Dynamic data Website with LINQ data access layer. When the LINQ data context was built over an existing SQL2005 database, the connection string for that database was correctly, automatically, placed into the Settings and .edmx Code for the project. It works, but it's a "static" connection string.

I would like to be able to use this one LINQ data access layer against both test and production databases without having to manually change and recompile the project's connection string each time.

Is there a way to pass/change the User connection string to the LINQ data access layer at Run Time so that destination database changes? Ot in Other words How can user can choose a database from a list of databases.


Excel Connection Manager DYNAMIC


Hi Experts,

I have Excel Connection Manager's Connection String as:-

Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\TEMP\ABC.xls;Extended Properties="EXCEL 8.0;HDR=NO";

But I want to make it dynamic by using my Package variable something like this:-

Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\TEMP\+@[User::FileName]+;Extended Properties="EXCEL 8.0;HDR=NO";

But it is giving me error, so to change Excel Connection Manager connection string to make it dynamic?

Any Help




Login SQL Server with Dynamic Code and block SSMS remote connection


Dear all,

- Can we configure SQL Server login integrated using Dynamic Code (TOKEN) ?

As far i know , we can use Dynamic code / Token with Login Windows, but i dont know about Token/Dynamic Code with SQL Server login.

- and can we block SSMS Remote connection, so we cannot connect using SSMS /Query analyzer to the server. The only way is local connection.

thanks in advance

Our Environments :
-SQL Server 2K8EE integrated with LUna HSM & RSA

-Win Server 2k8EE


Regards, Mathias.Arya

JDBC Driver - is the connection to DB encrypted?


I'm using the JDBC4 driver.  As with most Java DB connections you create a connection URL similar to:

jdbc://myDatabaseServer user=jimmy; password=foobarbaz

My question is: is this login data transmitted to the SQL server in a secure manner when using the Microsoft JDBC4 driver?






Adding Dynamic Rows in ASP.NET GridView Control with TextBoxes and with Delete functionality

In my previous examples, I have demonstrated on how to add dynamic rows in GridView control with TextBoxes and how to save the values into the database. Now, seems that most of the developers are asking if how to add a delete functionality with it. So in this example, I'm going to show on how to delete a certain row in the dynamic GridView with TextBoxes.

Dynamic Data Templates in GridView ASP.NET 3.5

At a high level, Dynamic Data Templates can be seen as a system to very quickly build up a User Interface linked with the relevant data model, immediately enabling you to perform CRUD operations (Create, Read, Update, Delete) on the database using the specified data source. They provide a powerful method for building up these kinds of applications, and I'm going to focus on an overview of what Dynamic Data Templates actually are, and a few ways of customizing them to suit industry needs.

ASP.NET 4.0 Dynamic Data and Many to Many Entity Framework Entities

I did not play much with Dynamic Data controls in VS2008 and just made a cool discovery in VS2010 Beta 2. This may not even be new, but as I'm sitting 30,000+ feet over the Atlantic ocean, I don't have access to VS2008 at the moment to check.

Dynamic Systems Development Model (DSDM) Methodology

The Dynamic Systems Development Model was developed in the U.K. in the mid-1990s. It is the evolution of rapid application development (RAD) practices. DSDM boasts the best-supported training and documentation of any of the agile software development techniques, at least in Europe. DSDM favors the philosophy that nothing is built perfectly the first time and looks to software development as an exploratory endeavor.

Adding Dynamic Rows in GridView with TextBoxes

I decided to write this article because this has been asked so many times before at the forums(http://forums.asp.net) . Basically, this example shows on how to generate a Row in GridView with TextBoxes when clicking a Button that is residing inside a GridView Footer.

Adding Dynamic Rows in GridView with TextBoxex in C#

I decided to write this article because this has been asked so many times before at the forums(http://forums.asp.net) . Basically, this example shows on how to generate a Row in GridView with TextBoxes when clicking a Button that is residing inside a GridView Footer.
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend