Showing posts with label word. Show all posts
Showing posts with label word. Show all posts

Wednesday, March 7, 2012

NOLOCK or Not to NOLOCK

I need some help to under stand when the right time is for NOLOCK. I work in a small dev group and NOLOCK seams to be a buzz word and others are throwing it in all over for no apparent reason.

I read the thing from http://www.sql-server-performance.com/ and I am sure that our web and SQL servers are about 100x over sized for the application. While are ASP.Net (VB) app may demonstrate some hesitation from time to time I am more inclined to blame poor VB.Net coding techniques before slow SQL. The point being the NOLOCK is being added to SELECTS that are not part of a transaction and were using the SQL data adapter to return datasets or single column values.

Also I am not even sure it's being used correctly. The OLM has the example:
SELECT au_lname FROM authors WITH (NOLOCK)

However I am seeing it formatted like this:
SELECT au_lname FROM authors (NOLOCK)

I am by no mean an expert, I follow what I read in books or from examples from others. And I have never read in a book go crazy with NOLOCK because it's the bomb!

Any thoughts? I am trying to learn as much as I can before I raise my hand and say this might be a bad idea.

Thankshttp://www.sql-server-performance.com/lock_contention_tamed_article.asp|||This is the article that I read.
I guess I need to learn if I am having a lock contention problem? I have been using the Enterprise manager and watching for locks and there does not appear to be any issues. I am also trying a demo of "Spotlight on SQL" and it shows just a few database level shared locks and no blocking locks.

I am guessing I would see blocking locks if there was contention which would warrant the use of the NOLOCK correct?|||In general, I use NOLOCK when I have a problem, and generally, I see the problem when the front end is MS Access, because of the way folks tend to use Access (binding to the entire table).|||To be honest, NOLOCK used to be very helpful when you were stuck with COM+'s serialized isolation level. My biggest problem with table hints is that they are just that, hints, not instructions. You can write some lovely SQL statement that works for days, months, years. Then all of sudden it stops working, why? Because SQL has decided that it no longer wants to take notice of your hint.

So I'd say, like has already been said, use them when you *need* to use them. Normally sorting out your isolation levels will solve most the of the problems.

noise words and language support

Hi,
I am using sql2000 server full-text search and neutral word braeker is set.
I am having problem with noise words becouse the sql query returns with
ignored word error.
The sql query somethink like that
SELECT title FROM tFtest WHERE contains (title,'"*nokia*" near
"*phone*" near "*-*"' )
"-" is not in ignored words and also "/ * ' " etc words give the error. I
cleared the noise.dat file and restat the mssearch but I got still the same
error. how can I avoid the error. The table rows are less than 100 thousand
so the file size is not important.
The second question is sql2000 fulltext search server doesn't support
turkish language and that is why I had to choose neutral setting. Is there
any why to use turkish language in fulltext search.
Thankstolgay wrote on Wed, 10 Oct 2007 11:54:15 +0300:
> Hi,
> I am using sql2000 server full-text search and neutral word braeker is
> set.
> I am having problem with noise words becouse the sql query returns with
> ignored word error.
> The sql query somethink like that
> SELECT title FROM tFtest WHERE contains (title,'"*nokia*" near
> "*phone*" near "*-*"' )
> "-" is not in ignored words and also "/ * ' " etc words give the
> error. I cleared the noise.dat file and restat the mssearch but I got
> still the same error. how can I avoid the error. The table rows are
> less than 100 thousand so the file size is not important.
- / * are not words. Also, you cannot use a term like *nokia* - the *
operator is for prefix searches only (eg. nokia* finds all words that start
with nokia).
Your search should look like this:
SELECT title FROM tFtest WHERE contains (title,'"nokia" near
"phone"')
Dan|||Thanks you light me up :)
I know if I erase the line the code will work but dou you know which words
cannot be used which are not in the noise.dat becouse the search text comes
from search page and user can write everythink or anythink what they want
and my code must work with out given error.
"Daniel Crichton" <msnews@.worldofspack.com> wrote in message
news:eT$KkBzCIHA.1204@.TK2MSFTNGP03.phx.gbl...
> tolgay wrote on Wed, 10 Oct 2007 11:54:15 +0300:
> > Hi,
> > I am using sql2000 server full-text search and neutral word braeker is
> > set.
> > I am having problem with noise words becouse the sql query returns with
> > ignored word error.
> > The sql query somethink like that
> > SELECT title FROM tFtest WHERE contains (title,'"*nokia*" near
> > "*phone*" near "*-*"' )
> > "-" is not in ignored words and also "/ * ' " etc words give the
> > error. I cleared the noise.dat file and restat the mssearch but I got
> > still the same error. how can I avoid the error. The table rows are
> > less than 100 thousand so the file size is not important.
>
> - / * are not words. Also, you cannot use a term like *nokia* - the *
> operator is for prefix searches only (eg. nokia* finds all words that
start
> with nokia).
> Your search should look like this:
> SELECT title FROM tFtest WHERE contains (title,'"nokia" near
> "phone"')
> Dan
>|||tolgay wrote on Wed, 10 Oct 2007 14:48:54 +0300:
> Thanks you light me up :)
> I know if I erase the line the code will work but dou you know which
> words cannot be used which are not in the noise.dat becouse the search
> text comes from search page and user can write everythink or anythink
> what they want and my code must work with out given error.
Just strip out all non-alphanumeric "words".
Dan

Noise words

Could someone tell me how I "turn off" the noise word filtering for SQL server?

My problem is that I use the neutral language (defaults to english) and it strips out some words I do not want stripped from my queries. So in this particular case, I would like to be able to turn off noise word filtering altogether.

Ideas?

Noise words are stored in a text file, by default, it is in

C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\FTData\

Just edit the noiseNEU.txt for neutral language. Delete the word in the file. You may need to restart sql server and recrawl your index.

Noise words

Could someone tell me how I "turn off" the noise word filtering for SQL server?

My problem is that I use the neutral language (defaults to english) and it strips out some words I do not want stripped from my queries. So in this particular case, I would like to be able to turn off noise word filtering altogether.

Ideas?

Noise words are stored in a text file, by default, it is in

C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\FTData\

Just edit the noiseNEU.txt for neutral language. Delete the word in the file. You may need to restart sql server and recrawl your index.

Noise word blues

Hi,
I'm having a noise word problem that I don't seem to see in any of the other
postings.
Here is the setup:
SQL Server 2000 Standard Edition SP3 running on Win 2003 Server.
In order to avoid the normal noise word problems we edited the noise word
file for english by just putting a space in it and saving the file and
restarting SQL Server and the search service (reboot of machine actually).
However there are still some characters that when used with a CONTAINS still
give back the noise word error. The ones we found tend to be special single
characters such as "?" or "_".
An example would be: WHERE CONTAINS(*, '"Pick" AND "?" AND "List"')
Is there any way to get these to be ignored as well or is there a
comprehensive list of these characters so we could parse them out on in the
application code? We've tried neutral word breaking and using FREETEXT and
that didn't work either.
Thanks in advance for any help,
Wayne Antinore
Unfortunately what you have to do is parse your content and replace these
characters with a token, i.e. replace "?" with " QuestionMark " and then in
your queries when someone is querying on a ? expand this to a query on
QuestionMark.
You will need to replace the ? mark with a token which will not be searched
on and you will need to surround this token with white space for it to work
correctly.
When you return the data to the client make sure you replace the token back
with ?, or have non marked up content somewhere and return this content
instead.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Wayne Antinore" <wantinore@.veramark.com> wrote in message
news:uZNyLtirFHA.2212@.TK2MSFTNGP15.phx.gbl...
> Hi,
> I'm having a noise word problem that I don't seem to see in any of the
other
> postings.
> Here is the setup:
> SQL Server 2000 Standard Edition SP3 running on Win 2003 Server.
> In order to avoid the normal noise word problems we edited the noise word
> file for english by just putting a space in it and saving the file and
> restarting SQL Server and the search service (reboot of machine actually).
> However there are still some characters that when used with a CONTAINS
still
> give back the noise word error. The ones we found tend to be special
single
> characters such as "?" or "_".
> An example would be: WHERE CONTAINS(*, '"Pick" AND "?" AND "List"')
> Is there any way to get these to be ignored as well or is there a
> comprehensive list of these characters so we could parse them out on in
the
> application code? We've tried neutral word breaking and using FREETEXT
and
> that didn't work either.
> Thanks in advance for any help,
> Wayne Antinore
>
|||Thanks Hilary,
Yuck!, but thanks anyway at least now I know there isn't a quick fix that
I'm missing
Wayne
"Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
news:OJv7yJjrFHA.2272@.TK2MSFTNGP11.phx.gbl...
> Unfortunately what you have to do is parse your content and replace these
> characters with a token, i.e. replace "?" with " QuestionMark " and then
> in
> your queries when someone is querying on a ? expand this to a query on
> QuestionMark.
> You will need to replace the ? mark with a token which will not be
> searched
> on and you will need to surround this token with white space for it to
> work
> correctly.
> When you return the data to the client make sure you replace the token
> back
> with ?, or have non marked up content somewhere and return this content
> instead.
> --
> Hilary Cotter
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
> Looking for a FAQ on Indexing Services/SQL FTS
> http://www.indexserverfaq.com
> "Wayne Antinore" <wantinore@.veramark.com> wrote in message
> news:uZNyLtirFHA.2212@.TK2MSFTNGP15.phx.gbl...
> other
> still
> single
> the
> and
>

Saturday, February 25, 2012

No Word wrap

How can I stop word wrap happening? If the data is too big for the column
then I want it truncated.
Any ideas?Go to the properties of the text box... There is a property named something
like 'Allow automatic expansion''' Make sure it is not checked and you will
be good to go.
--
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Joe90" <Joe90@.discussions.microsoft.com> wrote in message
news:AE9DC820-52DA-4A6B-A17C-0EF0D9354C81@.microsoft.com...
> How can I stop word wrap happening? If the data is too big for the column
> then I want it truncated.
> Any ideas?|||Right click the field in question, click on properties. Uncheck "Can
increase to accomidate contents".
Catadmin
"Joe90" wrote:
> How can I stop word wrap happening? If the data is too big for the column
> then I want it truncated.
> Any ideas?|||Thanks but I already have 'Can Expand' set to 'false'.
That property stops the the textbox being increased in size to fit the text.
The problem I am getting is that the text is being wrapped within the fixed
size textbox, in some case losing the top half of the first line and bottom
half of the second line.
I've discovered that by adjusting the Top & Bottom padding I can stop it
happening but was wondering if there was a property.
Thanks again
"Catadmin" wrote:
> Right click the field in question, click on properties. Uncheck "Can
> increase to accomidate contents".
> Catadmin
> "Joe90" wrote:
> > How can I stop word wrap happening? If the data is too big for the column
> > then I want it truncated.
> >
> > Any ideas?|||I think you just found it. The only other option I can think of is to
re-size the font smaller, which sometimes makes an item unreadable.
Sorry.
Catadmin
"Joe90" wrote:
> Thanks but I already have 'Can Expand' set to 'false'.
> That property stops the the textbox being increased in size to fit the text.
> The problem I am getting is that the text is being wrapped within the fixed
> size textbox, in some case losing the top half of the first line and bottom
> half of the second line.
> I've discovered that by adjusting the Top & Bottom padding I can stop it
> happening but was wondering if there was a property.
> Thanks again
> "Catadmin" wrote:
> > Right click the field in question, click on properties. Uncheck "Can
> > increase to accomidate contents".
> >
> > Catadmin
> >
> > "Joe90" wrote:
> >
> > > How can I stop word wrap happening? If the data is too big for the column
> > > then I want it truncated.
> > >
> > > Any ideas?|||Also, you could use the left function to display only a certain number of
characters. Of course, that works best if you're using Courier, but perhaps
it could help.
Mike G.
"Catadmin" <goldpetalgraphics@.yahoo.com> wrote in message
news:424C4F08-511D-4100-B675-3A6479DDC76B@.microsoft.com...
>I think you just found it. The only other option I can think of is to
> re-size the font smaller, which sometimes makes an item unreadable.
> Sorry.
> Catadmin
> "Joe90" wrote:
>> Thanks but I already have 'Can Expand' set to 'false'.
>> That property stops the the textbox being increased in size to fit the
>> text.
>> The problem I am getting is that the text is being wrapped within the
>> fixed
>> size textbox, in some case losing the top half of the first line and
>> bottom
>> half of the second line.
>> I've discovered that by adjusting the Top & Bottom padding I can stop it
>> happening but was wondering if there was a property.
>> Thanks again
>> "Catadmin" wrote:
>> > Right click the field in question, click on properties. Uncheck "Can
>> > increase to accomidate contents".
>> >
>> > Catadmin
>> >
>> > "Joe90" wrote:
>> >
>> > > How can I stop word wrap happening? If the data is too big for the
>> > > column
>> > > then I want it truncated.
>> > >
>> > > Any ideas?