Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Contains function on image data type

Author  Topic 

John_Idol
Starting Member

39 Posts

Posted - 2007-05-16 : 07:07:09
Hi all,

I am working on application maintance. I got a Contains(myField, myString) that used to look into an image data type field (text) for the string, but right now it's not responding they way it's supposed to do.

Recently really big files have been introduced in the DB, could this related to the issue?

Anyone can help regarding this?

Many thanks,

Giovanni

Kristen
Test

22859 Posts

Posted - 2007-05-16 : 15:54:59
"used to look into an image data type field (text) for the string"

Is the datatype for the column IMAGE or is it TEXT ?

Kristen
Go to Top of Page

John_Idol
Starting Member

39 Posts

Posted - 2007-05-16 : 17:37:58
the data type is IMAGE (I wrote text to underline what I was putting as IMAGE data type is not actually an image).

Giovanni
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2007-05-17 : 02:54:45
Is the Full Text Index getting updated? (Might need a rebuild if there has been some recent bulk import)

Kristen
Go to Top of Page

John_Idol
Starting Member

39 Posts

Posted - 2007-05-18 : 05:16:05
I thought it was that, so I set up a schedule to run at night to update the Full Text Index, but still it's not working properly - doesn't find strings - in certain cases. I noticed I didn't set Population type fiedl and it was 'Incremental' by default, I set it now to 'Full', planning to move it to 'Update' next days.

Hope it works...

Thanks,

Giovanni
Go to Top of Page

John_Idol
Starting Member

39 Posts

Posted - 2007-05-18 : 05:35:34
No luck.
I ran full text index on the tables but contains function still doesn't find correct results.
Any Idea?

Giovanni
Go to Top of Page

John_Idol
Starting Member

39 Posts

Posted - 2007-05-18 : 08:05:40
Could it depend on the Files? I have in there pdf and ppt files.

Thanks,

G
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2007-05-19 : 06:50:30
"Could it depend on the Files?"

Yes! If you have "binary" content in your IMAGE column I don't think Full Text is going to do anything with it.

However, if you store a UNC to an external file instead, and store the "text" in external files, then the Full Text search (i.e. using Index Server) can definitely index the contents of PDF files (there is a plug-in for PDF files for Index Server, dunno about PPT files, but given that they are Microsoft files they are probably supported out-of-=the-box)

Kristen
Go to Top of Page

John_Idol
Starting Member

39 Posts

Posted - 2007-05-19 : 07:31:08
Thanks Kristen,

the strange thing is that with a lot of pdf files it works, and with some of them it doesn't, so I am totally lost.
Anyway, How can I store a UNC to external files? never did it before.

G

P.S:
By the way, remember that table I had (on another post http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=82552 ) which was freezin?
I discovered with sp_who2 active that it was the full text indexing that was locking the table.
It was executing randomlt during the day and blocking other procedures and messing around, so I scheduled it at night.
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2007-05-19 : 07:51:45
"How can I store a UNC to external files?"

Sorry, I was meaning store your PDFs on the server somewhere, lets say "x:\MyData\MyFile.PDF", and then have a column in the database called "MyFileLocation" and store "x:\MyData\MyFile.PDF" in that.

So when you want to "deliver" the file you get the path/filename from the database, and then "deliver" the file from there.

"I discovered with sp_who2 active that it was the full text indexing that was locking the table"

I've got a client with the same problem. Full Text indexing is causing Deadlock in the front end.

There is an MS Knowledge base about it, which I think says they fixed it quite a long time ago in a service pack, but for whatever reason my client still seems to be having a problem with it.

Kristen
Go to Top of Page
   

- Advertisement -