Sql server resource governor per connection

anyone know if there's a way to limit resources per connection if the server is busy? e.g. Users A,B,C all want to run resource intensive things at the same time. Can I limit them to user each 25% of the cpu/mem, only if the server is busy?  Can I
do this without having to create 3 pools? Right now if someone does a long query it will freeze other users connections.

I was under the assumption that you had three users and each should be given 25% of the resources. I.e., leave 25 % to the rest. You can do this two ways:
1. Have one pool with 75% (3*25%) for which these three uses all uses.
2. Have three pools, one pool each for the users.
Be aware that CPU governance is per scheduler. So depending on the type of load and how your connections are hitting the schedulers (CPUs) and how long running queries you have, the governance may be more or less precise according to your config.
And as for memory, governor doesn't do the buffer pool. Basically memory is worker memory used for query execution (think hash tables and such).
Yes, max will only step in when there is a need for it (when somebody else want to use the resources). 2012 introduced however a harder max, called CAP_CPU_PERCENT which *is* a hard limit.
Tibor Karaszi, SQL Server MVP |
web | blog

Similar Messages

  • DPM failing SQL backups due to error: "the SQL Server instance refused a connection to the protection agent. (ID 30172 Details: Internal error code: 0x80990F85)

    I ran across this error starting on 6/4/2011 and have been unable to find the root of the problem.  In our environment, we have a DPM 2010 server dedicated to backing up all our SQL envrionment (about 45 SQL Servers total).  All of the SQL
    environment is backing up fine except for a SQL Cluster Application.  This particular SQL Instances is part of a 6 node failover cluster with 6 SQL Instances distributed amongst them.  The other 5 SQL instances in the cluster are backing
    up fine; only one instance is failing.  The DPM Alerts section shows this error when attempting to do a SQL backup of one of the databases on this SQL instance:
    Affected area: KEN-PROD-VDB001\POSREPL1\master
    Occurred since: 6/11/2011 11:00:56 PM
    Description: Recovery point creation jobs for SQL Server 2008 database KEN-PROD-VDB001\POSREPL1\master on SQL Server (POSREPL1) - Store Settings.ken-prod-cl004.aarons.aaronrents.com have been failing. The number of failed recovery point creation jobs =
    4.
     If the datasource protected is SharePoint, then click on the Error Details to view the list of databases for which recovery point creation failed. (ID 3114)
     The DPM job failed for SQL Server 2008 database KEN-PROD-VDB001\POSREPL1\master on SQL Server (POSREPL1) - Store Settings.ken-prod-cl004.aarons.aaronrents.com because the SQL Server instance refused a connection to the protection agent. (ID 30172 Details:
    Internal error code: 0x80990F85)
     More information
    Recommended action: This can happen if the SQL Server process is overloaded, or running short of memory. Please ensure that you are able to successfully run transactions against the SQL database in question and then retry the failed job.
     Create a recovery point...
    Resolution: To dismiss the alert, click below
     Inactivate alert
    I have checked the cluster node this particular SQL instance is running on using Perfmon and the machine is nowhere near capacity on CPU, memory, network, or Disk I/O.  I have failed this SQL Application to another node in the cluster and
    receive the same error (this other node has another clustered SQL application on it that is actively running as well as backing up fine).  The only thing that I am aware of that has changed is that we installed SP2 for SQL 2008 about 2 weeks prior
    to when the failures started to occur.  However, we updated all six clustered SQL Instances at the same time and only this one is having this issue so I don't believe that caused the problem.  We are running SQL 2008 SP2 (version 10.0.4000.0)
    on all clustered instances along with DPM 2010 (version 3.0.7696.0) on this particular DPM server that has the issue.
    One last thing, I have also noticed errors in the event log pertaining to the same SQL backups that are failing (but the time stamps are not concurrent with each backup attempt):
    Log Name:      Application
    Source:        MSDPM
    Date:          6/13/2011 1:09:12 AM
    Event ID:      4223
    Task Category: None
    Level:         Error
    Keywords:      Classic
    User:          N/A
    Computer:      KEN-PROD-BS002.aarons.aaronrents.com
    Description:
    The description for Event ID 4223 from source MSDPM cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.
    If the event originated on another computer, the display information had to be saved with the event.
    The following information was included with the event:
    DPM writer was unable to snapshot the replica of KEN-PROD-VDB001\POSREPL1\model. This may be due to:
    1) No valid recovery points present on the replica.
    2) Failure of the last express full backup job for the datasource.
    3) Failure while deleting the invalid incremental recovery points on the replica.
    Problem Details:
    <DpmWriterEvent><__System><ID>30</ID><Seq>1833</Seq><TimeCreated>6/13/2011 5:09:12 AM</TimeCreated><Source>f:\dpmv3_rtm\private\product\tapebackup\dpswriter\vssfunctionality.cpp</Source><Line>815</Line><HasError>True</HasError></__System><DetailedCode>-2147212300</DetailedCode></DpmWriterEvent>
    the message resource is present but the message is not found in the string/message table
    Event Xml:
    <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
      <System>
        <Provider Name="MSDPM" />
        <EventID Qualifiers="0">4223</EventID>
        <Level>2</Level>
        <Task>0</Task>
        <Keywords>0x80000000000000</Keywords>
        <TimeCreated SystemTime="2011-06-13T05:09:12.000000000Z" />
        <EventRecordID>68785</EventRecordID>
        <Channel>Application</Channel>
        <Computer>KEN-PROD-BS002.aarons.aaronrents.com</Computer>
        <Security />
      </System>
      <EventData>
        <Data>DPM writer was unable to snapshot the replica of KEN-PROD-VDB001\POSREPL1\model. This may be due to:
    1) No valid recovery points present on the replica.
    2) Failure of the last express full backup job for the datasource.
    3) Failure while deleting the invalid incremental recovery points on the replica.
    Problem Details:
    &lt;DpmWriterEvent&gt;&lt;__System&gt;&lt;ID&gt;30&lt;/ID&gt;&lt;Seq&gt;1833&lt;/Seq&gt;&lt;TimeCreated&gt;6/13/2011 5:09:12 AM&lt;/TimeCreated&gt;&lt;Source&gt;f:\dpmv3_rtm\private\product\tapebackup\dpswriter\vssfunctionality.cpp&lt;/Source&gt;&lt;Line&gt;815&lt;/Line&gt;&lt;HasError&gt;True&lt;/HasError&gt;&lt;/__System&gt;&lt;DetailedCode&gt;-2147212300&lt;/DetailedCode&gt;&lt;/DpmWriterEvent&gt;
    </Data>
        <Binary>3C00440070006D005700720069007400650072004500760065006E0074003E003C005F005F00530079007300740065006D003E003C00490044003E00330030003C002F00490044003E003C005300650071003E0031003800330033003C002F005300650071003E003C00540069006D00650043007200650061007400650064003E0036002F00310033002F003200300031003100200035003A00300039003A0031003200200041004D003C002F00540069006D00650043007200650061007400650064003E003C0053006F0075007200630065003E0066003A005C00640070006D00760033005F00720074006D005C0070007200690076006100740065005C00700072006F0064007500630074005C0074006100700065006200610063006B00750070005C006400700073007700720069007400650072005C00760073007300660075006E006300740069006F006E0061006C006900740079002E006300700070003C002F0053006F0075007200630065003E003C004C0069006E0065003E003800310035003C002F004C0069006E0065003E003C004800610073004500720072006F0072003E0054007200750065003C002F004800610073004500720072006F0072003E003C002F005F005F00530079007300740065006D003E003C00440065007400610069006C006500640043006F00640065003E002D0032003100340037003200310032003300300030003C002F00440065007400610069006C006500640043006F00640065003E003C002F00440070006D005700720069007400650072004500760065006E0074003E00</Binary>
      </EventData>
    </Event>
    Any help would be greatly appreciated!

    Don't know if this helps or not, but I also noticed another peculiar issue that is derived from this problem.  If I go to "Modify protection group", then expand the cluster, then expand all six nodes in the cluster, five of them show "All SQL Servers"
    and allow me to expand the SQL Instance and show all databases; the one that is having a problem backing up, when I expand the node, doesn't even show that SQL exists on the node, when in fact, it does.
    I would also like to add that the databases on this node that will not backup are running fine.  They run hundreds of transactions daily so we know SQL itself is OK.  Even though it is a busy SQL Server, there is plenty of available resources as
    the SQL buffer and memory counters show the node is not under durress.

  • Trouble connecting to the Microsoft SQL Server 2005 using JDBC Connection

    Hi,
    I am unable to connect to the Microsoft SQL Server 2005 using JDBC Connection. Kindly tell me steps to connect to the SQL Server using JDBC. The error message that I am getting while creating a data source is :
    java.rmi.RemoteException: com.sap.engine.services.dbpool.exceptions.BaseRemoteException: Error during start of application "sap.com/JDBCConnector_KedDS.xml". [id = StartupError]
    at com.sap.engine.services.dbpool.deploy.DataSourceManagerImpl.startApplication(DataSourceManagerImpl.java:608)
    at com.sap.engine.services.dbpool.deploy.DataSourceManagerImpl.deploy(DataSourceManagerImpl.java:285)
    at com.sap.engine.services.dbpool.deploy.DataSourceManagerImpl.createDataSource(DataSourceManagerImpl.java:342)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at com.sap.pj.jmx.introspect.DefaultMBeanInvoker.invoke(DefaultMBeanInvoker.java:58)
    at com.sap.pj.jmx.mbeaninfo.AdditionalInfoProviderMBean.invoke(AdditionalInfoProviderMBean.java:289)
    at com.sap.pj.jmx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:944)
    at com.sap.pj.jmx.server.interceptor.MBeanServerWrapperInterceptor.invoke(MBeanServerWrapperInterceptor.java:288)
    at com.sap.engine.services.jmx.CompletionInterceptor.invoke(CompletionInterceptor.java:409)
    at com.sap.pj.jmx.server.interceptor.BasicMBeanServerInterceptor.invoke(BasicMBeanServerInterceptor.java:277)
    at com.sap.jmx.provider.ProviderInterceptor.invoke(ProviderInterceptor.java:258)
    at com.sap.engine.services.jmx.RedirectInterceptor.invoke(RedirectInterceptor.java:340)
    at com.sap.pj.jmx.server.interceptor.MBeanServerInterceptorChain.invoke(MBeanServerInterceptorChain.java:330)
    at com.sap.engine.services.jmx.MBeanServerSecurityWrapper.invoke(MBeanServerSecurityWrapper.java:287)
    at com.sap.engine.services.jmx.MBeanServerInvoker.invokeMbs(MBeanServerInvoker.java:131)
    at com.sap.engine.services.jmx.ClusterInterceptor.invokeMbs(ClusterInterceptor.java:212)
    at com.sap.engine.services.jmx.ClusterInterceptor.invoke(ClusterInterceptor.java:766)
    at com.sap.engine.services.jmx.MBeanServerInterceptorInvoker.invokeMbs(MBeanServerInterceptorInvoker.java:102)
    at com.sap.engine.services.jmx.connector.p4.P4ConnectorServerImpl.invokeMbs(P4ConnectorServerImpl.java:61)
    at com.sap.engine.services.jmx.connector.p4.P4ConnectorServerImplp4_Skel.dispatch(P4ConnectorServerImplp4_Skel.java:64)
    at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:320)
    at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:198)
    at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:129)
    at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
    at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
    at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
    at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
    Caused by: java.rmi.RemoteException: Error occurred while starting application in whole cluster and wait.; nested exception is:
    com.sap.engine.services.deploy.exceptions.ServerDeploymentException: Clusterwide exception: server ID 13169050:com.sap.engine.services.dbpool.exceptions.BaseDeploymentException: Cannot create DataSource "KedDS".
    at com.sap.engine.services.dbpool.deploy.ContainerImpl.startDataSources(ContainerImpl.java:1843)
    at com.sap.engine.services.dbpool.deploy.ContainerImpl.prepareStart(ContainerImpl.java:489)
    at com.sap.engine.services.deploy.server.application.StartTransaction.prepareCommon(StartTransaction.java:223)
    at com.sap.engine.services.deploy.server.application.StartTransaction.prepare(StartTransaction.java:171)
    at com.sap.engine.services.deploy.server.application.ApplicationTransaction.makeAllPhasesOnOneServer(ApplicationTransaction.java:301)
    at com.sap.engine.services.deploy.server.application.ParallelAdapter.makeAllPhasesImpl(ParallelAdapter.java:342)
    at com.sap.engine.services.deploy.server.application.ParallelAdapter.runInTheSameThread(ParallelAdapter.java:126)
    at com.sap.engine.services.deploy.server.application.ParallelAdapter.makeAllPhasesAndWait(ParallelAdapter.java:245)
    at com.sap.engine.services.deploy.server.DeployServiceImpl.startApplicationAndWait(DeployServiceImpl.java:4761)
    at com.sap.engine.services.deploy.server.DeployCommunicatorImpl.startApplicationAndWait(DeployCommunicatorImpl.java:661)
    at com.sap.engine.services.deploy.server.DeployCommunicatorImpl.startApplicationAndWait(DeployCommunicatorImpl.java:645)
    at com.sap.engine.services.dbpool.deploy.DataSourceManagerImpl.startApplication(DataSourceManagerImpl.java:606)
    at com.sap.engine.services.dbpool.deploy.DataSourceManagerImpl.deploy(DataSourceManagerImpl.java:285)
    at com.sap.engine.services.dbpool.deploy.DataSourceManagerImpl.createDataSource(DataSourceManagerImpl.java:342)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at com.sap.pj.jmx.introspect.DefaultMBeanInvoker.invoke(DefaultMBeanInvoker.java:58)
    at com.sap.pj.jmx.mbeaninfo.AdditionalInfoProviderMBean.invoke(AdditionalInfoProviderMBean.java:289)
    at com.sap.pj.jmx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:944)
    at com.sap.pj.jmx.server.interceptor.MBeanServerWrapperInterceptor.invoke(MBeanServerWrapperInterceptor.java:288)
    at com.sap.engine.services.jmx.CompletionInterceptor.invoke(CompletionInterceptor.java:409)
    at com.sap.pj.jmx.server.interceptor.BasicMBeanServerInterceptor.invoke(BasicMBeanServerInterceptor.java:277)
    at com.sap.jmx.provider.ProviderInterceptor.invoke(ProviderInterceptor.java:258)
    at com.sap.engine.services.jmx.RedirectInterceptor.invoke(RedirectInterceptor.java:340)
    at com.sap.pj.jmx.server.interceptor.MBeanServerInterceptorChain.invoke(MBeanServerInterceptorChain.java:330)
    at com.sap.engine.services.jmx.MBeanServerSecurityWrapper.invoke(MBeanServerSecurityWrapper.java:287)
    at com.sap.engine.services.jmx.MBeanServerInvoker.invokeMbs(MBeanServerInvoker.java:131)
    at com.sap.engine.services.jmx.ClusterInterceptor.invokeMbs(ClusterInterceptor.java:212)
    at com.sap.engine.services.jmx.ClusterInterceptor.invoke(ClusterInterceptor.java:766)
    at com.sap.engine.services.jmx.MBeanServerInterceptorInvoker.invokeMbs(MBeanServerInterceptorInvoker.java:102)
    at com.sap.engine.services.jmx.connector.p4.P4ConnectorServerImpl.invokeMbs(P4ConnectorServerImpl.java:61)
    at com.sap.engine.services.jmx.connector.p4.P4ConnectorServerImplp4_Skel.dispatch(P4ConnectorServerImplp4_Skel.java:64)
    at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:320)
    at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:198)
    at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:129)
    at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
    at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
    at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
    at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
    Caused by: com.sap.engine.services.dbpool.exceptions.BaseInstantiationException: Cannot create instance ManagedConnectionFactoryImpl.
    at com.sap.engine.services.dbpool.spi.ManagedConnectionFactoryImpl.<init>(ManagedConnectionFactoryImpl.java:78)
    at com.sap.engine.services.dbpool.deploy.ContainerImpl.startDataSources(ContainerImpl.java:1779)
    ... 42 more
    Caused by: java.lang.ClassNotFoundException: com.microsoft.sqlserver.jdbc.SQLServerDriver
    Found in negative cache
    ------------------------- Loader Info -------------------------
    ClassLoader name: [library:KedDriver]
    Parent loader name: [Frame ClassLoader]
    No references !
    Resources:
    E:\usr\sap\J2E\JC01\j2ee\cluster\server0\bin\ext\KedDriver\sqljdbc.jar
    E:\usr\sap\J2E\JC01\j2ee\cluster\server0\bin\core_lib\opensqlport.jar
    Loading model: {parent,local,references}
    at com.sap.engine.frame.core.load.ReferencedLoader.loadClass(ReferencedLoader.java:360)
    at com.sap.engine.services.dbpool.spi.ManagedConnectionFactoryImpl.<init>(ManagedConnectionFactoryImpl.java:74)
    ... 43 more
    at com.sap.engine.services.deploy.server.DeployCommunicatorImpl.startApplicationAndWait(DeployCommunicatorImpl.java:663)
    at com.sap.engine.services.deploy.server.DeployCommunicatorImpl.startApplicationAndWait(DeployCommunicatorImpl.java:645)
    at com.sap.engine.services.dbpool.deploy.DataSourceManagerImpl.startApplication(DataSourceManagerImpl.java:606)
    ... 31 more
    Caused by: com.sap.engine.services.deploy.exceptions.ServerDeploymentException: Clusterwide exception: server ID 13169050:com.sap.engine.services.dbpool.exceptions.BaseDeploymentException: Cannot create DataSource "KedDS".
    at com.sap.engine.services.dbpool.deploy.ContainerImpl.startDataSources(ContainerImpl.java:1843)
    at com.sap.engine.services.dbpool.deploy.ContainerImpl.prepareStart(ContainerImpl.java:489)
    at com.sap.engine.services.deploy.server.application.StartTransaction.prepareCommon(StartTransaction.java:223)
    at com.sap.engine.services.deploy.server.application.StartTransaction.prepare(StartTransaction.java:171)
    at com.sap.engine.services.deploy.server.application.ApplicationTransaction.makeAllPhasesOnOneServer(ApplicationTransaction.java:301)
    at com.sap.engine.services.deploy.server.application.ParallelAdapter.makeAllPhasesImpl(ParallelAdapter.java:342)
    at com.sap.engine.services.deploy.server.application.ParallelAdapter.runInTheSameThread(ParallelAdapter.java:126)
    at com.sap.engine.services.deploy.server.application.ParallelAdapter.makeAllPhasesAndWait(ParallelAdapter.java:245)
    at com.sap.engine.services.deploy.server.DeployServiceImpl.startApplicationAndWait(DeployServiceImpl.java:4761)
    at com.sap.engine.services.deploy.server.DeployCommunicatorImpl.startApplicationAndWait(DeployCommunicatorImpl.java:661)
    at com.sap.engine.services.deploy.server.DeployCommunicatorImpl.startApplicationAndWait(DeployCommunicatorImpl.java:645)
    at com.sap.engine.services.dbpool.deploy.DataSourceManagerImpl.startApplication(DataSourceManagerImpl.java:606)
    at com.sap.engine.services.dbpool.deploy.DataSourceManagerImpl.deploy(DataSourceManagerImpl.java:285)
    at com.sap.engine.services.dbpool.deploy.DataSourceManagerImpl.createDataSource(DataSourceManagerImpl.java:342)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at com.sap.pj.jmx.introspect.DefaultMBeanInvoker.invoke(DefaultMBeanInvoker.java:58)
    at com.sap.pj.jmx.mbeaninfo.AdditionalInfoProviderMBean.invoke(AdditionalInfoProviderMBean.java:289)
    at com.sap.pj.jmx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:944)
    at com.sap.pj.jmx.server.interceptor.MBeanServerWrapperInterceptor.invoke(MBeanServerWrapperInterceptor.java:288)
    at com.sap.engine.services.jmx.CompletionInterceptor.invoke(CompletionInterceptor.java:409)
    at com.sap.pj.jmx.server.interceptor.BasicMBeanServerInterceptor.invoke(BasicMBeanServerInterceptor.java:277)
    at com.sap.jmx.provider.ProviderInterceptor.invoke(ProviderInterceptor.java:258)
    at com.sap.engine.services.jmx.RedirectInterceptor.invoke(RedirectInterceptor.java:340)
    at com.sap.pj.jmx.server.interceptor.MBeanServerInterceptorChain.invoke(MBeanServerInterceptorChain.java:330)
    at com.sap.engine.services.jmx.MBeanServerSecurityWrapper.invoke(MBeanServerSecurityWrapper.java:287)
    at com.sap.engine.services.jmx.MBeanServerInvoker.invokeMbs(MBeanServerInvoker.java:131)
    at com.sap.engine.services.jmx.ClusterInterceptor.invokeMbs(ClusterInterceptor.java:212)
    at com.sap.engine.services.jmx.ClusterInterceptor.invoke(ClusterInterceptor.java:766)
    at com.sap.engine.services.jmx.MBeanServerInterceptorInvoker.invokeMbs(MBeanServerInterceptorInvoker.java:102)
    at com.sap.engine.services.jmx.connector.p4.P4ConnectorServerImpl.invokeMbs(P4ConnectorServerImpl.java:61)
    at com.sap.engine.services.jmx.connector.p4.P4ConnectorServerImplp4_Skel.dispatch(P4ConnectorServerImplp4_Skel.java:64)
    at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:320)
    at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:198)
    at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:129)
    at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
    at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
    at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
    at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
    Caused by: com.sap.engine.services.dbpool.exceptions.BaseInstantiationException: Cannot create instance ManagedConnectionFactoryImpl.
    at com.sap.engine.services.dbpool.spi.ManagedConnectionFactoryImpl.<init>(ManagedConnectionFactoryImpl.java:78)
    at com.sap.engine.services.dbpool.deploy.ContainerImpl.startDataSources(ContainerImpl.java:1779)
    ... 42 more
    Caused by: java.lang.ClassNotFoundException: com.microsoft.sqlserver.jdbc.SQLServerDriver
    Found in negative cache
    ------------------------- Loader Info -------------------------
    ClassLoader name: [library:KedDriver]
    Parent loader name: [Frame ClassLoader]
    No references !
    Resources:
    E:\usr\sap\J2E\JC01\j2ee\cluster\server0\bin\ext\KedDriver\sqljdbc.jar
    E:\usr\sap\J2E\JC01\j2ee\cluster\server0\bin\core_lib\opensqlport.jar
    Loading model: {parent,local,references}
    at com.sap.engine.frame.core.load.ReferencedLoader.loadClass(ReferencedLoader.java:360)
    at com.sap.engine.services.dbpool.spi.ManagedConnectionFactoryImpl.<init>(ManagedConnectionFactoryImpl.java:74)
    ... 43 more
    at com.sap.engine.services.deploy.server.application.ParallelAdapter.sleepClientThread(ParallelAdapter.java:270)
    at com.sap.engine.services.deploy.server.application.ParallelAdapter.runInTheSameThread(ParallelAdapter.java:127)
    at com.sap.engine.services.deploy.server.application.ParallelAdapter.makeAllPhasesAndWait(ParallelAdapter.java:245)
    at com.sap.engine.services.deploy.server.DeployServiceImpl.startApplicationAndWait(DeployServiceImpl.java:4761)
    at com.sap.engine.services.deploy.server.DeployCommunicatorImpl.startApplicationAndWait(DeployCommunicatorImpl.java:661)
    ... 33 more
    at com.sap.engine.services.dbpool.exceptions.BaseRemoteException.writeReplace(BaseRemoteException.java:178)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at java.io.ObjectStreamClass.invokeWriteReplace(ObjectStreamClass.java:896)
    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1011)
    at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1332)
    at java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:367)
    at javax.management.MBeanException.writeObject(MBeanException.java:126)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:809)
    at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1296)
    at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1247)
    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052)
    at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1332)
    at java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:367)
    at com.sap.exception.BaseExceptionInfo.writeObject(BaseExceptionInfo.java:964)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:809)
    at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1296)
    at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1247)
    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052)
    at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1332)
    at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1304)
    at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1247)
    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052)
    at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:278)
    at com.sap.engine.services.jmx.ResponseMessage.writeBody(ResponseMessage.java:177)
    at com.sap.engine.services.jmx.Message.writeMsg(Message.java:257)
    at com.sap.engine.services.jmx.Message.getMsg(Message.java:453)
    at com.sap.engine.services.jmx.Message.writeExternal(Message.java:505)
    at java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1267)
    at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1245)
    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052)
    at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:278)
    at com.sap.engine.services.jmx.connector.p4.P4ConnectorServerImplp4_Skel.dispatch(P4ConnectorServerImplp4_Skel.java:66)
    at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:320)
    at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:198)
    at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:129)
    at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
    at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
    at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
    at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)

    i'm using jcreator pro
    jdk i.6
    mssql server 2005
    and downloaded the jdbc driver( i noticed that the msutil.jar and msbase.jar are not in the folder avalable on microsoft site Microsoft SQL Server 2005 JDBC Driver so i installed
    Microsoft SQL Server 2000 Driver for JDBC 1st and just changed the jqljdb.jar file with the one available in Microsoft SQL Server 2005 JDBC Driver )
    and set the path of the CLASSPATH to a folder which name has no spaces
    and tried Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
    and Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
    and tried compiling and running with command prompt
    and still have the same exception which occurs at runtime
    "An exception has occured: java.lang.ClassNotFoundException: com.microsoft.sqlserver.jdbc.SQLServerDriver"
    i really need help

  • Connection failed: SQLState:'01000' SQL Server Error:67 [Microsoft]ODBC SQL Server Driver][DBNETLIB]ConnectionOpen (Connect()). Connection failed: SQLState:'08001' SQL Server Error:17 [Microsoft]ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist o

    Help,
    setup a new sql server 2012 on a windows 2012r2 server to replace old sql server 2005 on an old windows server 2003 machine.  When i test the ODBC connection locally on the server it works fine, however when i try to connect via windows 7 client machine
    i get the following error:
    Connection failed:
    SQLState:'01000'
    SQL Server Error:67
    [Microsoft]ODBC SQL Server Driver][DBNETLIB]ConnectionOpen
    (Connect()).
    Connection failed:
    SQLState:'08001'
    SQL Server Error:17
    [Microsoft]ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist or access denied
    I think it must be a permissions thing, I've turned off the firewall for now and still no difference, 've also made sure remote connection is enabled.  I can connect to the other sql server in studio manager on the new machine however, i can't go do
    the same in the old server, says:
    cannot connect to hbfsqlpro1\hbfsqlpro1
    Additonal information a network related or instance specifc error occured while establising a connection to SQL server.  The server was not found or was not accessible.  Verify that the instance name is correct and that SQL server is configured to
    allow remote connections. (provider:SQL Network Interfaces, error 26 - error locationg server/instance specified) (Microsoft SQL server)
    the instance is def correct, as that is what i use to connect locally on the new machine and what it comes up on the studio manager on the new machine.  STarting to pull my hair out somewhat, i'm sure it's something really simple! 

    Hello,
    You are trying to connect to a named instance. Make sure the SQL Server Browser service is started on the SQL Server computer.
    Make sure TCP/IP is enabled.
    http://msdn.microsoft.com/en-us/library/ms191294(v=sql.110).aspx
    Try to disable Windows Firewall or security software on both, SQL Server instance and client computer.
    Test basic connectivity too. Try to ping from the client computer to the SQL Server computer.
    Hope this helps.
    Regards,
    Alberto Morillo
    SQLCoffee.com

  • How to store jpeg images in SQL server using NI database Connectivity Toolset. Can anyone please help me in this regard.

    Please tell how to store jpeg images in SQL Server using NI Database Connectivity Toolset.

    http://www.w3schools.com/sql/sql_datatypes.asp
    You setup a field as BLOB and store the binary of the picture there. Depending on the database it can be called differently as you can see in the link, in SQL server there's even a Image datatype.
    /Y
    LabVIEW 8.2 - 2014
    "Only dead fish swim downstream" - "My life for Kudos!" - "Dumb people repeat old mistakes - smart ones create new ones."
    G# - Free award winning reference based OOP for LV

  • SQL Server Configuration Manager – Cannot connect to WMI provider – Invalid class [0x80041010]

    look at this post am getting the same
    http://social.msdn.microsoft.com/Forums/en-US/sqlkjmanageability/thread/4c8ca86c-105f-4f0a-ac18-6e33dda2bc46
    but when I tried the solution given there , It is not working
    the error I am getting is mofcomp is not recognized as internal or external command
    I tried in  C:\program files\Microsoft sql server\90\shared  and in Windows\system32
    I am getting the same error

    Hi sql393,
    Cannot connect to WMI provider. You do not have permission or the server is unreachable. Note that you can only manage SQL Server 2005 servers with SQL Server Configuration Manager. Invalid class [0x80041010].
    The solution is to go to a command prompt and then run mofcomp.
     C:\Program Files\Microsoft SQL Server\90\Shared>mofcomp "C:\Program Files\Microsoft SQL Server\90\Shared\sqlmgmproviderxpsp2up.mof"
    For more information, please refer to
    http://blogs.msdn.com/b/echarran/archive/2006/01/03/509061.aspx
    http://msmvps.com/blogs/martinpoon/archive/2009/11/27/sql-server-configuration-manager-cannot-connect-to-wmi-provider-invalid-class-0x80041010.aspx.
    Thanks,
    Maggie
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. This can be beneficial to other community members reading the thread.

  • SQL Server 2000/CFMX 7 - connection refused: connect

    Hi all,
    I have been trying to troubleshoot this for a few weeks now,
    I have looked high and low and tried multiple solutions that worked
    for other people, none have worked for me.
    I have SQL Server 2000 Version 8 and Coldfusion 7.0.2.
    I can't seem to make a database connect in Administrator. I
    have tried changing the port that SQL Server listens on, I made a
    new security role in SQL Server specifically for the database I'm
    creating, I tried making an ODBC connection (which can see the SQL
    Server) in windows then connecting to that, nothing is working.
    I thought it might be the windows firewall, it isn't since it
    is off, my TCP/IP protocol is enabled, I am running out of ideas.
    If anyone can suggest anything, please do this is what I see
    everytime.
    Connection verification failed for data source: IFDA
    java.sql.SQLException: [Macromedia][SQLServer JDBC
    Driver]Error establishing socket. Connection refused: connect
    The root cause was that: java.sql.SQLException:
    [Macromedia][SQLServer JDBC Driver]Error establishing socket.
    Connection refused: connect
    I'm dying over here.
    Thanks.

    This might be a dumb question, but have you searched Google
    groups? Its one of the first places I go when I get error messages
    I don't understand.
    Googling this:
    "java.sql.SQLException: [Macromedia][SQLServer JDBC
    Driver]Error establishing socket. Connection refused: connect"
    ..gave me 84 results (ok, a lot of them point back to these
    forums but I still find searching thru Google easier than using the
    built in search) - here's a
    Link
    hth - cheers.

  • SQL Server is unable to connect to the server-Replication

    Hello everyone,
    Today I found one strange issue, when I tried to add new publisher Database in Transactional Replication I found the following error message.
    Does anyone knows how to resolve this?
    Also I checked the server name , when the time of Initial configuration I given the same server name not the IP. No clue why I got this issue, could you guys please explain to resolve this.
    Thanks Guys

    Verify your instance name again:
    select @@servername
    go
    sp_helpserver
    go
    select serverproperty('servername')
    go
    If it does not reflect right name you might have to rename:
    https://msdn.microsoft.com/en-us/library/ms143799.aspx
    http://beyondrelational.com/modules/2/blogs/88/Posts/18241/sql-server-is-unable-to-connect-to-server-servername-error-while-setup-replication.aspx

  • SQL Server 2005 replaced with SQL Server 2014 trying to connect front end Access as guest (read only ODBC)

    We have replaced a SQL Server 2005 with a SQL Server 2014 (new physical server.)  Have the new server set up to use SQL Server login OR Windows user login. Had old server connecting (for a particular DB) to front end Access (2010 or 2013) as guest for
    anyone logged into the Windows NT Network with a read only ODBC connection. Have the DB in the new server set to include guest as db_datareader (with only SELECT permission for the securables of each table and view being linked) but when any Windows user not
    specifically listed as a SQL DB user tries to use the front end they get an error of:
    Microsoft SQL Server Login
    Connection failed:
    SQL State: '28000'
    SQL Server Error: 18456
    [Microsoft][OCBC SQL Server Driver][SQL Server] Login failed for user {domain\user}.
    After closing that pop-up window a server login window appears. Of course, since the guest user is not specifically listed as a user in the DB that fails also. It seems like there should be a very simple solution to this, but I can't seem to find it. I want
    to allow anyone logged in on the Windows system (locally) to be able to open the MS Access file (on their work station machine) and run their own (read only; select) queries on the SQL Server database. Any suggestions?
    Thanks a billion in advance ----

    Thanks for the response Olaf. I have now spent weeks researching this. I realize that using the guest account in most situations is not advised. As mentioned, I have restricted the guest account to allow the db_datareader role only, and have explicitly denied
    all other roles, as well as allowing select only, and still have no access for the guest account.
    The suggested fix in the second link you provided, of using Windows groups is not plausible for my situation either. We are a scientific field research institution, with a few long term users and lots of users that may have Windows accounts for a few months,
    and then they are gone. It would be a nightmare for the network tech to try to keep a group account up to date, and we need to give access (read only, of course) to anyone logged into the system. Realize that the ONLY access of any kind to this database is
    thru MS Access ACCDB, using a (by default) read only OCDB connection.
    This type of access is used particularly because researchers need to be able to set up their own queries, and the MS Access query interface is particularly convenient for people who are not themselves SQL experts, yet are trying to get some very advanced
    levels of output. Putting the database online is not practical because then we are back to the need for a comprehensive query interface, and just picking up general subsets of the data online (from a basic web page search feature) would be out of the question,
    since the result set would involve hundreds of thousands if not millions of records.
    So - that said - what exactly would you suggest, assuming we don't have the funds to buy a whole new system, and have spent plenty of money with Microsoft's Enterprise level MS Office so that all work stations have MS Access, and Microsoft's SQL Server,
    as well as running our network on Microsoft's network software.

  • SQL Server Agent fails to connect to DB after enabling mirror on failover cluster

    Hello:
    We have multiple databases running in a Failover Cluster instance: SQL 2012SP1 on Server 2008 R2 failover cluster (NOT AlwaysOn). We are trying to add a high-performance mirror in a standalone instance for DR. My understanding is that should be a perfectly
    normal, supported configuration.
    The mirroring is working properly; however, the clustered SQL Server agent is unable to run jobs that run in the mirrored databases.
    We get the following in the job log: Unable to connect to SQL Server 'VIRTUALSERVERNAME\INSTANCE'.  The step failed.
    There is a partner message in the agent log: [165] ODBC Error: 0, Connecting to a mirrored SQL Server instance using the MultiSubnetFailover connection option is not supported. [SQLSTATE IMH01]
    The cluster is not a mulitsubnet cluster. All hosts are connected to the same subnets and there is no storage replication. I can not find any place where I can adjust the connect string options for SQL Agent.
    Any guidance or suggestions on how to resolve this would be appreciated.
    ~joe

    SQL Team - MSFT:
    Thank you for taking the time to research and provide a clear answer.
    This seems very much a workaround and very unsatisfactory.
    You are correct, there is an IP dependency with OR condition. Moving to an AND condition is not viable for us. The whole point is to provide network redundancy. With an AND condition, if EITHER network interface fails, the service will go offline or fail
    to come online without manual intervention. This is arguably worse for uptime than having a single interface available.
    We are in process of rewriting all our SQL jobs to start in tempdb before transitioning to the appropriate target database. If this works for all of our jobs, I will mark the above response as answer.
    Again, thank you for the answer.
    Regards,
    Joe M.

  • SQL Server Express 2008 R2 - Connect to Server Error

    I have recently downloaded and installed SQL Server 2008 R2 on a new laptop (Windows 7).  The install completed successfully and I encountered no issues.  However, when I start SQL Server Management Studio, I am unable to connect to my server instance.
     I receive the following error:
    "Cannot connect to DWHS (my server name)"  "A network-related or instance-specific error occurred while establishing a connection to SQL Server.  The server was not found or was not accessible.  Verify that the instance name is correct and
    that SQL Server is configured to allow remote connections.
    Did I incorrectly setup some of the settings regarding how the instance is configured when I installed?  Any help would be appreciated.

    are you giving the right server name ?check wether sql services are running and make sure that you are giving correct name . I hope you have installed sql server database engine .
    How to find server name:
     If the instance of SQL Server is a default instance (the instance name is MSSQLSERVER), the server name is
    Computer. Or if it is a named instance, the server name is ComputerName\InstanceName. You can find the instance name via SQL Server Configuration Manager:
    Open SQL Server Configuration Manager from Start -> All Programs -> Microsoft SQL Server 2008 -> Configuration Tools, click SQL
    Server Services in the SQL Server Configuration Manager, in the right pane, you can find SQL Server (InstanceName).
    CompterName and InstanceName are placeholders which represent the your computer name and the instance name of the SQL Server instance.
    Thanks,Suhas V

  • SQL Server 2008/2012 Express Connection Problem

    Hello,
    since a couple of days I'm working on a problem with the SQL Server Express (32-Bit as well as 64Bit).
    I installed a new SQL Server 2008 with an instance named SQL2012 and the Management Studio 2008 R2 on the same machine. I easily am abled to connect to the Server using the Management Studio with several Server Name settings (localhost, IP, (local), .\SQL2012).
    Now I have a self-written programm (C#) wich should connect to the Server, but it does not work. It is definitely not a problem of the programm code because the same programm is abled to connect to a SQL Server 2008 Enterprise Edition. Similar Problem with
    the 2012 Express Version (2012 Enterprise not tested).
    The connection string I use and wich is working with connecting on the Enterprise Edition is: Server=Servername\Instance;Database=DatabaseName;User Id=user;Password=password;
    Anybody any solution why the Express-Version refuses to connect?
    (Sorry if I have made several failures in my text, English is not my native language)

    It Occurs when I try to ping.Send the Server to see if he is active. If I skip this step and try to connect directly to the server (con.Open()) I get the exception:
    A network-related or instance-specific error occurred while establishing a connection to SQL Server. The
    server was not found or it can not be accessed. Verify that the instance name is correct and that SQL Server allows remote connections. (provider: Named Pipes Provider, error: 40 - Connection with the SQL Server couldn't be opened)

  • Sql server 2005 and jsp connectivity

    hello everyone....am new to JSP...:-)
    i use apache tomcat server 4.1.37,SQL SERVER 2005(Studio express),dreamweaver cs3..
    this is my first page...
    <%@page contentType="text/html"%>
    <%@page pageEncoding="UTF-8"%>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    </head>
    <body>
    <form id="form1" name="form1" method="post" action="new2.jsp">
    <label>
    Username
    <input type="text" name="text1" id="text1" />
    </label>
    <p>
    <label>
    Password
    <input type="text" name="text2" id="text2" />
    </label>
    </p>
    <p>
    <label>
    <input type="submit" name="button1" id="button1" value="Submit" />
    </label>
    </p>
    </form>
    </body>
    </html>
    this runs fine..coz there are only HTML codes...now the problem part...
    <%@page contentType="text/html" import="com.microsoft.sqlserver.jdbc.*, java.sql.*"%>
    <%@page pageEncoding="UTF-8"%>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>JSP Page</title>
    </head>
    <body>
    <h1>JSP Page</h1>
    <% String user = request.getParameter("text1");
    String pass = request.getParameter("text2");
    Connection con = null;
    try {
    Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
    con = DriverManager.getConnection("jdbc:sqlserver://localhost:1433;databaseName=webpage;user=Administrator");
    Statement stat=con.createStatement();
         ResultSet res =stat.executeQuery("select * from login");
    boolean l = false;
         while(res.next())
              if (user.equals(res.getString(2)) && pass.equals(res.getString(3)))
    l = true;
    if (l)
    out.println("<p>Welcome " + user + "</p>");
    else
    out.println("<p>Login Failed</p>" );
    con.close();
    } catch (ClassNotFoundException ex) {
    System.out.println("Exception: " + ex);
    catch (SQLException ex) {
    //Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
    System.out.println("Exception: " + ex);
    %>
    </body>
    </html>
    when i run this in the browser...i get JSP Pages displayed(but not the welcome...or login failed..)..which is under the html tag...
    but the tomcat server gives an error:
    Exception:com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host has failed.java.net.ConnectException:connection refused.connect.
    Some of my questions...
    1)apache tomcat runs on port :8080 and in this code i use port :1433.Does this not have any bearing?
    when i change 1433 to 8080..it gives TDS prelogin response is incomplete.target server must be sql server 2000 or later.
    2)i use user=Administrator but when i go to Sql server management studio->object explorer->right-click->view connection properties..it gives user name as NEW-D348F33DAD2\Administrator...but if I use this it gives an error pointing to the forward slash(\).So what should be used?
    P.S. i have installed the jdbc driver and the database "webpage" has been created!

    anand_chhetri wrote:
    hello everyone....am new to JSP...:-)
    i use apache tomcat server 4.1.37,SQL SERVER 2005(Studio express),dreamweaver cs3..Tomcat is up to version 6; why are you using such an old one?
    Dreamweaver is irrelevant.
    Which JDK?
    >
    this is my first page...
    <%@page contentType="text/html"%>
    <%@page pageEncoding="UTF-8"%>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    </head>
    <body>
    <form id="form1" name="form1" method="post" action="new2.jsp">
    <label>
    Username
    <input type="text" name="text1" id="text1" />
    </label>
    <p>
    <label>
    Password
    <input type="text" name="text2" id="text2" />
    </label>
    </p>
    <p>
    <label>
    <input type="submit" name="button1" id="button1" value="Submit" />
    </label>
    </p>
    </form>
    </body>
    </html>
    this runs fine..coz there are only HTML codes...now the problem part...OK.
    You don't need to import the Microsoft SQL server JDBC.
    <%@page contentType="text/html" import="com.microsoft.sqlserver.jdbc.*, java.sql.*"%>
    <%@page pageEncoding="UTF-8"%>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>JSP Page</title>
    </head>
    <body>
    <h1>JSP Page</h1>Where do you think these come from? This page must be your "new2.jsp"
    <% String user = request.getParameter("text1");
    String pass = request.getParameter("text2");
    Connection con = null;
    try {
    Since you didn't get a ClassNotFoundException here, I'll assume that you got the JAR into the CLASSPATH.
    Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");Your app logs in as admin? With no password? Very bad.
    con = DriverManager.getConnection("jdbc:sqlserver://localhost:1433;databaseName=webpage;user=Administrator");
    Statement stat=con.createStatement();
         ResultSet res =stat.executeQuery("select * from login");
    boolean l = false;
         while(res.next())
              if (user.equals(res.getString(2)) && pass.equals(res.getString(3)))
    l = true;
    if (l)
    out.println("<p>Welcome " + user + "</p>");
    else
    out.println("<p>Login Failed</p>" );
    con.close();
    } catch (ClassNotFoundException ex) {
    System.out.println("Exception: " + ex);
    catch (SQLException ex) {
    //Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
    System.out.println("Exception: " + ex);
    %>
    </body>
    </html>
    when i run this in the browser...i get JSP Pages displayed(but not the welcome...or login failed..)..which is under the html tag...
    but the tomcat server gives an error:
    Exception:com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host has failed.java.net.ConnectException:connection refused.connect.Bad connection URL. Can you write a simple class that connects without Tomcat, one that you can run on the command line?
    Some of my questions...
    1)apache tomcat runs on port :8080 and in this code i use port :1433.Does this not have any bearing?No.
    when i change 1433 to 8080..it gives TDS prelogin response is incomplete.target server must be sql server 2000 or later.No - Tomcat listens on 8080, SQL Server listens on 1433. You need both.
    2)i use user=Administrator but when i go to Sql server management studio->object explorer->right-click->view connection properties..it gives user name as NEW-D348F33DAD2\Administrator...but if I use this it gives an error pointing to the forward slash(\).So what should be used?Look at the driver docs to see how to add a password.
    P.S. i have installed the jdbc driver and the database "webpage" has been created!What does "installed" mean? The JARs should be in Tomcat's common/lib directory.
    %

  • MS SQL Server 2005 Remote Database Connection

    Hello Friends,
    I have a database in SQL Server 2005, i installed SQL server with windows authentication. Now when I tries to connect to the server using Type 3 jdbc. I downloaded jdbc 1.2 driver from,
    http://msdn2.microsoft.com/hi-in/data/aa937724(en-us).aspx
    now i want to connect to the database from remote machine(different network).
    How can i achieve this, and what setting i have to make to the sql server?
    Any suggestion will be greatly appreciated.
    Regards
    Mohneesh

    okey i done with some experiment.
    now i am able to do it from local machine with the following code
    String url="jdbc:sqlserver://LocalIP:1433;integratedSecurity=true;";
    Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
    Connection conn = DriverManager.getConnection("url");
    now when i move to remote system and change the Local IP to remote IP(server has static IP)
    it comes up with SQLException: Login failed.for user ''.
    com.microsoft.sqlserver.jdbc.SQLServerException: Login failed for user ''. The user is not associated with a trusted SQL Server connection.
    please help me its kinda urgent.
    Regards
    Mohneesh

  • MS SQL Server 2000 Problem to Connect

    Hi There
    I have a problem with MS SQL Server 2000 with Service Pack 3 and JDBC from Microsoft
    My tools are:
    - Windows 2003 Server Standart Edition
    - MS SQLServer 2000 with ServicePack 3
    - JDBC from Microsoft with ServicePack 3
    I want to connect in the database using JDBC.
    At first time, I follow the example to chance the authentication of SQL
    Server
    http://www.banmanpro.com/support/sql2k.asp
    Now, when I will try out to connect in the SQL Server, I receive this error
    message
    java.sql.SQLException: [Micro$oft][SQLServer 2000 Driver for
    JDBC][SQLServer]Login failed for user 'Administrador'.
    I'm trying to connect in SQL Server using my Windows Account, in other
    words, I'm using the ADMIN account of Windows and which was registered in
    the SQL Server.
    In then DriverManager.getConnection line from Java, the Username and
    Password is same the operation system, but I receive the error below.
    Maybe Can you help me please?

    You can't log in using Windows credentials using the MS driver (yes, I know that sounds kind of funny). Use jTDS for that, if you really need it (or if you encounter any other problems with the MS driver). Otherwise log in using SQL Server credentials (try with user sa and blank password if not sure).
    Alin.

Maybe you are looking for