Showing posts with label java. Show all posts
Showing posts with label java. Show all posts

Thursday, March 8, 2012

Could not find stored procedure spc_AddInformation.

After designing the database and completing the Java class to enter data into the database, I decided to take it home to work on the other pages for this application. (The data was transferring to the database with no problem at work). I restored the database and brought it home with me to setup it up on my pc at home. I setup the database at home and was able to load the driver and connect to the database but for some reason it can't find the stored procedure. The stored procedure is in the database but for some reason I keep getting this message -

SQL error.java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Could not find stored procedure 'spc_AddInformation'.

I've worked all day to find the problem but no luck. Can somebody let me know what the problem could be? It's not the code in the Java class because Im connecting to the database and the stored procedure name is correct in the code. What could be the problem? Thank You.Already answered in another forum - due to the login being used on the new server.

Sunday, February 19, 2012

Could database mirroring make an application fail?

Hello!
We have a Java application where some things are indicating that it can not
run against a SQL Server 2005 database when database mirroring is enabled.
We're getting an error message in the application.
SQLState:HY000 ErrorCode:0 [DataDirect][SQLServer JDBC
Driver][DataDirect][SQLServer JDBC Driver]Unhandled token type: Unknown
token: 0x54
java.sql.SQLException: [DataDirect][SQLServer JDBC
Driver][DataDirect][SQLServer JDBC Driver]Unhandled token type: Unknown
token: 0x54
In Profiler we can see a successfull login and then nothing more.
Is SQL Server returning some extra information if database mirroring is
enabled that could make a badly coded application / driver fail?
Best regards
Ola
It could be possible, however I don't think so. The mirroring uses service
broker to send the transactions to the remote machine.
Unless the java application is receiving the mirror partner information and
doesn't know what to do with it.
I would recommend getting a network sniffer and then having the app log into
a non-mirrored database, then a morrored database and see what the differenes
in the actual network traffic are. If you could post back your results it
may be helpfull to others.
Denny
MCSA (2003) / MCDBA (SQL 2000)
MCTS (SQL 2005 / Microsoft Windows SharePoint Services 3.0: Configuration /
Microsoft Office SharePoint Server 2007: Configuration)
MCITP (dbadmin, dbdev)
"Ola Hallengren" wrote:

> Hello!
> We have a Java application where some things are indicating that it can not
> run against a SQL Server 2005 database when database mirroring is enabled.
> We're getting an error message in the application.
> SQLState:HY000 ErrorCode:0 [DataDirect][SQLServer JDBC
> Driver][DataDirect][SQLServer JDBC Driver]Unhandled token type: Unknown
> token: 0x54
> java.sql.SQLException: [DataDirect][SQLServer JDBC
> Driver][DataDirect][SQLServer JDBC Driver]Unhandled token type: Unknown
> token: 0x54
> In Profiler we can see a successfull login and then nothing more.
> Is SQL Server returning some extra information if database mirroring is
> enabled that could make a badly coded application / driver fail?
> Best regards
> Ola

Could database mirroring make an application fail?

Hello!
We have a Java application where some things are indicating that it can not
run against a SQL Server 2005 database when database mirroring is enabled.
We're getting an error message in the application.
SQLState:HY000 ErrorCode:0 [DataDirect][SQLServer JDBC
Driver][DataDirect][SQLServer JDBC Driver]Unhandled token type: Unknown
token: 0x54
java.sql.SQLException: [DataDirect][SQLServer JDBC
Driver][DataDirect][SQLServer JDBC Driver]Unhandled token type: Unknown
token: 0x54
In Profiler we can see a successfull login and then nothing more.
Is SQL Server returning some extra information if database mirroring is
enabled that could make a badly coded application / driver fail?
Best regards
OlaIt could be possible, however I don't think so. The mirroring uses service
broker to send the transactions to the remote machine.
Unless the java application is receiving the mirror partner information and
doesn't know what to do with it.
I would recommend getting a network sniffer and then having the app log into
a non-mirrored database, then a morrored database and see what the differenes
in the actual network traffic are. If you could post back your results it
may be helpfull to others.
--
Denny
MCSA (2003) / MCDBA (SQL 2000)
MCTS (SQL 2005 / Microsoft Windows SharePoint Services 3.0: Configuration /
Microsoft Office SharePoint Server 2007: Configuration)
MCITP (dbadmin, dbdev)
"Ola Hallengren" wrote:
> Hello!
> We have a Java application where some things are indicating that it can not
> run against a SQL Server 2005 database when database mirroring is enabled.
> We're getting an error message in the application.
> SQLState:HY000 ErrorCode:0 [DataDirect][SQLServer JDBC
> Driver][DataDirect][SQLServer JDBC Driver]Unhandled token type: Unknown
> token: 0x54
> java.sql.SQLException: [DataDirect][SQLServer JDBC
> Driver][DataDirect][SQLServer JDBC Driver]Unhandled token type: Unknown
> token: 0x54
> In Profiler we can see a successfull login and then nothing more.
> Is SQL Server returning some extra information if database mirroring is
> enabled that could make a badly coded application / driver fail?
> Best regards
> Ola

Could database mirroring make an application fail?

Hello!
We have a Java application where some things are indicating that it can not
run against a SQL Server 2005 database when database mirroring is enabled.
We're getting an error message in the application.
SQLState:HY000 ErrorCode:0 [DataDirect][SQLServer JDBC
Driver][DataDirect][SQLServer JDBC Driver]Unhandled token type: Unkn
own
token: 0x54
java.sql.SQLException: [DataDirect][SQLServer JDBC
Driver][DataDirect][SQLServer JDBC Driver]Unhandled token type: Unkn
own
token: 0x54
In Profiler we can see a successfull login and then nothing more.
Is SQL Server returning some extra information if database mirroring is
enabled that could make a badly coded application / driver fail?
Best regards
OlaIt could be possible, however I don't think so. The mirroring uses service
broker to send the transactions to the remote machine.
Unless the Java application is receiving the mirror partner information and
doesn't know what to do with it.
I would recommend getting a network sniffer and then having the app log into
a non-mirrored database, then a morrored database and see what the differene
s
in the actual network traffic are. If you could post back your results it
may be helpfull to others.
--
Denny
MCSA (2003) / MCDBA (SQL 2000)
MCTS (SQL 2005 / Microsoft Windows SharePoint Services 3.0: Configuration /
Microsoft Office SharePoint Server 2007: Configuration)
MCITP (dbadmin, dbdev)
"Ola Hallengren" wrote:

> Hello!
> We have a Java application where some things are indicating that it can no
t
> run against a SQL Server 2005 database when database mirroring is enabled.
> We're getting an error message in the application.
> SQLState:HY000 ErrorCode:0 [DataDirect][SQLServer JDBC
> Driver][DataDirect][SQLServer JDBC Driver]Unhandled token type: Un
known
> token: 0x54
> java.sql.SQLException: [DataDirect][SQLServer JDBC
> Driver][DataDirect][SQLServer JDBC Driver]Unhandled token type: Un
known
> token: 0x54
> In Profiler we can see a successfull login and then nothing more.
> Is SQL Server returning some extra information if database mirroring is
> enabled that could make a badly coded application / driver fail?
> Best regards
> Ola