Showing posts with label hii. Show all posts
Showing posts with label hii. Show all posts

Friday, March 30, 2012

Problem with clustered index

Hi!
I have a table with 5 primary keys. I have clustered index defined on
all 5 columns. However, I can see that this index is only using three
columns and not five. Why is that?
Also,
I for some reason when I run queries I get index scan as opposed to
index seek.
Thanks,
T.It sounds like the indexes you have are not working for you.
For us to assist you, please post the table DDL, along with a query or two
that you believe do not properly use indexing.
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
You can't help someone get up a hill without getting a little closer to the
top yourself.
- H. Norman Schwarzkopf
"tolcis" <a.liberchuk@.verizon.net> wrote in message
news:1164740732.714927.282500@.j44g2000cwa.googlegroups.com...
> Hi!
> I have a table with 5 primary keys. I have clustered index defined on
> all 5 columns. However, I can see that this index is only using three
> columns and not five. Why is that?
> Also,
> I for some reason when I run queries I get index scan as opposed to
> index seek.
> Thanks,
> T.
>|||> I have a table with 5 primary keys.
You can only have one PK per table. I assume you mean you have one PK based
on 5 columns.

> I have clustered index defined on
> all 5 columns.
You mean that the index that goes with the PK is the clustered index.

> However, I can see that this index is only using three
> columns and not five.
Where do you see this?

> I for some reason when I run queries I get index scan as opposed to
> index seek.
You never get a table scan when a table has a clustered index, so I assume y
ou mean "clustered index
scan". We need to know the table structure, indexes and queries to determine
whether the index can
support your queries.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"tolcis" <a.liberchuk@.verizon.net> wrote in message
news:1164740732.714927.282500@.j44g2000cwa.googlegroups.com...
> Hi!
> I have a table with 5 primary keys. I have clustered index defined on
> all 5 columns. However, I can see that this index is only using three
> columns and not five. Why is that?
> Also,
> I for some reason when I run queries I get index scan as opposed to
> index seek.
> Thanks,
> T.
>|||This is the table DDL:
if exists (select * from dbo.sysobjects where id =
object_id(N'[dbo].[SERVICEW]') and OBJECTPROPERTY(id, N'IsUserTable'
) =
1)
drop table [dbo].[SERVICEW]
GO
CREATE TABLE [dbo].[SERVICEW] (
[AppCode] [varchar] (5) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NUL
L
,
[IdNumber] [int] NOT NULL ,
[Family] [int] NOT NULL ,
[Sequence] [bigint] NOT NULL ,
[Source] [varchar] (16) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NUL
L
,
[ApplicantType] [int] NULL ,
[Status] [int] NULL ,
[Type] [int] NULL ,
[UniqueExpansionId] [varchar] (50) COLLATE
SQL_Latin1_General_CP1_CI_AS NULL ,
[UniqueIdNumber] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS
NULL ,
[Price] [real] NULL ,
[PriceOption] [int] NULL ,
[Quantity] [int] NULL ,
[Description] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS
NULL ,
[ProductCode] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NU
LL
,
[exported] [bit] NULL ,
[UPTODATE] [bit] NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[SERVICEW] WITH NOCHECK ADD
CONSTRAINT [PK_SERVICEW] PRIMARY KEY CLUSTERED
(
[IdNumber],
[Family],
[AppCode],
[Sequence],
[Source]
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[SERVICEW] ADD
CONSTRAINT [DF__SERVICEW__Sequen__11FF8BD8] DEFAULT (0) FOR
[Sequence],
CONSTRAINT [DF__SERVICEW__Applic__12F3B011] DEFAULT (0) FOR
[ApplicantType],
CONSTRAINT [DF__SERVICEW__Status__13E7D44A] DEFAULT (0) FOR [Status]
,
CONSTRAINT [DF__SERVICEW__Type__14DBF883] DEFAULT (0) FOR [Type],
CONSTRAINT [DF__SERVICEW__Unique__15D01CBC] DEFAULT (' ') FOR
[UniqueExpansionId],
CONSTRAINT [DF__SERVICEW__Unique__16C440F5] DEFAULT (' ') FOR
[UniqueIdNumber],
CONSTRAINT [DF__SERVICEW__Price__7DE38492] DEFAULT (0.0) FOR [Price]
,
CONSTRAINT [DF__SERVICEW__PriceO__6F2B50E7] DEFAULT (0) FOR
[PriceOption],
CONSTRAINT [DF__SERVICEW__Quanti__396371BC] DEFAULT (0) FOR
[Quantity],
CONSTRAINT [DF__SERVICEW__Descri__03C67B1A] DEFAULT ('') FOR
[Description],
CONSTRAINT [DF__servicew__Produc__1452B3F5] DEFAULT ('') FOR
[ProductCode],
CONSTRAINT [DF__SERVICEW__UPTODA__08211BE3] DEFAULT (1) FOR [UPTODAT
E]
GO
My query is pretty large and it doesn't only use this table it use
multiple but in the execution plan I see it uses clustered index scan
on this table. From what I remember it should only be table seek and
not scan.
Thanks,
T.
Arnie Rowland wrote:[vbcol=seagreen]
> It sounds like the indexes you have are not working for you.
> For us to assist you, please post the table DDL, along with a query or two
> that you believe do not properly use indexing.
> --
> Arnie Rowland, Ph.D.
> Westwood Consulting, Inc
> Most good judgment comes from experience.
> Most experience comes from bad judgment.
> - Anonymous
> You can't help someone get up a hill without getting a little closer to th
e
> top yourself.
> - H. Norman Schwarzkopf
>
> "tolcis" <a.liberchuk@.verizon.net> wrote in message
> news:1164740732.714927.282500@.j44g2000cwa.googlegroups.com...|||tolcis wrote:
> ALTER TABLE [dbo].[SERVICEW] WITH NOCHECK ADD
> CONSTRAINT [PK_SERVICEW] PRIMARY KEY CLUSTERED
> (
> [IdNumber],
> [Family],
> [AppCode],
> [Sequence],
> [Source]
> ) ON [PRIMARY]
> GO
>
If this is the only index available, then only queries that include
IDNumber in the WHERE clause will seek against this index. For example:
This will "seek":
SELECT * FROM ServiceW WHERE IDNumber = 10
This will "scan":
SELECT * FROM ServiceW WHERE AppCode = 'X'
Tracy McKibben
MCDBA
http://www.realsqlguy.com|||On 28.11.2006 22:05, Tracy McKibben wrote:
> tolcis wrote:
> If this is the only index available, then only queries that include
> IDNumber in the WHERE clause will seek against this index. For example:
> This will "seek":
> SELECT * FROM ServiceW WHERE IDNumber = 10
> This will "scan":
> SELECT * FROM ServiceW WHERE AppCode = 'X'
I beg to differ: /all/ queries containing filters on any set of
/leading/ columns of the index should be doing an index seek - unless
the optimizer decides that a full scan is more efficient (for example
because criteria will return 90% of the rows anyway).
Kind regards
robert|||Robert Klemme wrote:
> I beg to differ: /all/ queries containing filters on any set of
> /leading/ columns of the index should be doing an index seek - unless
> the optimizer decides that a full scan is more efficient (for example
> because criteria will return 90% of the rows anyway).
> Kind regards
> robert
Use my example below. Compare the execution plans of the two SELECT
statements. Illustrates exactly the point I was trying to make:
CREATE TABLE #IndexTest
(
Col1 INT,
Col2 INT,
Col3 CHAR(1),
Col4 CHAR(1),
Col5 DATETIME,
PRIMARY KEY CLUSTERED (Col1, Col2, Col3, Col4, Col5)
)
INSERT INTO #IndexTest
(Col1, Col2, Col3, Col4, Col5)
VALUES
(1, 10, 'A', 'Z', DATEADD(dd, -1, GETDATE()))
INSERT INTO #IndexTest
(Col1, Col2, Col3, Col4, Col5)
VALUES
(2, 20, 'B', 'Y', DATEADD(dd, -2, GETDATE()))
INSERT INTO #IndexTest
(Col1, Col2, Col3, Col4, Col5)
VALUES
(3, 30, 'C', 'X', DATEADD(dd, -3, GETDATE()))
INSERT INTO #IndexTest
(Col1, Col2, Col3, Col4, Col5)
VALUES
(4, 40, 'D', 'W', DATEADD(dd, -4, GETDATE()))
INSERT INTO #IndexTest
(Col1, Col2, Col3, Col4, Col5)
VALUES
(5, 50, 'E', 'V', DATEADD(dd, -5, GETDATE()))
INSERT INTO #IndexTest
(Col1, Col2, Col3, Col4, Col5)
VALUES
(6, 60, 'F', 'U', DATEADD(dd, -6, GETDATE()))
INSERT INTO #IndexTest
(Col1, Col2, Col3, Col4, Col5)
VALUES
(7, 70, 'G', 'T', DATEADD(dd, -7, GETDATE()))
INSERT INTO #IndexTest
(Col1, Col2, Col3, Col4, Col5)
VALUES
(8, 80, 'H', 'S', DATEADD(dd, -8, GETDATE()))
INSERT INTO #IndexTest
(Col1, Col2, Col3, Col4, Col5)
VALUES
(9, 90, 'I', 'R', DATEADD(dd, -9, GETDATE()))
INSERT INTO #IndexTest
(Col1, Col2, Col3, Col4, Col5)
VALUES
(10, 100, 'J', 'Q', DATEADD(dd, -10, GETDATE()))
SELECT * FROM #IndexTest WHERE Col1 = 1
SELECT * FROM #IndexTest WHERE Col3 = 'C'
Tracy McKibben
MCDBA
http://www.realsqlguy.com|||On 29.11.2006 14:24, Tracy McKibben wrote:
You said:

> If this is the only index available, then only queries that
> include IDNumber in the WHERE clause will seek against this index.
Then I wrote:

> Robert Klemme wrote:
> Use my example below. Compare the execution plans of the two SELECT
> statements. Illustrates exactly the point I was trying to make:
> CREATE TABLE #IndexTest
> (
> Col1 INT,
> Col2 INT,
> Col3 CHAR(1),
> Col4 CHAR(1),
> Col5 DATETIME,
> PRIMARY KEY CLUSTERED (Col1, Col2, Col3, Col4, Col5)
> )
> INSERT INTO #IndexTest
> (Col1, Col2, Col3, Col4, Col5)
> VALUES
> (1, 10, 'A', 'Z', DATEADD(dd, -1, GETDATE()))
> INSERT INTO #IndexTest
> (Col1, Col2, Col3, Col4, Col5)
> VALUES
> (2, 20, 'B', 'Y', DATEADD(dd, -2, GETDATE()))
> INSERT INTO #IndexTest
> (Col1, Col2, Col3, Col4, Col5)
> VALUES
> (3, 30, 'C', 'X', DATEADD(dd, -3, GETDATE()))
> INSERT INTO #IndexTest
> (Col1, Col2, Col3, Col4, Col5)
> VALUES
> (4, 40, 'D', 'W', DATEADD(dd, -4, GETDATE()))
> INSERT INTO #IndexTest
> (Col1, Col2, Col3, Col4, Col5)
> VALUES
> (5, 50, 'E', 'V', DATEADD(dd, -5, GETDATE()))
> INSERT INTO #IndexTest
> (Col1, Col2, Col3, Col4, Col5)
> VALUES
> (6, 60, 'F', 'U', DATEADD(dd, -6, GETDATE()))
> INSERT INTO #IndexTest
> (Col1, Col2, Col3, Col4, Col5)
> VALUES
> (7, 70, 'G', 'T', DATEADD(dd, -7, GETDATE()))
> INSERT INTO #IndexTest
> (Col1, Col2, Col3, Col4, Col5)
> VALUES
> (8, 80, 'H', 'S', DATEADD(dd, -8, GETDATE()))
> INSERT INTO #IndexTest
> (Col1, Col2, Col3, Col4, Col5)
> VALUES
> (9, 90, 'I', 'R', DATEADD(dd, -9, GETDATE()))
> INSERT INTO #IndexTest
> (Col1, Col2, Col3, Col4, Col5)
> VALUES
> (10, 100, 'J', 'Q', DATEADD(dd, -10, GETDATE()))
> SELECT * FROM #IndexTest WHERE Col1 = 1
> SELECT * FROM #IndexTest WHERE Col3 = 'C'
The second SELECT does not use a set of /leading/ columns of the index!
StmtText
---
SELECT * FROM #IndexTest WHERE Col1 = 1
(1 row(s) affected)
StmtText
----
----
|--Clustered Index Seek(OBJECT[tempdb].[dbo].[#IndexTest]),
SEEK[tempdb].[dbo].[#IndexTest].[Col1]=(1)) ORDERED FORWAR
D)
(1 row(s) affected)
StmtText
---
SELECT * FROM #IndexTest WHERE Col3 = 'C'
(1 row(s) affected)
StmtText
----
--
|--Clustered Index Scan(OBJECT[tempdb].[dbo].[#IndexTest]),
WHERE[tempdb].[dbo].[#IndexTest].[Col3]='C'))
(1 row(s) affected)
StmtText
----
SELECT * FROM #IndexTest WHERE Col1 = 1 AND Col2 = 20 AND Col3 = 'C'
(1 row(s) affected)
StmtText
----
----
---
|--Clustered Index Seek(OBJECT[tempdb].[dbo].[#IndexTest]),
SEEK[tempdb].[dbo].[#IndexTest].[Col1]=(1) AND
[tempdb].[dbo].[#IndexTest].[Col2]=(20) AND
[tempdb].[dbo].[#IndexTest].[Col3]='C') ORDERED FORWARD)
(1 row(s) affected)
Q.E.D.
Regards
robert|||Robert Klemme wrote:
> On 29.11.2006 14:24, Tracy McKibben wrote:
> You said:
>
> Then I wrote:
>
> The second SELECT does not use a set of /leading/ columns of the index!
> StmtText
> ---
> SELECT * FROM #IndexTest WHERE Col1 = 1
> (1 row(s) affected)
> StmtText
> ----
----
> |--Clustered Index Seek(OBJECT[tempdb].[dbo].[#IndexTest])
,
> SEEK[tempdb].[dbo].[#IndexTest].[Col1]=(1)) ORDERED FORW
ARD)
> (1 row(s) affected)
> StmtText
> ---
> SELECT * FROM #IndexTest WHERE Col3 = 'C'
> (1 row(s) affected)
> StmtText
> ----
---
> |--Clustered Index Scan(OBJECT[tempdb].[dbo].[#IndexTest])
,
> WHERE[tempdb].[dbo].[#IndexTest].[Col3]='C'))
> (1 row(s) affected)
> StmtText
> ----
> SELECT * FROM #IndexTest WHERE Col1 = 1 AND Col2 = 20 AND Col3 = 'C'
> (1 row(s) affected)
> StmtText
> ----
----
---
> |--Clustered Index Seek(OBJECT[tempdb].[dbo].[#IndexTest])
,
> SEEK[tempdb].[dbo].[#IndexTest].[Col1]=(1) AND
> [tempdb].[dbo].[#IndexTest].[Col2]=(20) AND
> [tempdb].[dbo].[#IndexTest].[Col3]='C') ORDERED FORWARD)
> (1 row(s) affected)
> Q.E.D.
> Regards
> robert
?
I don't really know what you're debating here. I said that if IDNumber
(the leading column) wasn't used in the WHERE clause, an index seek
wouldn't happen. You disagreed with me, but then posted an example that
proves my point exactly. What am I missing?
Tracy McKibben
MCDBA
http://www.realsqlguy.com|||On 29.11.2006 18:54, Tracy McKibben wrote:
> Robert Klemme wrote:
> ?
> I don't really know what you're debating here. I said that if IDNumber
> (the leading column) wasn't used in the WHERE clause, an index seek
> wouldn't happen. You disagreed with me, but then posted an example that
> proves my point exactly. What am I missing?
You said "If this is the only index available, then /only/ queries that
include IDNumber in the WHERE clause will seek against this index."
(accentuation by me). I objected that because /also/ queries that
contain /more leading columns/ from the index do a seek which is nicely
demonstrated by the plans I posted.
robert

Wednesday, March 21, 2012

Problem with a proxy

Hi

i have a problem with a proxy and i don't know how to resolve this

So, i want to run a SSIS package so i follow this http://support.microsoft.com/kb/918760

However, the package fails and i have a error message which tell me that i can't get proxy's data for proxy_id = 23!

If someone has the solution please help me!!

A little more information would help.

How have you set up the proxy and credentials?

K

sql

Friday, March 9, 2012

Problem when opening the sql server express in visual web developmer express edition

hi

i download free starter kit timetraker application( i downloaded both Visual web devaloper and sql server express from the Internet)

when i tried to run it it is showing the following error

An error has occurred while establishing a connection tothe server. When connecting to SQL Server 2005, this failure may becaused by the fact that under the default settings SQL Server does notallow remote connections. (provider: Shared Memory Provider, error: 40- Could not open a connection to SQL Server)

plz give me the solution above error

thanks in advance

vittal

The simplest thing have u checked the Sql Server Service is started or not... This is the simplest error which occur... 50% time

Satya

|||

Type inetmgr on run.
select the verual directory -> right click and select property -> go to ASP.NET tab -> click Edit Configuration

and then Edit the connection string accordingly.

Problem When I Try To Send More then 4000 To Database

Hi

I have Problem When I try To Send More Then 4000 char To SQL Server Database !!!

I have Create Windows Application that Send data To SQL Server Database in Web Server .. But When I try To Send More Then 4000 char to (nText) Flied The data damaged

And also in the Remote database I cant Create Filed of (nVarChar) data type with length more then 4000 char

In another word
I cant Store More then 4000 char in filed of (nText) data type
And I cant Create (nVarChar) filed with more then 4000 char Length

Where is the problem ??
And How can I solve it

Thanks with my regardingAn NVarchar field in SQL 7/2000 cannot be longer than 4000 (+- some) because the total size of any row in a SQL Server database cannot exceed 8196 (as I recall). nText fields do not count against that value, because they are stored on a seperate data page.

Please show the code (including any stored procedure) to try and insert the data.|||for your windows app problem, make sure you have an up to date mdac.
i had some odd problems years ago that were resolved by an mdac update.

for your 4000 character nvarchar problem,

varchar fields are actually limited to 8000 bytes (not characters)
(total row size of all populated varchars cannot exceed 8192)

for an nvarchar, the same 8000 byte limit applies.
since the n types are double byte, 4000 characters = 8000 bytes|||I think you have Datatype mixing problem you are sending ASCII to Unicode column, change the CHAR to NCHAR because in SQL Server 2000 you can Unicode enable per table and Column then run the code a again. I am assuming you know NTEXT is not Table Row based SQL Server creates an Arithmetic pointer to the data. Hope this helps.

Kind regards,
Gift Peddie|||Thanks for all replies

I have solve my problem

It is when I send the data to SQL Server I don't explicitly provide the data type of the filed in C# Code .. this is my problem.

The wrong code
SQLCommand.Parameters.Add("@.fld_Name", ValueObject);

the correct code
SqlParameter pr = new SqlParameter("@.fld_ Name", SqlDbType.NText);
pr.Value = ValueObject;
SQLCommand.Parameters.Add(pr);

It's simply like that

And I am very thanks for all reply

Fraas

Problem When I save Data In Database

Hi

I have problem in the data when I save it in database !!!

From Windows Application I Send (nText) Data to SQL Server Database in Web Server but when I try to explore it in SQL Server Enterprise manager or ny SQL Server DB Manager I see the Fields of (nText) Data is empty but when I try to brows the data in ASP.NET page I get it like the following

? ? ? ??? ??? ?? ? ? ???, ??? ?? ?? ?? ???. ??
??". ?? ??? ?? ?? ??? ???, ?? ??? ??? ??.
?? ??, ??? ? ? ??? ???, ? ?? ?? ?? ?? ??? ??

So I thing the data has been damaged!!
Why this problem... And how can I solve it??

The Problem only in (nText) Data ..

And thanks with my best regarding??It seems you need to take two steps. The first is to change the collation of SQL to ARABIC_CI_AI. Second, you need to change your web.config to set endocing to unicode.

hope help.

Bassam Basamad|||Hi

Thanks for your reply

First of all .. you talk about (web.config) File .. But my problem in SQL Server Database .. there is no problem in ASP.NET Pages (I know how to make it support Unicode chars) but the problem in Database

And the seconded thing about the (ARABIC_CI_AI.) I have do it from the first time when I create my Tables in SQL Server

So sorry .. your solution . don't solve my problem

Saturday, February 25, 2012

Problem using MSDE

Hi
I have been trying to use the MSDE

info
MSDE installed
sa (has a password)
tried with both mixed and single mode change in registry and later on install
SQL server icon running in the system tray
several reboots and reinstalls over days

I can create a web page that connects to a DB and says connected and disconnected
but I cannot get any data displayed?

I have tried the portal starter Kit and it cannot find the sql server on the install
If I try to do it remotely it wants me to run stuff in a query analyser and some .sql files
but MSDE does not have an interface as such

I am very confused and I just want the system to connect to the db or for the portal to work

Please help

Thank you all in advanceCan you connect to your MSDE through the Server Explorer in Studio?

If so, then you can create a Database Project which will give you a platform from which to interact with your MSDE instance.

Problem using linked tables instead of ADP

Hi
I know I probably shouldn't be doing this but...
I have a table on an MSDE database that has a bigInt for the primary key. If
I try to link to this table from Access (XP) using an ODBC connection the
table links ok. The first time I opened the table it was ok. Since then the
primary key data type is interpretted as text and all the records (though
still there) have "#deleted" in each column of every row? I have tried
relinking the table and still get he same problem.
Any ideas whats going on?
Thanks in advance
Mark
Have you linked the table such that Access recognizes the primary key?
"Mark" wrote:

> Hi
> I know I probably shouldn't be doing this but...
> I have a table on an MSDE database that has a bigInt for the primary key. If
> I try to link to this table from Access (XP) using an ODBC connection the
> table links ok. The first time I opened the table it was ok. Since then the
> primary key data type is interpretted as text and all the records (though
> still there) have "#deleted" in each column of every row? I have tried
> relinking the table and still get he same problem.
> Any ideas whats going on?
> Thanks in advance
> Mark
>
>
|||Hi Monte

> Have you linked the table such that Access recognizes the primary key?
>
As far as I know, yes? I wasn't prompted to select a primary key and looking
at the table design from within access shows the primary key present but as
text instead of number.
Cheers
Mark
|||I have also seen this problem occur when I have "bit" type fields in the SQL
table, and don't have a default value (say zero) and allow nulls checked.
"Mark" wrote:

> Hi Monte
>
> As far as I know, yes? I wasn't prompted to select a primary key and looking
> at the table design from within access shows the primary key present but as
> text instead of number.
> Cheers
> Mark
>
>
|||"Monte" <Monte@.discussions.microsoft.com> wrote in message
news:46D395BA-E150-4C96-9EDE-AF4776FBC18A@.microsoft.com...
>I have also seen this problem occur when I have "bit" type fields in the
>SQL
> table, and don't have a default value (say zero) and allow nulls checked.
Monte
Scary stuff hey :o{
I'm not going to worry about it too much as I was just playing to see the
difference in performance etc. Would still be interested to know why, may
have another look later...
Cheers
Mark

Monday, February 20, 2012

problem using "com.microsoft.jdbc.sqlserver.SQLServerDriver" driver

hi
I am using "com.microsoft.jdbc.sqlserver.SQLServerDriver" driver to connect
the SQL Server 2000.
Everything is ok if there is one request to the SQL server.
When there are more than one requests to the SQL server, exception was
thrown
I want to ask if that driver has some problems to handle multi-request.
Thanks
The expcetions are:
java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Object has
been closed.
at com.microsoft.jdbc.base.BaseExceptions.createExcep tion(Unknown
Source)
at com.microsoft.jdbc.base.BaseExceptions.getExceptio n(Unknown
Source)
at com.microsoft.jdbc.base.BaseResultSet.validateClos edState(Unknown
Source)
at
com.microsoft.jdbc.base.BaseResultSet.commonFetchI nitialize(Unknown Source)
at com.microsoft.jdbc.base.BaseResultSet.next(Unknown Source)
at GetData.GetData.getColumn(GetData.java:192)
at GetData.GetData.insert_fileInstance_table(GetData. java:1156)
at RadicaPocketServer2.handleRequest(RadicaPocketServ er2.java:1056)
at RadicaPocketServer2.doPost(RadicaPocketServer2.jav a:55)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:853)
at
org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(Application
FilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterCh
ain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invo ke(StandardWrapperValve.ja
va:256)
at
org.apache.catalina.core.StandardPipeline$Standard PipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(Cont ainerBase.java:995)
at
org.apache.catalina.core.StandardContextValve.invo ke(StandardContextValve.ja
va:191)
at
org.apache.catalina.core.StandardPipeline$Standard PipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(Cont ainerBase.java:995)
at
org.apache.catalina.core.StandardContext.invoke(St andardContext.java:2415)
at
org.apache.catalina.core.StandardHostValve.invoke( StandardHostValve.java:180
)
at
org.apache.catalina.core.StandardPipeline$Standard PipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.valves.ErrorDispatcherValve.in voke(ErrorDispatcherValve.
java:171)
at
org.apache.catalina.core.StandardPipeline$Standard PipelineValveContext.invok
eNext(StandardPipeline.java:641)
at
org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:172
)
at
org.apache.catalina.core.StandardPipeline$Standard PipelineValveContext.invok
eNext(StandardPipeline.java:641)
at
org.apache.catalina.valves.AccessLogValve.invoke(A ccessLogValve.java:509)
at
org.apache.catalina.core.StandardPipeline$Standard PipelineValveContext.invok
eNext(StandardPipeline.java:641)
at
org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(Cont ainerBase.java:995)
at
org.apache.catalina.core.StandardEngineValve.invok e(StandardEngineValve.java
:174)
at
org.apache.catalina.core.StandardPipeline$Standard PipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(Cont ainerBase.java:995)
at
org.apache.ajp.tomcat4.Ajp13Processor.process(Ajp1 3Processor.java:466)
at
org.apache.ajp.tomcat4.Ajp13Processor.run(Ajp13Pro cessor.java:585)
at java.lang.Thread.run(Thread.java:534)
Hello Joe
Thanks for you suggestion, but I still have questions about it.
My servlet is run in tomcat 5.0 and I know that tomcat help us to handle
multiple threading problem
Could you explain your idea to me more. Thank you
Also, I have written a class called GetData.java which represent to connect
and execute SQL statement.
GetData is used by my servlet program to handle database connections
Do you mean that I need to handle mutli-threading in GetData.java's
functions
Thank you very much
Simon Lee
"Joe Weinstein" <joeNOSPAM@.bea.com> ? news:407FFE48.30900@.bea.com ?...[vbcol=seagreen]
> Hi.
> the problem is probably just that your servlet code is not thread-safe.
> Multiple threads are probably trying to use the same jdbc objects.
> Define all your jdbc objects as method-level variables and you should
> be OK...
> Joe Weinstein at BEA
> Simon Lee wrote:
connect[vbcol=seagreen]
has[vbcol=seagreen]
com.microsoft.jdbc.base.BaseExceptions.createExcep tion(Unknown[vbcol=seagreen]
com.microsoft.jdbc.base.BaseResultSet.validateClos edState(Unknown[vbcol=seagreen]
Source)[vbcol=seagreen]
RadicaPocketServer2.handleRequest(RadicaPocketServ er2.java:1056)[vbcol=seagreen]
org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(Application[vbcol=seagreen]
org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterCh[vbcol=seagreen]
org.apache.catalina.core.StandardWrapperValve.invo ke(StandardWrapperValve.ja[vbcol=seagreen]
org.apache.catalina.core.StandardPipeline$Standard PipelineValveContext.invok[vbcol=seagreen]
org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.java:480)[vbcol=seagreen]
org.apache.catalina.core.StandardContextValve.invo ke(StandardContextValve.ja[vbcol=seagreen]
org.apache.catalina.core.StandardPipeline$Standard PipelineValveContext.invok[vbcol=seagreen]
org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.java:480)[vbcol=seagreen]
org.apache.catalina.core.StandardContext.invoke(St andardContext.java:2415)[vbcol=seagreen]
org.apache.catalina.core.StandardHostValve.invoke( StandardHostValve.java:180[vbcol=seagreen]
org.apache.catalina.core.StandardPipeline$Standard PipelineValveContext.invok[vbcol=seagreen]
org.apache.catalina.valves.ErrorDispatcherValve.in voke(ErrorDispatcherValve.[vbcol=seagreen]
org.apache.catalina.core.StandardPipeline$Standard PipelineValveContext.invok[vbcol=seagreen]
org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:172[vbcol=seagreen]
org.apache.catalina.core.StandardPipeline$Standard PipelineValveContext.invok[vbcol=seagreen]
org.apache.catalina.valves.AccessLogValve.invoke(A ccessLogValve.java:509)[vbcol=seagreen]
org.apache.catalina.core.StandardPipeline$Standard PipelineValveContext.invok[vbcol=seagreen]
org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.java:480)[vbcol=seagreen]
org.apache.catalina.core.StandardEngineValve.invok e(StandardEngineValve.java[vbcol=seagreen]
org.apache.catalina.core.StandardPipeline$Standard PipelineValveContext.invok[vbcol=seagreen]
org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.java:480)
>