Showing posts with label dear. Show all posts
Showing posts with label dear. Show all posts

Thursday, March 22, 2012

ClassNotFound

Dear all
I'm new on Java. Now I got a error in my program is
java.lang.ClassNotFoundException and the class is :
com.microsoft.jdbc.sqlserver.SQLServerDriver .
My classpath already contain that 3 JAR files
(msbase.jar,msutil.jar,mssqlserver.jar) and my servlet already included the
javax.sql.* and javax.naming.*. So now I don't know what i'm missing now.
anyone here can help me to solve this problem ? please give me some idea...
Thanks a lot !!
Ivan
This is definetly a classpath issue. Esle Open all jar and see if you can find the class you are looking for
|||Thx Neo,
I have found the problem now, the classpath I have been setting up before.
Actually the problem was I need to copy those JDBC JAR files to lib\
directory then it will be fine.
"neo" <anonymous@.discussions.microsoft.com> bl
news:538F8F46-32AA-4F42-A4EA-FC83131F384E@.microsoft.com g...
> This is definetly a classpath issue. Esle Open all jar and see if you can
find the class you are looking for

Tuesday, March 20, 2012

Clarification on Joins

Dear friends,

Can any one clearly explain about all type of joins or any tutorials for that. please help me b'se i failed it to explain in an interview clearly

samy

Quote:

Originally Posted by samycbe

Dear friends,

Can any one clearly explain about all type of joins or any tutorials for that. please help me b'se i failed it to explain in an interview clearly

samy


These are SQL server specification.

Inner joins (the typical join operation, which uses some comparison operator like = or <>). These include equi-joins and natural joins.
Inner joins use a comparison operator to match rows from two tables based on the values in common columns from each table. For example, retrieving all rows where the student identification number is the same in both the students and courses tables.

Outer joins. Outer joins can be a left, a right, or full outer join.
Outer joins are specified with one of the following sets of keywords when they are specified in the FROM clause:

LEFT JOIN or LEFT OUTER JOIN
The result set of a left outer join includes all the rows from the left table specified in the LEFT OUTER clause, not just the ones in which the joined columns match. When a row in the left table has no matching rows in the right table, the associated result set row contains null values for all select list columns coming from the right table.

RIGHT JOIN or RIGHT OUTER JOIN.
A right outer join is the reverse of a left outer join. All rows from the right table are returned. Null values are returned for the left table any time a right table row has no matching row in the left table.

FULL JOIN or FULL OUTER JOIN.
A full outer join returns all rows in both the left and right tables. Any time a row has no match in the other table, the select list columns from the other table contain null values. When there is a match between the tables, the entire result set row contains data values from the base tables.

Cross joins.
Cross joins return all rows from the left table, each row from the left table is combined with all rows from the right table. Cross joins are also called Cartesian products.|||Thanks and Its really helpful

Sunday, March 11, 2012

Choosing clustered index

Dear friends:
There is some confusion here about the choice of which index should be
clustered. The choices are generally:
- the surrogate identity column.
- one or more columns that make up the natural key.
My contention has been that the latter is the obvious choice. This is the
order in which the rows are commonly placed on the screen and on reports.
The identity column really places the rows in no particular order at all,
except somewhat "sequentially" with respect to the order they were entered
(assuming an incrementing integer key).
What is the conventional wisdom about this?
Tom EllisonUsually clustered indexes should:
- Be as narrow as possible.
- Be placed on columns that would benefit the most:
-- Columns that have very high cardinality are good candidates.
-- So are columns that are searched for large ranges at a time using
operators like BETWEEN, LIKE 'x%' and >, <, etc.
-- Columns that are searched the most frequently, since they eliminate
bookmark lookups which can occur with narrow nonclustered indexes.
A lot of times the Primary Key will fit a lot of these requirements, but not
always. I usually would only make an IDENTITY column the clustered index on
supporting (lookup-type) tables, to improve JOIN performance. One or more
columns (with high cardinality) that make up the natural key on your main
tables would be good clustered index candidates.
[url]http://blogs.sqlservercentral.com/blogs/michael_coles/archive/2006/05/08/599.aspx[
/url]
"Tom Ellison" <tellison@.jcdoyle.com> wrote in message
news:O0nC9gVdGHA.5016@.TK2MSFTNGP04.phx.gbl...
> Dear friends:
> There is some confusion here about the choice of which index should be
> clustered. The choices are generally:
> - the surrogate identity column.
> - one or more columns that make up the natural key.
> My contention has been that the latter is the obvious choice. This is the
> order in which the rows are commonly placed on the screen and on reports.
> The identity column really places the rows in no particular order at all,
> except somewhat "sequentially" with respect to the order they were entered
> (assuming an incrementing integer key).
> What is the conventional wisdom about this?
> Tom Ellison
>|||Dear Mike:
Thanks for the opinions. The article was quite helpful.
Now, how do you figure that an IDENTITY column makes a good clustered index?
I ask because:
- in my experience, processing rarely proceeds in identity number order.
- user directed searches don't proceed along these lines
- moving through the data in some sequential order, such as generating data
for the screen or a report will follow a natural key order, not an identity
order
My thought is that the identity column is assigned sequentially over time
(if auto-incremented) but does not generally follow any organization of the
data that is likely to be repeated.
The natural key of which I spoke is unique (thus, highly cardinal) and tends
to be the most commonly used sequence in processing (screens and reports).
It is often the column(s) filtered or JOINed in many of the queries used.
Thanks again,
Tom Ellison
"Mike C#" <xxx@.yyy.com> wrote in message news:pBQ8g.184$Ut2.60@.fe09.lga...
> Usually clustered indexes should:
> - Be as narrow as possible.
> - Be placed on columns that would benefit the most:
> -- Columns that have very high cardinality are good candidates.
> -- So are columns that are searched for large ranges at a time using
> operators like BETWEEN, LIKE 'x%' and >, <, etc.
> -- Columns that are searched the most frequently, since they eliminate
> bookmark lookups which can occur with narrow nonclustered indexes.
> A lot of times the Primary Key will fit a lot of these requirements, but
> not always. I usually would only make an IDENTITY column the clustered
> index on supporting (lookup-type) tables, to improve JOIN performance.
> One or more columns (with high cardinality) that make up the natural key
> on your main tables would be good clustered index candidates.
> http://blogs.sqlservercentral.com/b...99.asp
x
> "Tom Ellison" <tellison@.jcdoyle.com> wrote in message
> news:O0nC9gVdGHA.5016@.TK2MSFTNGP04.phx.gbl...
>|||Tom,
are you using non-clustered indexes? If yes, take in account that
bookmark lookups take more time if bookmarks are wider.|||I generally use IDENTITY columns as clustered indexes only when it's in
supporting (lookup/foreign-key) tables. The only reason then is to improve
JOIN performance by potentially eliminating bookmark lookups you might get
with a narrow nonclustered index. Other than that, put your clustered
indexes where they'll do the most good.
"Tom Ellison" wrote:

> Dear Mike:
> Thanks for the opinions. The article was quite helpful.
> Now, how do you figure that an IDENTITY column makes a good clustered inde
x?
> I ask because:
> - in my experience, processing rarely proceeds in identity number order.
> - user directed searches don't proceed along these lines
> - moving through the data in some sequential order, such as generating dat
a
> for the screen or a report will follow a natural key order, not an identit
y
> order
> My thought is that the identity column is assigned sequentially over time
> (if auto-incremented) but does not generally follow any organization of th
e
> data that is likely to be repeated.
> The natural key of which I spoke is unique (thus, highly cardinal) and ten
ds
> to be the most commonly used sequence in processing (screens and reports).
> It is often the column(s) filtered or JOINed in many of the queries used.
> Thanks again,
> Tom Ellison
>
> "Mike C#" <xxx@.yyy.com> wrote in message news:pBQ8g.184$Ut2.60@.fe09.lga...
>
>

Chkdsk and MS SQL Server 7

Dear Subscribers,
My SQL Server 7 is running on Win NT 4.0 SP6a system with RAID5. I suspect
that one of the system disk volumes has a problem with its file system, and
I was advised to check that by running CHKDSK /F /R. The problem is the
database files are stored on this volume and I'm not sure what kind of
effect the disk checker will have on them if it finds any errors. Will
everything be OK?
Many thanks!Hi
I am not sure what effect it will have as the files will be in use, and if
there was any corruption SQL Server may have problems anyhow!
I suggest that you back up the databases before trying this and make sure
they are retained on some reliable media.
John
"Oskars Salnins" <osalnins@.inbox.lv> wrote in message
news:uwmiilFVDHA.532@.TK2MSFTNGP10.phx.gbl...
> Dear Subscribers,
> My SQL Server 7 is running on Win NT 4.0 SP6a system with RAID5. I suspect
> that one of the system disk volumes has a problem with its file system,
and
> I was advised to check that by running CHKDSK /F /R. The problem is the
> database files are stored on this volume and I'm not sure what kind of
> effect the disk checker will have on them if it finds any errors. Will
> everything be OK?
>
> Many thanks!
>|||Thanks John.
Surely I would stop SQL server before carrying out the check. This far I
didn't notice any problems with SQL Server itself (i.e. DBCC CHECKDB shows
all DB's are clean). I think that means DB files aren't affected.
"John Bell" <jbellnewsposts@.hotmail.com> wrote in message
news:3f240abf$0$10766$afc38c87@.news.easynet.co.uk...
> Hi
> I am not sure what effect it will have as the files will be in use, and if
> there was any corruption SQL Server may have problems anyhow!
> I suggest that you back up the databases before trying this and make sure
> they are retained on some reliable media.
> John
> "Oskars Salnins" <osalnins@.inbox.lv> wrote in message
> news:uwmiilFVDHA.532@.TK2MSFTNGP10.phx.gbl...
> > Dear Subscribers,
> >
> > My SQL Server 7 is running on Win NT 4.0 SP6a system with RAID5. I
suspect
> > that one of the system disk volumes has a problem with its file system,
> and
> > I was advised to check that by running CHKDSK /F /R. The problem is the
> > database files are stored on this volume and I'm not sure what kind of
> > effect the disk checker will have on them if it finds any errors. Will
> > everything be OK?
> >
> >
> > Many thanks!
> >
> >
>|||Oskars,
> Surely I would stop SQL server before carrying out the check.
Yes you would.
> This far I
> didn't notice any problems with SQL Server itself (i.e. DBCC CHECKDB shows
> all DB's are clean). I think that means DB files aren't affected.
What symptoms are you getting that makes you think a chkdsk is needed?
Neil Pike MVP/MCSE. Protech Computing Ltd
Reply here - no email
SQL FAQ (484 entries) see
http://forumsb.compuserve.com/gvforums/UK/default.asp?SRV=MSDevApps
(faqxxx.zip in lib 7)
or www.ntfaq.com/Articles/Index.cfm?DepartmentID=800
or www.sqlserverfaq.com
or www.mssqlserver.com/faq|||Neil,
The system's paging file and DB files are stored on the same disk volume,
and I got into paging file corruption issue as discussed in this KB article:
http://support.microsoft.com/default.aspx?kbid=216446
which suggests to run chkdsk /F /R to see if it corrects the problem. I've
already followed the other suggestion from the article - rebuilt the paging
file and moved it to another disk volume. Nevertheless, I'd also like to
know what caused the corruption, and fix that. Server hardware is clean so I
suspect the file system. Besides, if the paging file got corrupt then the
same thing could probably happen to DB files as well.
"Neil Pike" <neilpike@.compuserve.com> wrote in message
news:VA.000060fd.0fe50a5f@.compuserve.com...
> Oskars,
> > Surely I would stop SQL server before carrying out the check.
> Yes you would.
> > This far I
> > didn't notice any problems with SQL Server itself (i.e. DBCC CHECKDB
shows
> > all DB's are clean). I think that means DB files aren't affected.
> What symptoms are you getting that makes you think a chkdsk is needed?
> Neil Pike MVP/MCSE. Protech Computing Ltd
> Reply here - no email
> SQL FAQ (484 entries) see
> http://forumsb.compuserve.com/gvforums/UK/default.asp?SRV=MSDevApps
> (faqxxx.zip in lib 7)
> or www.ntfaq.com/Articles/Index.cfm?DepartmentID=800
> or www.sqlserverfaq.com
> or www.mssqlserver.com/faq
>|||Oskars - the the chkdsk /f /r output say that it found and fixed problems?
The Q article you listed is a tad vague - just because you got an A or a 1E
blue screen doesn't mean you had a corrupt page file. This is one of 100's or
1000's of reasons for the same blue screen...
> The system's paging file and DB files are stored on the same disk volume,
> and I got into paging file corruption issue as discussed in this KB article:
> http://support.microsoft.com/default.aspx?kbid=216446
> which suggests to run chkdsk /F /R to see if it corrects the problem. I've
> already followed the other suggestion from the article - rebuilt the paging
> file and moved it to another disk volume. Nevertheless, I'd also like to
> know what caused the corruption, and fix that. Server hardware is clean so I
> suspect the file system. Besides, if the paging file got corrupt then the
> same thing could probably happen to DB files as well.
Neil Pike MVP/MCSE. Protech Computing Ltd
Reply here - no email
SQL FAQ (484 entries) see
http://forumsb.compuserve.com/gvforums/UK/default.asp?SRV=MSDevApps
(faqxxx.zip in lib 7)
or www.ntfaq.com/Articles/Index.cfm?DepartmentID=800
or www.sqlserverfaq.com
or www.mssqlserver.com/faq

Saturday, February 25, 2012

Checkpoint Activities

Dear Support,
I am trying to find a way to monitor the checkpoint acitivites in our SQL Server 2000 with sp3. The error log file doesn't show. Am I missing something here?
Also, after I ran the a checkpoint statment on a database, I am expecting the database mdf file to be updated. So, I am expecting last modified date of the mdf file to be changed. But, unfortunately,mind is not. I am wondering if this is normal.
The way I run the checkpoint statment is by use of the Job scheduling. The history log shows successful on all checkpoint statments run.
Thank you!
MartinThe modified date on the file will only change if it changes size (or if
autoclose database option is on). SQL keeps the file open when its running
and pages being updated etc in the file will not change the modified date on
the file itself (again unless autoclose is on)
--
HTH
Jasper Smith (SQL Server MVP)
I support PASS - the definitive, global
community for SQL Server professionals -
http://www.sqlpass.org
"Martin" <anonymous@.discussions.microsoft.com> wrote in message
news:9A6D13D7-D9CF-47F5-A5E9-441F087190B9@.microsoft.com...
> Dear Support,
> I am trying to find a way to monitor the checkpoint acitivites in our SQL
Server 2000 with sp3. The error log file doesn't show. Am I missing
something here?
> Also, after I ran the a checkpoint statment on a database, I am expecting
the database mdf file to be updated. So, I am expecting last modified date
of the mdf file to be changed. But, unfortunately,mind is not. I am
wondering if this is normal.
> The way I run the checkpoint statment is by use of the Job scheduling. The
history log shows successful on all checkpoint statments run.
> Thank you!
> Martin|||I think trace flag 3502 still works with SQL2000. The
trace flag instructs SQL to record an entry in the
errorlog when a database is checkpointed. You can use this
trace flag and monitor your errorlog for the checkpoint
entries.
To enable the trace flag, you can run the following:
dbcc traceon(3605, 3502, -1)
If you are only interested in the execution of the
checkpoint statement executed from your job, you can run
the following in your job:
dbcc traceon(3605, 3502)
checkpoint
dbcc traceoff(3605, 3502)
Linchi
>--Original Message--
>Dear Support,
>I am trying to find a way to monitor the checkpoint
acitivites in our SQL Server 2000 with sp3. The error log
file doesn't show. Am I missing something here?
>Also, after I ran the a checkpoint statment on a
database, I am expecting the database mdf file to be
updated. So, I am expecting last modified date of the mdf
file to be changed. But, unfortunately,mind is not. I am
wondering if this is normal.
>The way I run the checkpoint statment is by use of the
Job scheduling. The history log shows successful on all
checkpoint statments run.
>Thank you!
>Martin
>.
>|||Thanks Linchi and Jaspi,
Your information is quite helpful.
Martin|||Martin,
Why do you feel a need to run checkpoint via a scheduled job?. SQL =server will be doing checkpoints at intervals anyway, and about the only =time I have needed a manual checkpoint is when performance testing to =force updates back to disc prior to forcing a cache flush. If you are in =a very strange position you *may* want to adjust the checkpoint =interval, but that is the exception as well.
Mike John
"Martin" <anonymous@.discussions.microsoft.com> wrote in message =news:9A6D13D7-D9CF-47F5-A5E9-441F087190B9@.microsoft.com...
> Dear Support,
> I am trying to find a way to monitor the checkpoint acitivites in our =SQL Server 2000 with sp3. The error log file doesn't show. Am I =missing something here?
> Also, after I ran the a checkpoint statment on a database, I am =expecting the database mdf file to be updated. So, I am expecting last =modified date of the mdf file to be changed. But, unfortunately,mind is =not. I am wondering if this is normal. > The way I run the checkpoint statment is by use of the Job scheduling. =The history log shows successful on all checkpoint statments run.
> Thank you!
> Martin

Checkpoint Activities

Dear Support,
I am trying to find a way to monitor the checkpoint acitivites in our SQL Se
rver 2000 with sp3. The error log file doesn't show. Am I missing somethin
g here?
Also, after I ran the a checkpoint statment on a database, I am expecting th
e database mdf file to be updated. So, I am expecting last modified date of
the mdf file to be changed. But, unfortunately,mind is not. I am wondering
if this is normal.
The way I run the checkpoint statment is by use of the Job scheduling. The h
istory log shows successful on all checkpoint statments run.
Thank you!
MartinThe modified date on the file will only change if it changes size (or if
autoclose database option is on). SQL keeps the file open when its running
and pages being updated etc in the file will not change the modified date on
the file itself (again unless autoclose is on)
HTH
Jasper Smith (SQL Server MVP)
I support PASS - the definitive, global
community for SQL Server professionals -
http://www.sqlpass.org
"Martin" <anonymous@.discussions.microsoft.com> wrote in message
news:9A6D13D7-D9CF-47F5-A5E9-441F087190B9@.microsoft.com...
quote:

> Dear Support,
> I am trying to find a way to monitor the checkpoint acitivites in our SQL

Server 2000 with sp3. The error log file doesn't show. Am I missing
something here?
quote:

> Also, after I ran the a checkpoint statment on a database, I am expecting

the database mdf file to be updated. So, I am expecting last modified date
of the mdf file to be changed. But, unfortunately,mind is not. I am
wondering if this is normal.
quote:

> The way I run the checkpoint statment is by use of the Job scheduling. The

history log shows successful on all checkpoint statments run.
quote:

> Thank you!
> Martin
|||I think trace flag 3502 still works with SQL2000. The
trace flag instructs SQL to record an entry in the
errorlog when a database is checkpointed. You can use this
trace flag and monitor your errorlog for the checkpoint
entries.
To enable the trace flag, you can run the following:
dbcc traceon(3605, 3502, -1)
If you are only interested in the execution of the
checkpoint statement executed from your job, you can run
the following in your job:
dbcc traceon(3605, 3502)
checkpoint
dbcc traceoff(3605, 3502)
Linchi
quote:

>--Original Message--
>Dear Support,
>I am trying to find a way to monitor the checkpoint

acitivites in our SQL Server 2000 with sp3. The error log
file doesn't show. Am I missing something here?
quote:

>Also, after I ran the a checkpoint statment on a

database, I am expecting the database mdf file to be
updated. So, I am expecting last modified date of the mdf
file to be changed. But, unfortunately,mind is not. I am
wondering if this is normal.
quote:

>The way I run the checkpoint statment is by use of the

Job scheduling. The history log shows successful on all
checkpoint statments run.
quote:

>Thank you!
>Martin
>.
>
|||Thanks Linchi and Jaspi,
Your information is quite helpful.
Martin|||Martin,
Why do you feel a need to run checkpoint via a scheduled job?. SQL =
server will be doing checkpoints at intervals anyway, and about the only =
time I have needed a manual checkpoint is when performance testing to =
force updates back to disc prior to forcing a cache flush. If you are in =
a very strange position you *may* want to adjust the checkpoint =
interval, but that is the exception as well.
Mike John
"Martin" <anonymous@.discussions.microsoft.com> wrote in message =
news:9A6D13D7-D9CF-47F5-A5E9-441F087190B9@.microsoft.com...
quote:

> Dear Support,
> I am trying to find a way to monitor the checkpoint acitivites in our =

SQL Server 2000 with sp3. The error log file doesn't show. Am I =
missing something here?
quote:

> Also, after I ran the a checkpoint statment on a database, I am =

expecting the database mdf file to be updated. So, I am expecting last =
modified date of the mdf file to be changed. But, unfortunately,mind is =
not. I am wondering if this is normal. =20
quote:

> The way I run the checkpoint statment is by use of the Job scheduling. =

The history log shows successful on all checkpoint statments run.
quote:

> Thank you!
> Martin

Sunday, February 12, 2012

CHECKALLOC error

Dear all,
When I launch a pump from a DTS appears the following errror:
Backup operations, CHECKALLOC, massive copy, SELECT INTO and the
manipulation operations of files in a current database must be done serial.
Launch again the statement after ended the current operation.
I haven't idea what happend, morevoer I've seen that in that sql server no
backups running.
Does anyone ever experienced this situation? Any thought will be welcomed.
Regards,
EnricEnric
How big is your data to be insertded ?
"Enric" <Enric@.discussions.microsoft.com> wrote in message
news:6BC63150-F39B-4585-9A99-5050ADE37A2B@.microsoft.com...
> Dear all,
> When I launch a pump from a DTS appears the following errror:
> Backup operations, CHECKALLOC, massive copy, SELECT INTO and the
> manipulation operations of files in a current database must be done
> serial.
> Launch again the statement after ended the current operation.
> I haven't idea what happend, morevoer I've seen that in that sql server no
> backups running.
> Does anyone ever experienced this situation? Any thought will be welcomed.
> Regards,
> Enric|||Hi
You don't say what other tasks are in the package, but at a guess you need
to do execute each task serially, try putting them all on the main thread
(right click the transformation and change the workflow properties).
John
"Enric" wrote:

> Dear all,
> When I launch a pump from a DTS appears the following errror:
> Backup operations, CHECKALLOC, massive copy, SELECT INTO and the
> manipulation operations of files in a current database must be done serial
.
> Launch again the statement after ended the current operation.
> I haven't idea what happend, morevoer I've seen that in that sql server no
> backups running.
> Does anyone ever experienced this situation? Any thought will be welcomed.
> Regards,
> Enric|||3325 KB. Just a plain file.
W in w out, happen the same.
Let me know
"Uri Dimant" wrote:

> Enric
> How big is your data to be insertded ?
>
> "Enric" <Enric@.discussions.microsoft.com> wrote in message
> news:6BC63150-F39B-4585-9A99-5050ADE37A2B@.microsoft.com...
>
>|||I'm so sorry all of you, effectively there was a backup running against that
db...
...
!!
Thanks a lot anyway,
Enric
"John Bell" wrote:
> Hi
> You don't say what other tasks are in the package, but at a guess you need
> to do execute each task serially, try putting them all on the main thread
> (right click the transformation and change the workflow properties).
> John
> "Enric" wrote:
>

check what table are lock by application

Dear All,


Sometimes the application cannot write record into SQL Server, but the source code of this application cannot be seen. Therefore, I wanna verify the MSSQL status. I have to check what table are locked by application. I wanna know the following information.

locked_table, locked_by_application, locked_status

Can I write some t-sql to get the information? I tried using Profiler, but it generates some useless information. Could you give me some suggestions?

Alex

Lock granularity is much wider than only a tables. That's for the first. Second is that SQL Server doesn't require any information about application and situation, when application doesn't provide it, is common. And, for the third, I would recommend you to solve your locking and blocking problems rather than prevent connections to get blocked.|||

In my opinion Profiler would be the best choice for You. The only thing what You have to do is to establish the appropriate configuration in outgoing parameters.

|||

Take a look at: How to monitor SQL Server 2000 blocking http://support.microsoft.com/default.aspx?scid=kb;en-us;q271509

Denis the SQL Menace

http://sqlservercode.blogspot.com/

|||

thank SQL_Menace

I will try it

Alex

|||Hi Alex
here is a solution that microsoft does not recommend because it depends on the system objects
create table #Locks (SPID smallint , DBID smallint ,objID int ,indID smallint , Type nchar(4),resource nchar(16), mode nvarchar(8), status varchar(8))
insert into #locks execute sp_lock
select distinct object_name (objID) , Hostname , program_name,nt_userName , loginame , object_name (objID), mode
from master..sysprocesses s inner join #locks l on s.spid = l.spid
drop table #locks

find the values and the meanings of mode in the MSDN
HTH