Dead lock problem occur in Ms-Sql Server
Hi friends,
I am using the 1,Tomcat server
2, jdbc-odbc-bridge driver
In my applicaiton .mutli user access time its throw -deadlock
exception . How to solve the dead lock problem.. please help it.
Can i modify the Db connection?
please help me .... How solve the dead lock problem..
please ............ its urgent
I am using this stored procedure to occur dead lock condtion. Orderly insert table values ..
Imm_tblGameTransactions- Primary Tables
Imm_tblGameDetailsBJ - Secondary tables
Please check it.....
Please explain breifly..... ....
please.........
CREATE procedure IMM_BJDeal
@plid int,
@gameid int,
@betamt money,
@bal money,
@winamt money,
@usercards nvarchar(500),
@dealercards nvarchar(500),
@useracecnt int,
@dealeracecnt int,
@dealerbj int,
@userbj int,
@insurance int,
@split int,
@push int,
@sessionid int,
@ltransid int out
as
begin
declare
@transdate datetime,
@linitbal money,
@lfinalbal money,
@errormesg varchar(50)
select @linitbal=balance from Imm_players.dbo.Imm_tblPlayerbalance where playerid=@plid
select @transdate=getdate()
--set @ldealcards ='['+@dealercard1+','+@dealercard2+']'
--print @ldealcards
if(@userbj=1)
begin
select @lfinalbal= @bal
begin transaction
insert into Imm_tblGameTransactions
(playerid,gameid,Initialbalance,transactiondate,betamount,winamount,currencycode,finalbalance,sessionid)
values(@plid,@gameid,@linitbal,@transdate,@betamt,@winamt,'USD',@lfinalbal,@sessionid)
IF @@ERROR <> 0
Begin
-- There's an error b/c @ERROR is not 0, rollback
ROLLBACK
return
End
select @ltransid=@@identity from Imm_tblGameTransactions
insert into Imm_tblGameDetailsBJ(transid,playercard,dealercard,typeid,result,statusid,split,insurance,playercardcount,dealercardcount,winvalue,betvalue)
values(@ltransid,@usercards,@dealercards ,1,1,'PB',@split,@insurance,@useracecnt,@dealeracecnt,@winamt,@betamt)
IF @@ERROR <> 0
begin
-- There's an error b/c @ERROR is not 0, rollback
ROLLBACK
return
end
update Imm_players.dbo.Imm_tblPlayerbalance set balance=@lfinalbal where playerid=@plid
IF @@ERROR <> 0
begin
-- There's an error b/c @ERROR is not 0, rollback
ROLLBACK
return
end
commit transaction
return
end
else
begin
begin transaction
insert into Imm_tblGameTransactions(playerid,gameid,Initialbalance,transactiondate,betamount,winamount,currencycode,finalbalance,sessionid)
values(@plid,@gameid,@linitbal,@transdate,@betamt,@winamt,'USD',@bal,@sessionid)
IF @@ERROR <> 0
Begin
-- There's an error b/c @ERROR is not 0, rollback
ROLLBACK
return
End
/*ELSE
COMMIT -- Success! Commit the transaction*/
select @ltransid=@@identity from Imm_tblGameTransactions
insert into Imm_tblGameDetailsBJ(transid,playercard,dealercard,typeid,result,split,insurance,playercardcount,dealercardcount,winvalue,betvalue,statusid)
values(@ltransid,@usercards,@dealercards,1,3,@split,@insurance,@useracecnt,@dealeracecnt,@winamt,@betamt,'G')
IF @@ERROR <> 0
Begin
-- There's an error b/c @ERROR is not 0, rollback
ROLLBACK
return
End
/*ELSE
COMMIT -- Success! Commit the transaction*/
commit transaction
return
end
end
GO
Similar Messages
-
I have problem with login in sql Server give me support .pre login handshake
I have problem with login in sql Server give me support .pre login handshake
The following threads are on the same topic:
http://www.sql-server-performance.com/forum/threads/pre-login-handshake-error-when-connecting-to-db.687/
http://stackoverflow.com/questions/12308340/sql-server-2000-connection-error-pre-login-handshake
http://dbaspot.com/sqlserver-server/458011-error-occurred-during-pre-login-handshake-microsoft-sql-server-error-10054-a.html
Kalman Toth Database & OLAP Architect
IPAD SELECT Query Video Tutorial 3.5 Hours
New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012 -
Oracle 11gR2 to SQL Server 2008 R2 - Problem executing SP on SQL server
Hi,
I have this problem: Executing a sp in SQL server from oracle
--------------------ORACLE SP--------------------
create or replace
PROCEDURE DRIVER_SP
AP IN OUT appl_param%ROWTYPE
as
v_sp_name varchar2(50);
v_control_id number;
val VARCHAR2(100);
cur INTEGER;
nr INTEGER;
BEGIN
v_sp_name := ap.MESSAGE_MISC_TEXT;
v_control_id := ap.control_id;
cur := DBMS_HS_PASSTHROUGH.OPEN_CURSOR@dblink_sqlserver;
DBMS_HS_PASSTHROUGH.PARSE@dblink_sqlserver(cur, 'execute ' || v_sp_name || ' ' || to_char(v_control_id));
LOOP
nr := DBMS_HS_PASSTHROUGH.FETCH_ROW@dblink_sqlserver(cur);
EXIT WHEN nr = 0;
DBMS_HS_PASSTHROUGH.GET_VALUE@dblink_sqlserver(cur, 1, val);
END LOOP;
DBMS_HS_PASSTHROUGH.CLOSE_CURSOR@dblink_sqlserver(cur);
driver_ap01_log_msg('Procedure returned: ' || val);
commit;
exception
when others then
driver_ap01_log_msg(sqlerrm);
END DRIVER_SP;
--------------------SQL Server SP-----------------------
ALTER PROCEDURE [dbo].[PA01_SP]
@control_id integer
AS
begin
--update PA01
--set infile_control_id = @control_id
--insert into dbo.PA01LOG(msg) values('test')
select 0
end
THE PROBLEM: Oracle SP calls SQL Server SP and any time I try to INSERT/UPDATE/DELETE (DML) within SQLServer SP it throws an exception on Oracle's end. Once I comment all DML code the proc runs fine.
+"ORA-28511: lost RPC connection to heterogeneous remote agent using SID=ORA-28511: lost RPC connection to heterogeneous remote agent using SID=(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=xxxxxxx)(PORT=1511))(CONNECT_DATA=(SID=dg4msql)))+
+ORA-02063: preceding line from DBLINK_SQLSERVER"+
Please help.
ThanksThanks for your response, it got me closer to my goal. I'm still facing one problem:
Let me explain what I need to achieve
Purpose
Execute an Oracle stored procedure which in turn executes a stored procedure on remote SQLServer which updates local tables on that SQLServer.
Observations
The execution of both procedures completes successfully. However, an explicit COMMIT statement must be issued on the Oracle session which initiated the transaction before any data could be read from the SQLServer updated table.
The following is test exercise for proof of concept.
PL/SQL code
declare
out_arg integer;
ret_val integer;
begin
out_arg := 0;
ret_val := "dbo"."ZZZ_SP"@DBLINK_SQLSERVER(10, out_arg);
dbms_output.put_line(to_char(out_arg));
end;
SQLServer code
ALTER procedure [dbo].[ZZZ_SP] (@arg1 integer, @arg2 integer output)
AS
begin tran tran1
insert into dbo.PA01LOG(msg) values('ddd')
commit tran tran1
set @arg2 = @arg1 * 100
select -1
GO
I have put the Oracle gateway in Single_Site mode to avoid two phase commit. I want SQLServer to be able to run its own transaction management. I don't want Oracle to be responsible for completing the transactions which take place within SQLServer.
I fear there might be a gap in my knowledge.
Any ideas why I need to issue a COMMIT in Oracle session to release the lock from SQLServer table?
Thanks -
Hi Everyone,
I have a problem with a stored procedure that when it's called from multiple clients at once it keeps causing deadlocks or not performing the way it's supposed.
I have the table below. The requirment is to insert a row in the table and increment the TrackingNumber by 1. The tracking number has to be sequential for each TrackingAsset and cannot skip number. The requirement at out of my control so I can't change them
just have to find a way to correct them.
Table Defention
CREATE TABLE [dbo].TrackingTable(
TrackingID [uniqueidentifier] NOT NULL,
TrackingNumber [bigint] NOT NULL,
TrackingAsset [uniqueidentifier] NOT NULL
) ON [PRIMARY]
The statement of the stored procedure that keeps dead locking is:
DECLARE @TrackingID UNIQUEIDENTIFIER = NEWID()
DECLARE @TracckingAsset UNIQUEIDENTIFIER = '01B8EBA6-64BE-48F6-841E-EF1988BFC9F7'
INSERT INTO
TrackingTable
TrackingID,
TrackingNumber,
TrackingAsset)
VALUES (
@TrackingID,
COALESCE(( SELECT MAX ( TrackingNumber ) From TrackingTable WHERE TrackingAsset= @TrackingAsset*/),0) + 1,
@TrackingAsset)
All the column names and table names are changed so don't mind spelling mistakes and names that don't make sense.
The Coalesce is there because the TrackingAsset may not exist so it'll return a null.
I've tired all (and I mean all) Transaction Isolation level to no avail. Depending on the isolation level I'll either get deadlocks or the TrackingNumber will not be Unique and Sequential.
I've also tried creating a table to hold the TrackingAsset and TrackingNumber and getting the number from there. It still caused the same issues.
Does anyone see a way around this?Hi
I think U must try With NOLock OPtion OR table hints
Ref :
http://technet.microsoft.com/en-us/library/ms187373.aspx
http://technet.microsoft.com/en-us/library/aa213026(v=sql.80).aspx
http://blog.sqlauthority.com/2011/05/08/sql-server-what-kind-of-lock-with-nolock-hint-takes-on-object/
http://blog.sqlauthority.com/2011/04/17/sql-server-applying-nolock-hint-at-query-level-nolock-for-whole-transaction/
http://www.codeproject.com/Tips/590560/wi
http://stackoverflow.com/questions/686724/sql-when-should-you-use-with-nolock
http://social.msdn.microsoft.com/Forums/sqlserver/en-US/f81ace67-1fb5-4fea-a2b9-344eca00f453/why-we-use-withnolock-in-sql-server-with-table?forum=transactsqlAll
The Best
Shridhar J Joshi Thanks a lot -
Problem to connect the SQL -Server
Hi Friends !!
I am using SQL Server as back end.till today its working as fine.today while connecting to the server suddenly its giving error as "Problem occured java.sql.SQLException: [Microsoft][ODBC SQL Server Driver][SQL Server]Login failed. The maximum simultaneous user count of 10 licenses for this 'Standard Edition' server has been exceeded. Additional licenses should be obtained and installed or you should upgrade to a full version. ".i am not getting ,what is the problem.if anybody knows please help me.
thanx in advance ...........prabhakarJust try restarting the sql derver or re-creating the DSN. I know, it's not logical, but it just might work.
-
Crystal Reports XI connection problems - after updating to SQL Server 2008
Hello!
We have some ASP.NET 2.0 Applications that call some CR XI report files with parameters to generate PDF Files. After upgrading from SQL Server 2005 to 2008 the apps hang when trying to generate the PDFs. Some research with Fiddler showed that ever time a 401 Error is raised. Calling the reports directly from CR Designer with the same connection values and Parameter shows the appropriate data that means the log-in data iare functioning.
I already tried switching the data source driver from OLE DB to SQL Native - no effect!
Can it be that CR XI does not work with SQL Server 2008? Or is there an update for CR XI and SQL Server 2008?
Because we are in a hurry I hope somebody can solve my problem(s) ...?!
Thanks in advance,
FrankHi Frank,
No CR XI is not supported nor is any version completely at this time. What we've found issues in so far are the Time(7) time is returned as a string value and Stored Procedure Data/time parameter SQL creation. The Time(7) field is an OLE DB driver issue with Microsoft but the Date/time SP issue is our issue and it's currently tracked and escalated. It will be fixed for CR 2008 with SP3 I believe. And I've asked that the same fix be rolled back to CR XI R2 but waiting on the reply from R&D if it can be done.
What you need to do is download the trial version of CR XI R2 ( Release 2 ) and then use your XI Keycode to install it and it will work. Then update to the latest SP 5 Service Pack. XI is past it's end of life support which means there will be no updates or bug fixes any more.
Next, MS SQL Server 2008 does not work with the MDAC version of the Native drivers, you must install the MS SQL Server Client. You'll see the driver name is "MS SQL Server Native client 10". This is the one you need to use.
Another work around is to use ODBC, it seems to resolve all issues, but the client must be installed.
Thank you
Don -
Month Display problem in OBI using SQL server
Hi I am using SQL Server and in one of the reports that I am producing the month is displayed as
CAL_MONTH
APRIL
AUGUST
DECEMBER
FEBRUARY
JANUARY
JULY
JUNE
MARCH
MAY
NOVEMBER
OCTOBER
SEPTEMBER
instead of
CAL_MONTH
JANUARY
FEBRUARY
MARCh
I used the Evaluate function that I used in Cube (ESSBASE) where it worked OK.
I created a logical column "Sort Order" and used the following expression:
EVALUATE('Rank( %1.dimension.currentmember,%2.members)' AS INTEGER , "MIC"."MIC_DL"."dbo"."DM_DATE"."CAL_MONTH", "MIC"."MIC_DL"."dbo"."DM_DATE"."CAL_MONTH")
Then I set the the Sort Order column with the CAL_MONTH column.
But this is giving me the following error when retrieving thru presentation layer
Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P
State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 16001] ODBC error state: 37000 code: 8180 message: [Microsoft][ODBC SQL Server Driver][SQL Server]Statement(s) could not be prepared.. [nQSError: 16001] ODBC error state: 37000 code: 1035 message: [Microsoft][ODBC SQL Server Driver][SQL Server]Incorrect syntax near 'Rank', expected 'OVER'.. [nQSError: 16002] Cannot obtain number of columns for the query result. (HY000)
SQL Issued: SELECT DM_DATE.CAL_MONTH saw_0 FROM MIC_DL ORDER BY saw_0
I used the expression Rankover in place of Rank but nothing fruitful.
Pls. guide.
Edited by: user10729112 on Aug 24, 2009 7:52 AMCould anyone guide on this pls....
I could create a duplicate column containing the vlaues 1,2 .....for the month and use "Case - When " expression but the table has already been built with Jan, Feb ......
Pls. help. -
Problem with Datasource for SQL Server Express
I have set up a development environment to develop some processes for the HCSO client and have a question. I have a turnkey install on my laptop with MYSQL. The liveCycle databases are in MYSQL. I have also installed SQL Server Express on this machine and created a table to query that will control workflow. I added a datasource configuration in the adobe-ds.xml configuration file. That configuration is:
<local-tx-datasource>
<jndi-name>HCSO</jndi-name>
<connection-url>jdbc:sqlserver://localhost:1433;DatabaseName=DBName</connection-url>
<driver-class>com.microsoft.sqlserver.jdbc.SQLServerDriver</driver-class>
<user-name>username</user-name>
<password>password</password>
<min-pool-size>1</min-pool-size>
<max-pool-size>30</max-pool-size>
<blocking-timeout-millis>60000</blocking-timeout-millis>
<autoReconnect>true</autoReconnect>
<idle-timeout-minutes>15</idle-timeout-minutes>
<prepared-statement-cache-size>100</prepared-statement-cache-size>
<transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation>
<new-connection-sql>Select id from HCSOUser.eric</new-connection-sql>
<check-valid-connection-sql>Select id from HCSOUser.eric</check-valid-connection-sql>
<metadata>
<type-mapping>MS SQLSERVER2000</type-mapping>
</metadata>
</local-tx-datasource>
In SQL Server, I created a user and a schema with the same name in a database. I created a simple table called "eric" with one column called "id". The user was given the appropriate default schema and given full permissions on the database and table.
In workbench, I added a JDBC query single row activity. I have configured the datasource as java:/HCSO and also tried java:HCSO. I then entered the query as "Select id from HCSOUser.eric" and hit test. Nothing appears in the results area. I see the following in the server.log:
2009-09-24 14:44:26,437 ERROR [org.jboss.ejb.plugins.LogInterceptor] RuntimeException in method: public abstract java.lang.Object com.adobe.idp.dsc.transaction.impl.ejb.adapter.EjbTransactionBMTAdapterLocal.doBMT(com.ad obe.idp.dsc.transaction.TransactionCallback) throws com.adobe.idp.dsc.DSCException:
java.lang.RuntimeException: A result set was generated for update.
at com.adobe.idp.dsc.jdbc.JDBCService.testExecute(JDBCService.java:616)
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:592)
at com.adobe.idp.dsc.component.impl.DefaultPOJOInvokerImpl.invoke(DefaultPOJOInvokerImpl.jav a:118)
at com.adobe.idp.dsc.interceptor.impl.InvocationInterceptor.intercept(InvocationInterceptor. java:140)
at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptor ChainImpl.java:60)
at com.adobe.idp.dsc.transaction.interceptor.TransactionInterceptor$1.doInTransaction(Transa ctionInterceptor.java:74)
at com.adobe.idp.dsc.transaction.impl.ejb.adapter.EjbTransactionBMTAdapterBean.doBMT(EjbTran sactionBMTAdapterBean.java:197)
at sun.reflect.GeneratedMethodAccessor573.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:592)
at org.jboss.invocation.Invocation.performCall(Invocation.java:345)
at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionConta iner.java:214)
at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionI nterceptor.java:149)
at org.jboss.webservice.server.ServiceEndpointInterceptor.invoke(ServiceEndpointInterceptor. java:54)
at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:48)
at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:106)
at org.jboss.ejb.plugins.AbstractTxInterceptorBMT.invokeNext(AbstractTxInterceptorBMT.java:1 58)
at org.jboss.ejb.plugins.TxInterceptorBMT.invoke(TxInterceptorBMT.java:62)
at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstance Interceptor.java:154)
at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:153)
at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192)
at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor. java:122)
at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:624)
at org.jboss.ejb.Container.invoke(Container.java:873)
at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:415)
at org.jboss.ejb.plugins.local.StatelessSessionProxy.invoke(StatelessSessionProxy.java:88)
at $Proxy270.doBMT(Unknown Source)
at com.adobe.idp.dsc.transaction.impl.ejb.EjbTransactionProvider.execute(EjbTransactionProvi der.java:95)
at com.adobe.idp.dsc.transaction.interceptor.TransactionInterceptor.intercept(TransactionInt erceptor.java:72)
at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptor ChainImpl.java:60)
at com.adobe.idp.dsc.interceptor.impl.InvocationStrategyInterceptor.intercept(InvocationStra tegyInterceptor.java:55)
at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptor ChainImpl.java:60)
at com.adobe.idp.dsc.interceptor.impl.InvalidStateInterceptor.intercept(InvalidStateIntercep tor.java:37)
at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptor ChainImpl.java:60)
at com.adobe.idp.dsc.interceptor.impl.AuthorizationInterceptor.intercept(AuthorizationInterc eptor.java:132)
at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptor ChainImpl.java:60)
at com.adobe.idp.dsc.interceptor.impl.JMXInterceptor.intercept(JMXInterceptor.java:48)
at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptor ChainImpl.java:60)
at com.adobe.idp.dsc.engine.impl.ServiceEngineImpl.invoke(ServiceEngineImpl.java:115)
at com.adobe.idp.dsc.routing.Router.routeRequest(Router.java:118)
at com.adobe.idp.dsc.provider.impl.base.AbstractMessageReceiver.invoke(AbstractMessageReceiv er.java:315)
at com.adobe.idp.dsc.provider.impl.soap.axis.sdk.SoapSdkEndpoint.invokeCall(SoapSdkEndpoint. java:138)
at com.adobe.idp.dsc.provider.impl.soap.axis.sdk.SoapSdkEndpoint.invoke(SoapSdkEndpoint.java :81)
at sun.reflect.GeneratedMethodAccessor710.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:592)
at org.apache.axis.providers.java.RPCProvider.invokeMethod(RPCProvider.java:397)
at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:186)
at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:323)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:454)
at org.apache.axis.server.AxisServer.invoke(AxisServer.java:281)
at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:699)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.j ava:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at com.adobe.idp.dsc.provider.impl.soap.axis.InvocationFilter.doFilter(InvocationFilter.java :43)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.j ava:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.j ava:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.ja va:159)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11P rotocol.java:744)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
at java.lang.Thread.run(Thread.java:595)
Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: A result set was generated for update.
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.doExecuteStatement(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerStatement$StatementExecutionRequest.executeStatemen t(Unknown Source)
at com.microsoft.sqlserver.jdbc.CancelableRequest.execute(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeRequest(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeUpdate(Unknown Source)
at org.jboss.resource.adapter.jdbc.WrappedStatement.executeUpdate(WrappedStatement.java:161)
at com.adobe.idp.dsc.jdbc.helper.SqlHelper.executeTestUpdate(SqlHelper.java:117)
at com.adobe.idp.dsc.jdbc.JDBCService.testExecute(JDBCService.java:610)
... 82 moreThanks fot the tip, but now I got a different message in the "Test" results of "Query Single Row":
Exception: Could not create connection; - nested throwable: (com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host has failed. java.net.ConnectException: Connection refused: connect); - nested throwable: (org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host has failed. java.net.ConnectException: Connection refused: connect))
My datasource xml is like this:
<?xml version="1.0" encoding="UTF-8"?>
<datasources>
<local-tx-datasource>
<jndi-name>MSSQL</jndi-name>
<connection-url>jdbc:sqlserver://localhost:1433;DatabaseName=ADOBE</connection-url>
<use-java-context>false</use-java-context>
<driver-class>com.microsoft.sqlserver.jdbc.SQLServerDriver</driver-class>
<user-name>sa</user-name>
<password>adobe</password>
<min-pool-size>10</min-pool-size>
<max-pool-size>50</max-pool-size>
<blocking-timeout-millis>60000</blocking-timeout-millis>
<idle-timeout-minutes>15</idle-timeout-minutes>
<prepared-statement-cache-size>100</prepared-statement-cache-size>
<transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation>
<check-valid-connection-sql>SELECT 1 FROM sysobjects</check-valid-connection-sql>
<metadata>
<type-mapping>MS SQLSERVER2005</type-mapping>
</metadata>
</local-tx-datasource>
</datasources>
Where is the problem and how to fix it?
Thank you. -
Problem with Connection to SQL Server via Servlet (in iPlanet 6 App Server)
Hi ,
I am using the iPlanet ApplicationServer 6.0 SP2 for development & testing of an internet application.
I am facing a problem when I am trying to connect to MS SQL SERVER via the native jdbcodbc driver (obdc32.dll). The error is something like this :
[26/Jul/2001 11:50:35:7] warning: DriverConnect: (28000): [Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user '\'.(DB Error: 18456)
[26/Jul/2001 11:50:35:7] warning: ODBC-027: CreateConn: failed to create connection [new connection]: DSN=fadd,DB=cashbook,USER=test,PASS=xxxxxxxxx
[26/Jul/2001 11:50:35:7] error: DATA-108: failed to create a data connection wit
h any of specified drivers
Error in connecting to the Database for cirrus :java.sql.SQLException: failed to
create a data connection with any of specified drivers
java.sql.SQLException: failed to create a data connection with any of specified
drivers
at com.netscape.server.jdbc.Driver.afterVerify(Unknown Source)
at com.netscape.server.jdbc.Driver.connect(Unknown Source)
at com.netscape.server.jdbc.DataSourceImpl.getConnection(Unknown Source)
at gefa.util.DBConnection.jdbcConnectionOpen(DBConnection.java:65)
at gefa.servlet.ServUpload.doPost(ServUpload.java:45)
at gefa.servlet.ServUpload.doGet(ServUpload.java:29)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
at com.netscape.server.servlet.servletrunner.ServletInfo.service(Unknown
Source)
at com.netscape.server.servlet.servletrunner.ServletRunner.execute(Unkno
wn Source)
at com.kivasoft.applogic.AppLogic.execute(Unknown Source)
at com.kivasoft.applogic.AppLogic.execute(Unknown Source)
at com.kivasoft.thread.ThreadBasic.run(Native Method)
at java.lang.Thread.run(Thread.java:479)
I have configured a DSN with the name "fadd" on the machine with the application server and it used NT authentication. I have supplied an NT userid and password that has appropriate rights on the database "cashbook".
When I write a java standalone program, it does connect but via a servlet it does not connect.
Can some guide me with this problem please ?
Anything one might have observed in the past ? (may be specific to iPlanet ?)
Thanks a lot in advance
~SunilI'm using iPlanet App server as well and experiencing similar problem. I load my SQL Server driver by Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver"), then use DriverManager.getDriver() to obtain the Driver.
However, the Driver returned is not the SQLServerDriver as expected. The Driver returned is com.netscape.server.jdbc.Driver! And then when I do Driver.getConnection("jdbc:microsoft:sqlserver://MyServer"), it throws an SQLException saying that it doesn't accept a jdbc:microsoft:sqlserver subprotocol. Well, of course it doesn't, it's not a microsoft Driver at all.
I suspect the problem is that the netscape Driver's acceptsURL() method ALWAYS returns true in iPlanet app server, thus when you getDriver(), the netscape Driver is always returned (and always returned as the first one since it's default?). Thus even though the same piece of code works fine as a standalone application, it just doesn't work on iPlanet app server.
My work around is:
Class.forName("my.Driver");
Enumeration enu = DriverManager.getDrivers();
Driver useThis = null;
while (enu.hasMoreElements()) {
Driver d = (Driver)enu.nextElement();
if (d.getClass().toString().indexOf("my.Driver") > -1) {
useThis = d;
Mind that my above code does not have an performance issue. If you look into the source code of how DriverManager get a Driver for a particular URL, it also loads the whole set of available Drivers, then call acceptsURL() method on each of them to find the first "suitable" one. Thus time complexity is the same.
I know this is not a very elegant solution and it defeats the purpose of having a DriverManager. Does any one else has a better way to solve this problem, like a way to specify the priority of each Driver so that SQLServerDriver is returned before the netscape Driver?
Thanks a lot. -
Having problems connecting Coldfusion10 with sql server express 2012
Hi,
I am having problems setting up a datasource for a local sql express 2012 server. Its running as the default instance. Connections are working with ODBC and client told just not Coldfusion.
When I try to set up a connection using the sql driver I get this error:
Connection verification failed for data source: Leaf
java.sql.SQLNonTransientConnectionException: [Macromedia][SQLServer JDBC Driver]Error establishing socket to host and port: 127.0.0.1:1433. Reason: Invalid argument: connect
The root cause was that: java.sql.SQLNonTransientConnectionException: [Macromedia][SQLServer JDBC Driver]Error establishing socket to host and port: 127.0.0.1:1433. Reason: Invalid argument: connect
When I try a Socket connection with an ODBC connection I setup in windows I get this error:
Connection verification failed for data source: LeafDB
java.sql.SQLException: [Macromedia][SequeLink JDBC Driver]Internal network error, connection closed.
The root cause was that: java.sql.SQLException: [Macromedia][SequeLink JDBC Driver]Internal network error, connection closed.
Any ideas?
Thanks,Hi Rossco199,
The issue is likely caused by you not having yet assigned port 1433 in SQL Express itself. Follow the procedure described on the following page, and you should solve the problem: http://www.tensixconsulting.com/2012/02/sqlserverexception-the-tcpip-connection-to-the-hos t-port-1433-has-failed/
In particular, remember to assign port 1433 to 127.0.0.1 and to IPAll. Also set 'Active' and 'Enabled' to 'Yes' for the IP 127.0.0.1. While you're at it, if 'Named Pipes' is disabled, you should right-click on it and select 'enable'. Afterwards, restart the Windows service 'SQL Server(SQLEXPRESS)'.
It is advisable to allow ColdFusion server authentication. However, the SQL Express server is configured by default to allow only Windows authentication. This conflict may lead to errors.
Should you then encounter the dreaded Error 233: "No process is on the other end of the pipe", proceed as follows. Open the tool Microsoft SQL Server Management Studio. Right-click on the name of your database server, then on Properties. In the user interface that opens, click on Security. Select the combined 'SQL Server and Windows Authentication mode'. Restart the service 'SQL Server(SQLEXPRESS)'. -
Problem in connection with sql server
hi ,
i am facing problem in connection with ms sql server..please help me out.... i created the database ChandanClient...and there is one table Expense_code_Table...
i want to insert the data into this table.. i am trying to create a demo example.. here is the code
package demo;
import java.sql.*;
public class getdatabase {
public static void main(String[] args) {
Connection con =null;
int ExpenceCode1=1;
String ExpenceName1="exp_paper";
String Organization1="exp_organization";
try
Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
con=DriverManager.getConnection("jdbc:microsoft:sqlserver://localhost:1433");
Statement st = con.createStatement();
String q1="INSERT INTO Expense_code_Table(ExpenceCode,ExpenceName,Organization)VALUES("+ExpenceCode1+",'"+ExpenceName1+"','"+Organization1+"')";
st.execute(q1);
}catch(Exception e)
System.out.println(e);
try
con.close();
catch (SQLException e)
e.printStackTrace();
after running program
it is showing me...
java.lang.ClassNotFoundException: com.microsoft.jdbc.sqlserver.SQLServerDriver
java.lang.NullPointerException
at demo.getdatabase.main(getdatabase.java:22)
Exception in thread "main"
please help me out how to solve this problem...
thanks in advance...
bye
chandan sharmaPut ur driver class files in the class path...
regards
Shanu -
Problem with migrating data (SQL Server 2k offline data capture)
Hi there,
I try to migrate a SQL Server 2000 database to Oracle 10g (R2) using offline data capture. I following the online Tutorial “Migrate from Microsoft SQL Server to Oracle Database 10g Using Oracle Migration Workbench” and everything seems OK until “Migrating the tablespaces, users and user tables to the destination database” http://www.oracle.com/technology/obe/10gr2_db_vmware/develop/omwb/omwb.htm#t5. I have two errors on 2 (out of 85 ) tables saying “ Failed to create default for Table :
ORA-00907: missing right parenthesis”. I checked the column/table names and they seems OK. I don’t understand why I got these errors. However, when I checked the ‘SA’ Schema in Oracle Enterprise Manager Console, I can see all the tables (including the two problem ones).
I then carry on to the next step and tried to migrate data to the destination database (http://www.oracle.com/technology/obe/10gr2_db_vmware/develop/omwb/omwb.htm#t6) I am now stuck on step 5. “…copy the files from c:\omwb\data_files to the c:\omwb\Omwb\sqlloader_scripts\SQLServer2K\<timestamp>\Oracle directory…” I cannot find the ‘c:\omwb\data_files’ directory, in fact, I don’t have a directory called ‘data_files’ on my machine. I noticed the ‘c:\omwb\Omwb\sqlloader_scripts\SQLServer2K\<timestamp>\Oracle’ directory contains the all the 85 [tableName].ctl files (plus two other files: ‘sql_load_script’ and ‘sql_load_script.sh’). From the screenshots online, ‘c:\omwb\data_files’ seems contains files with the same name as the [tableName]. Therefore, I did a search with [tableName] but cannot find any apart from the [tableName].ctl file in the ‘c:\omwb\Omwb\sqlloader_scripts\SQLServer2K\<timestamp>\Oracle’ directory. What should I do next?
OS: windows 2003 with SP1
Oracle: 10g Release 2
SQL Server 2000
Any help would be extremely appreciated.
HelenHelen,
Sorry, I am new here. Could you please tell me (or point me to the related documents about) how to output the Oracle model as a script?Action-> Generate Migration Scripts
And what do you mean by ‘The default conversion may have failed’? Do you mean data type mapping? I went through all the columns and tables and checked the data types in the Oracle model already. The processing for the default for a table column could have something the basic workbench default parser cannot handle.
I hope you are finding the workbench to be a productive aid to migration.
Regards,
Turloch
Oracle Migration Workbench Team -
Problem: VSS error with 'SQL Server Backup to Windows Azure Tool' installed
When 'SQL Server Backup to Windows Azure Tool' is installed, shadow copies cannot be enable and backups fail. When attempting to enable shadow copies, we get a "volsnap" error: "The shadow copies of volume X were aborted because
of a failed free space computation". After uninstalling the "Tool", VSS works. Reinstalling "Tool" causes the problem to return.
While the error suggests a space issue, there is plenty of space on the server's two volumes. Additionally, another 100GB volume was added and VSS storage was allocated to it; still received the error.
Issue seems to point to 'SQL Server Backup to Windows Azure Tool'.
Environment: Hyper-V guest: "Windows Server 2012 R2 Standard" with "SQL Server 2008 R2 Standard". Using "Azure Storage" for SQL backups.
Suggestions?Hello,
Yes, we have a confirmed interference between the tool and the VSS Framework. This was identified very recently and is under investigation by the product group. Since the issue is within the filter driver shipped by the tool, that unfortunately means that
you currently need to choose between the tool and a working VSS Framework. If the latter is more important, then uninstall the tool (that will require a restart).
We apolologize for the inconvenience. I'm going to try to get the home page of the tool updated to avoid other situations like yours. Hopefully we should see a new version of the tool soon.
As a side note, recent versions of SQL Server can directly use Azure Storage as backup target, see
http://msdn.microsoft.com/en-us/library/jj919148(v=sql.110).aspx.
Regards,
Guillaume Fourrat - Microsoft France -
Problem pushing data from sql server to Oracle
Hello!!!
I am required to work with my IT collegues and allow the MSSQL server to insert records into oracle. But I am having problem from the sql server end while trying to insert a record by throwing the following error message:
Server: Msg 7399, Level 16, State 1, Line 1
OLE DB provider 'MSDAORA' reported an error.
[OLE/DB provider returned message: Oracle client and networking components were not found. These components are supplied by Oracle Corporation and are part of the Oracle Version 7.3.3 or later client software installation.
_*The following were my configurations that I did in order to create a linked server and testing with a querty*_
1. Installed Oracle Client 10g in the sqlserver.
2. Configured TNSNAMES alias
-------> I can perform tnsping <alias name>
-------> I can even from the sql server machine through command prompt connect to my Oracle database server via "sqlplus scott/tiger@orcl" ( the problem is I cant connect via SQL server studio)
3. I executed the following script inorder to create a linked server and perform a query.
EXEC sp_addlinkedserver
'orcl', -- Name of the linked Server
'Oracle', -- Product name of the linked server (optional)
'MSDAORA', -- Is the name of the Microsoft OLE DB Provider for Oracle
'orcl' -- Oracle Data Source name
EXEC sp_addlinkedsrvlogin
'orcl', -- Name of the created linked server
false, -- Name of the SQL login to be used on the remote system
'sa', -- Name of the SQL user login
'scott', -- Name of the Oracle user login
'tiger' -- Password of the Oracle user login
SELECT * FROM orcl..SCOTT.EMP
Any help with regard to this will greatly appreciated.
Warm Regards,
Asif MuhammadHi!
I was able to sought out the problem, and I have done a very silly mistake.
I had my MSSQL server database at SERVERA and had the connection to the SERVERA from SERVERB, i.e. SERVERB dont have the database MSSQL database but just a connection to the MSSQL server database.
What I have done is, since we had the testing done from SERVERB, I had the Oracle Client installed on SERVERB (this is the problem). We have to have the Oracle Client installed in the SERVERA where the MSSQL database is residing. Just wanted to point out here, so that this might be helpful incase anyone encounters the same problem in the future.
Guys, the problem that I m facing now despite the fact that I can perform Select, Insert queries from MSSQL to Oracle now is, that I am recieving the following error when certain transaction is issued. There error message is:
Server: Msg 7391, Level 16, State 1, Procedure tgTest, Line 5. The operation could not be performed because the OLE DB provider 'MSDAORA' was unable to begin a distributed transaction.Any help with this regard will be greatly appreciated!!!
Regards... -
SQLCE Agent Replication Problem, maybe related to SQL Server not on default port
I've got a problem getting the SQL Server CE Replication setup on a new server. SQL Server is 2008 R2 but we are running on a non-standard port (not 1433) and I'm not sure where I'd tell the agent that or if I need to. I've turned on full diagnostics and
set the Level to 3. Using the diag option on the agent, I can see that is set.
In the log file, I get this error: Hr=80004005 ERR:OpenDB failed getting pub version 28627 (rest of log is below)
when I try to sync
and the client gets: : 0x80004005
Message : Failure to connect to SQL Server with provided connection information. SQL Server does not exist, access is denied because the IIS user is not a valid user on the SQL Server, or the password is incorrect.
Minor Err.: 29061
I am pretty certain that the user name / password are correct and I can connect as that user in SQL Server Management Studio. I don't see anything in the SQL Server log file for a failed connection. I do so those if I login through the Management Studio
without entering the password for example so I believe that is setup. The Agent is on the same machine as the database server so I don't believe it is a firewall or network error but this is a new machine / setup so I may be missing something in the
setup.
I am not sure exactly what else to look at to try to understand what is going on.
Agent Log (Partial):
2014/09/30 19:36:51 Hr=00000000 Compression Level set to 1
2014/09/30 19:36:51 Hr=00000000 Count of active RSCBs = 0
2014/09/30 19:36:51 Thread=EC8 RSCB=2 Command=OPWC Hr=00000000 Total Compressed bytes in = 203
2014/09/30 19:36:51 Thread=EC8 RSCB=2 Command=OPWC Hr=00000000 Total Uncompressed bytes in = 385
2014/09/30 19:36:51 Thread=EC8 RSCB=2 Command=OPWC Hr=00000000 Responding to OpenWrite, total bytes = 203
2014/09/30 19:36:51 Thread=EC8 RSCB=2 Command=OPWC Hr=00000000 C:\inetpub\wwwroot\MobileRepService\35.71ACEC98F130_15D653BB-58BD-440A-BE57-C94E24CDCB59 0
2014/09/30 19:36:51 Thread=137C RSCB=2 Command=SYNC Hr=00000000 Synchronize prepped 0
2014/09/30 19:37:08 Hr=80004005 ERR:OpenDB failed getting pub version 28627
2014/09/30 19:37:09 Thread=137C RSCB=2 Command=SCHK Hr=80004005 SyncCheck responding 0
2014/09/30 19:37:09 Thread=137C RSCB=2 Command=SCHK Hr=00000000 Removing this RSCB 0
<STATS Period_Start="2014/09/30 19:32:50" Period_Duration="904" Syncs="2" SubmitSQLs="0" RDAPushes="0" RDAPulls="0" AVG_IN_File_Size="385" AVG_OUT_File_Size="0" Completed_Operations="0"
Incomplete_Operations="2" Total_Sync_Thread_Time="33" Total_Transfer_Thread_Time_IN="0" Total_Transfer_Thread_Time_OUT="0" Total_Sync_Queue_Time="0" Total_Transfer_Queue_Time_IN="0" Total_Transfer_Queue_Time_OUT="0"
/>Thanks - that got me past that issue - I was passing the wrong database as the Publisher due to a configuration error (we are bringing up a new publication server and missed changing one of the parameters in a configuration file). I've now got another
error but if I can't determine what is wrong with that I'll post a different question.
Maybe you are looking for
-
Error while creating a new Dimension/Model in BPC 10.0 NW
Hello Experts, I am using BPC 10.0 NW system. When I try to create new Dimensions or Models I get the following Error Message. "Error in Admin module or a component used by Admin module. Failed to create SAP NetWeaver BI InfoObject for dimension." I
-
Error while saving the request
Dear all, When i am saving the request through transaction FKKORD1 transaction .I am getting the following dump.Please let me know how to resolve this issue. Runtime Errors GETWA_NOT_ASSIGNED Date and Time 07.01.2010 13:40:12 Short t
-
Why are my bookmarks not in the dropdown menu?
I upgraded to the Firefox 4 beta version and none of my bookmarks show up in the dropdown menu. Id also like to point out thatnone of my previously saved passwords show up and Firefox doesnt ask me if i want to save them when i enter them. Im not sur
-
Macbook Pro sound problem... sometimes....
My girlfriend has a MBP with a Bootcamp installation with windows XP on it for "windows only" programs. Macbook Pro 15" 2.4Ghz 2GB ram 2 partition hard drive (OSX and XP) Windows XP SP2 However, occasionally we have been having problems regarding sou
-
Bridge 1300 building to building link for VOIP Data Rates settings and QoS
Hi, What are the recomendations for data rates settings of wlan fo using voip in a link building to building. Default is speed basic-1.0 basic-2.0 basic-5.5 6.0 9.0 basic-11.0 12.0 18.0 24.0 36.0 48.0 54.0 Should i maintain or change to what? Also wh