Hello,
A User currently having a problem with an Access 2000 application that uses
Linked tables to connect to an SQL 2005 database. The user receives the
following message:
Connection failed:
SQLState: ‘01000’
SQL Server Error: 11004
[Microsoft ][ODBC SQL Server Driver][TCP/IP Sockets]
ConnectionOpen(gethostbyname()()).
Connection failed:
SQLState: ‘08001’
SQL Server Error: 11
[Microsoft ][ODBC SQL Server Driver][TCP/IP Sockets] General net
work error.
Check your network documentation.
The application was working for the user but it stopped working after a help
desk person had done some things to her machine to get another application
working. Anybody have an idea on what may have changed to cause this to
happen?
The Users workstation is Windows 2000 SP4. I can also ping and telnet to the
SQL server from that machine.It can be caused by different things but I've seen MDAC
versions be the cause of such problems before. Make sure the
PC has the latest MDAC version. You can download MDAC
versions and also download component checker to check the
MDAC version from:
http://msdn.microsoft.com/data/ref/mdac/downloads/
You would also want to check the event logs on the PC for
any network related issues.
-Sue
On Wed, 26 Jul 2006 08:46:02 -0700, Bill Klein
<BillKlein@.discussions.microsoft.com> wrote:
>Hello,
>A User currently having a problem with an Access 2000 application that uses
>Linked tables to connect to an SQL 2005 database. The user receives the
>following message:
>Connection failed:
>SQLState: 01000
>SQL Server Error: 11004
>[Microsoft ][ODBC SQL Server Driver][TCP/IP Sockets]
>ConnectionOpen(gethostbyname()()).
>Connection failed:
>SQLState: 08001
>SQL Server Error: 11
>[Microsoft ][ODBC SQL Server Driver][TCP/IP Sockets] General ne
twork error.
>Check your network documentation.
>The application was working for the user but it stopped working after a hel
p
>desk person had done some things to her machine to get another application
>working. Anybody have an idea on what may have changed to cause this to
>happen?
>The Users workstation is Windows 2000 SP4. I can also ping and telnet to th
e
>SQL server from that machine.|||Thanks Sue, the computer had version 2.53 i've upgraded it to 2.8 sp1 and
everything seems to work fine now.
"Sue Hoegemeier" wrote:
> It can be caused by different things but I've seen MDAC
> versions be the cause of such problems before. Make sure the
> PC has the latest MDAC version. You can download MDAC
> versions and also download component checker to check the
> MDAC version from:
> http://msdn.microsoft.com/data/ref/mdac/downloads/
> You would also want to check the event logs on the PC for
> any network related issues.
> -Sue
> On Wed, 26 Jul 2006 08:46:02 -0700, Bill Klein
> <BillKlein@.discussions.microsoft.com> wrote:
>
>sql
Showing posts with label user. Show all posts
Showing posts with label user. Show all posts
Tuesday, March 27, 2012
General network error
Does anyone have an idea why some of the scheduled jobs
end with the following error message:
Executed as user: DATABASE\Administrator.
ConnectionCheckForData (CheckforData()). [SQLSTATE 01000]
(Message 10054) General network error. Check your
network documentation. [SQLSTATE 08S01] (Error 11). The
step failed.
I have also experienced this when running long queries
(usually > 30min) in Query Analyzer.
I set the timeout to 300 (default was 60 or 30) and
reduced the packet size to 1428 (default was 4096) and
these helped but only with some queries/jobs.
Any help would be greatly appreciated!
.mikaby reducing the packet size you reduced the amount of pipe that SQL Server u
ses to communicate over the network. Timeout is in seconds so 300 seconds t
ranslates to 5 minutes. If the reduction of your useable bandwith across th
e network causes your trans
fer of data to go over 5 minutes then you have a problem.|||Have had this problem recently, it seems a common error with quite a
few different symptoms. I will tell you our story, which may or may
not help.
For our case, we had this error executing dynamic SQL over ADO.NET,
but could also recreate the problem via Query Analyser using different
protocols.
We were using a complex query and got either your error or the
following:
ODBC: Msg 0, Level 19, State 1
SqlDumpExceptionHandler: Process 51 generated fatal exception c0000005
EXCEPTION_ACCESS_VIOLATION. SQL Server is terminating this process.
Connection Broken
We only got this error under certain conditions but could reproduce it
faithfully under those conditions.
Sniffing around the newsgroups, the general opinion was that if you
changed the query slightly, then in some cases the problem just "went
away".
I found 2 solutions to our problem.
Solution 1
Our query was using a view and by putting a "TOP 100 PERCENT" clause
in the view the problem went away (for one instance only)
Solution 2
By using "OPTION(MERGE JOIN)" or "OPTION(LOOP JOIN)" in the SQL
statement, the problem went away. By forcing "OPTION(HASH JOIN)" the
problem re-appeared.
My theory is that merge joins were causing the problem (possibly in
conjunction with parallel query execution) but can't prove anything
because when you get this problem, you can't even get a query plan.
Looking at the query plan after using "TOP 100 PERCENT" I noticed that
there were no merge joins, although that proves nothing.
We have continued to get problems in other areas of our application
and find that "OPTION(LOOP JOIN)" with dynamic sql fixes the symptoms
but if anybody can find out the root causes and a fix I would
appreciate it if they let me know.
"Mika" <mika.ylinen@.corporateimage.se> wrote in message news:<126e501c3f65f$860582e0$a00
1280a@.phx.gbl>...
> Does anyone have an idea why some of the scheduled jobs
> end with the following error message:
> Executed as user: DATABASE\Administrator.
> ConnectionCheckForData (CheckforData()). [SQLSTATE 01000]
> (Message 10054) General network error. Check your
> network documentation. [SQLSTATE 08S01] (Error 11). The
> step failed.
> I have also experienced this when running long queries
> (usually > 30min) in Query Analyzer.
> I set the timeout to 300 (default was 60 or 30) and
> reduced the packet size to 1428 (default was 4096) and
> these helped but only with some queries/jobs.
> Any help would be greatly appreciated!
> .mika
end with the following error message:
Executed as user: DATABASE\Administrator.
ConnectionCheckForData (CheckforData()). [SQLSTATE 01000]
(Message 10054) General network error. Check your
network documentation. [SQLSTATE 08S01] (Error 11). The
step failed.
I have also experienced this when running long queries
(usually > 30min) in Query Analyzer.
I set the timeout to 300 (default was 60 or 30) and
reduced the packet size to 1428 (default was 4096) and
these helped but only with some queries/jobs.
Any help would be greatly appreciated!
.mikaby reducing the packet size you reduced the amount of pipe that SQL Server u
ses to communicate over the network. Timeout is in seconds so 300 seconds t
ranslates to 5 minutes. If the reduction of your useable bandwith across th
e network causes your trans
fer of data to go over 5 minutes then you have a problem.|||Have had this problem recently, it seems a common error with quite a
few different symptoms. I will tell you our story, which may or may
not help.
For our case, we had this error executing dynamic SQL over ADO.NET,
but could also recreate the problem via Query Analyser using different
protocols.
We were using a complex query and got either your error or the
following:
ODBC: Msg 0, Level 19, State 1
SqlDumpExceptionHandler: Process 51 generated fatal exception c0000005
EXCEPTION_ACCESS_VIOLATION. SQL Server is terminating this process.
Connection Broken
We only got this error under certain conditions but could reproduce it
faithfully under those conditions.
Sniffing around the newsgroups, the general opinion was that if you
changed the query slightly, then in some cases the problem just "went
away".
I found 2 solutions to our problem.
Solution 1
Our query was using a view and by putting a "TOP 100 PERCENT" clause
in the view the problem went away (for one instance only)
Solution 2
By using "OPTION(MERGE JOIN)" or "OPTION(LOOP JOIN)" in the SQL
statement, the problem went away. By forcing "OPTION(HASH JOIN)" the
problem re-appeared.
My theory is that merge joins were causing the problem (possibly in
conjunction with parallel query execution) but can't prove anything
because when you get this problem, you can't even get a query plan.
Looking at the query plan after using "TOP 100 PERCENT" I noticed that
there were no merge joins, although that proves nothing.
We have continued to get problems in other areas of our application
and find that "OPTION(LOOP JOIN)" with dynamic sql fixes the symptoms
but if anybody can find out the root causes and a fix I would
appreciate it if they let me know.
"Mika" <mika.ylinen@.corporateimage.se> wrote in message news:<126e501c3f65f$860582e0$a00
1280a@.phx.gbl>...
> Does anyone have an idea why some of the scheduled jobs
> end with the following error message:
> Executed as user: DATABASE\Administrator.
> ConnectionCheckForData (CheckforData()). [SQLSTATE 01000]
> (Message 10054) General network error. Check your
> network documentation. [SQLSTATE 08S01] (Error 11). The
> step failed.
> I have also experienced this when running long queries
> (usually > 30min) in Query Analyzer.
> I set the timeout to 300 (default was 60 or 30) and
> reduced the packet size to 1428 (default was 4096) and
> these helped but only with some queries/jobs.
> Any help would be greatly appreciated!
> .mika
Friday, March 23, 2012
Fuzzy Search?
How do I do a fuzzy search? If I have a table of full names, I'd like the user to be able to do a search and find the record, "Charles Montgomery Burns" with "Monty Burns" or "Montgomry" (mispelling).
Every major web site does this kind of thing (Amazon, Google, etc).
Someone suggested SOUNDEX, but this really doesn't fit the bill. Misspellings often don't use the same sound signature as the originals. Plus, that doesn't handle multi-word searchable texts very well.
Others have suggested tries or suffix trees. If I went this route, wouldn't I have to preload all data out of the database and into this custom structure upon app startup? Is there any way around that? Also, this solution seems like it would require a lot of dev time (building a custom suffix tree with fuzzy lookup capabilities).
Is there a commonly known and acceptable solution to this?
(sorry, also posted to MySQL group; I'm using both databases so a solution in either would be satisfactory)I did something recently where I used DIFFERENCE (I know you already said soundex is bad) on first names and lastnames with a user defined function that weighted results with a point system. An exact match on strings got a lot of points (say 200) a Difference of 4 recieved 100, a Difference of 3 recieved 75 etc... and then I ordered the results by the score, last name and first name. Works pretty well. I would post it but it is part someone else's code who could not get it to work until I fixed it for him.
Every major web site does this kind of thing (Amazon, Google, etc).
Someone suggested SOUNDEX, but this really doesn't fit the bill. Misspellings often don't use the same sound signature as the originals. Plus, that doesn't handle multi-word searchable texts very well.
Others have suggested tries or suffix trees. If I went this route, wouldn't I have to preload all data out of the database and into this custom structure upon app startup? Is there any way around that? Also, this solution seems like it would require a lot of dev time (building a custom suffix tree with fuzzy lookup capabilities).
Is there a commonly known and acceptable solution to this?
(sorry, also posted to MySQL group; I'm using both databases so a solution in either would be satisfactory)I did something recently where I used DIFFERENCE (I know you already said soundex is bad) on first names and lastnames with a user defined function that weighted results with a point system. An exact match on strings got a lot of points (say 200) a Difference of 4 recieved 100, a Difference of 3 recieved 75 etc... and then I ordered the results by the score, last name and first name. Works pretty well. I would post it but it is part someone else's code who could not get it to work until I fixed it for him.
Monday, March 19, 2012
Functions don't show dependencies?
I use a user defined function in several stored procedures. However, only
tables show up when I look at the function's dependencies. How do I also
have the stored procedures that are using this function show up as
dependencies?
If that cannot be done, how else do I keep track of the stored procedures
which are using a certain function?
Thanks,
BrettThis works for me. Try recreating the sps.
use northwind
go
create function dbo.ufn_f1 ()
returns int
as
begin
return (1)
end
go
create procedure dbo.usp_p1
as
select dbo.ufn_f1()
go
exec sp_depends ufn_f1
go
drop procedure dbo.usp_p1
go
drop function dbo.ufn_f1
go
AMB
"Brett" wrote:
> I use a user defined function in several stored procedures. However, only
> tables show up when I look at the function's dependencies. How do I also
> have the stored procedures that are using this function show up as
> dependencies?
> If that cannot be done, how else do I keep track of the stored procedures
> which are using a certain function?
> Thanks,
> Brett
>
>|||Also,
How do I find a stored procedure containing <text>?
http://www.aspfaq.com/show.asp?id=2037
AMB
"Alejandro Mesa" wrote:
> This works for me. Try recreating the sps.
> use northwind
> go
> create function dbo.ufn_f1 ()
> returns int
> as
> begin
> return (1)
> end
> go
> create procedure dbo.usp_p1
> as
> select dbo.ufn_f1()
> go
> exec sp_depends ufn_f1
> go
> drop procedure dbo.usp_p1
> go
> drop function dbo.ufn_f1
> go
>
> AMB
>
> "Brett" wrote:
>
tables show up when I look at the function's dependencies. How do I also
have the stored procedures that are using this function show up as
dependencies?
If that cannot be done, how else do I keep track of the stored procedures
which are using a certain function?
Thanks,
BrettThis works for me. Try recreating the sps.
use northwind
go
create function dbo.ufn_f1 ()
returns int
as
begin
return (1)
end
go
create procedure dbo.usp_p1
as
select dbo.ufn_f1()
go
exec sp_depends ufn_f1
go
drop procedure dbo.usp_p1
go
drop function dbo.ufn_f1
go
AMB
"Brett" wrote:
> I use a user defined function in several stored procedures. However, only
> tables show up when I look at the function's dependencies. How do I also
> have the stored procedures that are using this function show up as
> dependencies?
> If that cannot be done, how else do I keep track of the stored procedures
> which are using a certain function?
> Thanks,
> Brett
>
>|||Also,
How do I find a stored procedure containing <text>?
http://www.aspfaq.com/show.asp?id=2037
AMB
"Alejandro Mesa" wrote:
> This works for me. Try recreating the sps.
> use northwind
> go
> create function dbo.ufn_f1 ()
> returns int
> as
> begin
> return (1)
> end
> go
> create procedure dbo.usp_p1
> as
> select dbo.ufn_f1()
> go
> exec sp_depends ufn_f1
> go
> drop procedure dbo.usp_p1
> go
> drop function dbo.ufn_f1
> go
>
> AMB
>
> "Brett" wrote:
>
Labels:
database,
defined,
dependencies,
functio,
function,
functions,
microsoft,
mysql,
onlytables,
oracle,
procedures,
server,
sql,
stored,
user
Monday, March 12, 2012
Function to return substring letters only
I am hoping someone can help me with an example of a user function that will
return just the letters of a string. For example, sending 1RMB23 will return
RMB. Thank you.CREATE FUNCTION ReturnNonNumeric (@.Source varchar(100))
RETURNS varchar(100)
AS
BEGIN
DECLARE @.ReturnNonNumeric varchar(100)
SET @.ReturnNonNumeric = REPLACE(@.Source, '0', '')
SET @.ReturnNonNumeric = REPLACE(@.ReturnNonNumeric, '1', '')
SET @.ReturnNonNumeric = REPLACE(@.ReturnNonNumeric, '2', '')
SET @.ReturnNonNumeric = REPLACE(@.ReturnNonNumeric, '3', '')
SET @.ReturnNonNumeric = REPLACE(@.ReturnNonNumeric, '4', '')
SET @.ReturnNonNumeric = REPLACE(@.ReturnNonNumeric, '5', '')
SET @.ReturnNonNumeric = REPLACE(@.ReturnNonNumeric, '6', '')
SET @.ReturnNonNumeric = REPLACE(@.ReturnNonNumeric, '7', '')
SET @.ReturnNonNumeric = REPLACE(@.ReturnNonNumeric, '8', '')
SET @.ReturnNonNumeric = REPLACE(@.ReturnNonNumeric, '9', '')
RETURN (@.ReturnNonNumeric)
END
--kludgy, but will do what you want. Stu|||quickly wrote this (just for fun)
CREATE FUNCTION [dbo].[udf_AlphaOnly] (@.String varchar(255))
RETURNS varchar(255)
AS
BEGIN
Declare @.nPos Int,@.Strip varchar(150)
Set @.nPos=1
Set @.Strip='0123456789!@.#$%^&*()-_=+[]{}\|;:"<>,./?'
While @.nPos<=Len(@.Strip)
Begin
Set @.String=Replace(@.String,Substring(@.Strip
,@.nPos,1),'')
Set @.nPos=@.nPos+1
End
Return @.String
END|||Wow; that's nice.
<golf clap>
Stu|||Thanks, but if I thunk'd a moment longer, I would have trapped the single
quotes.
Return Replace(@.String,'','')|||Elegant, thank you. And thanks to Stu. I learned from yours also.
"John Cappelletti" wrote:
> quickly wrote this (just for fun)
> CREATE FUNCTION [dbo].[udf_AlphaOnly] (@.String varchar(255))
> RETURNS varchar(255)
> AS
> BEGIN
> Declare @.nPos Int,@.Strip varchar(150)
> Set @.nPos=1
> Set @.Strip='0123456789!@.#$%^&*()-_=+[]{}\|;:"<>,./?'
> While @.nPos<=Len(@.Strip)
> Begin
> Set @.String=Replace(@.String,Substring(@.Strip
,@.nPos,1),'')
> Set @.nPos=@.nPos+1
> End
> Return @.String
> END
>|||Sorry, I was clear until your "moment longer." You've got all single quotes.
You're trapping a string of 5 single quotes and replacing with two single
quotes? Where does that come from?
"John Cappelletti" wrote:
> Thanks, but if I thunk'd a moment longer, I would have trapped the single
> quotes.
> Return Replace(@.String,'','')
>|||I omitted the single quote from the strip string (and space).
Since I grab only 1 character at a time from the strip string, one final
replace is required, and the only way to put a single quote within single
quotes is to double them up.
The 5 should be 4 (I'm distracted by a bad movie)
Return Replace(@.String,'''','')
Good catch!
John
"richardb" wrote:
> Sorry, I was clear until your "moment longer." You've got all single quote
s.
> You're trapping a string of 5 single quotes and replacing with two single
> quotes? Where does that come from?
> "John Cappelletti" wrote:
>
return just the letters of a string. For example, sending 1RMB23 will return
RMB. Thank you.CREATE FUNCTION ReturnNonNumeric (@.Source varchar(100))
RETURNS varchar(100)
AS
BEGIN
DECLARE @.ReturnNonNumeric varchar(100)
SET @.ReturnNonNumeric = REPLACE(@.Source, '0', '')
SET @.ReturnNonNumeric = REPLACE(@.ReturnNonNumeric, '1', '')
SET @.ReturnNonNumeric = REPLACE(@.ReturnNonNumeric, '2', '')
SET @.ReturnNonNumeric = REPLACE(@.ReturnNonNumeric, '3', '')
SET @.ReturnNonNumeric = REPLACE(@.ReturnNonNumeric, '4', '')
SET @.ReturnNonNumeric = REPLACE(@.ReturnNonNumeric, '5', '')
SET @.ReturnNonNumeric = REPLACE(@.ReturnNonNumeric, '6', '')
SET @.ReturnNonNumeric = REPLACE(@.ReturnNonNumeric, '7', '')
SET @.ReturnNonNumeric = REPLACE(@.ReturnNonNumeric, '8', '')
SET @.ReturnNonNumeric = REPLACE(@.ReturnNonNumeric, '9', '')
RETURN (@.ReturnNonNumeric)
END
--kludgy, but will do what you want. Stu|||quickly wrote this (just for fun)
CREATE FUNCTION [dbo].[udf_AlphaOnly] (@.String varchar(255))
RETURNS varchar(255)
AS
BEGIN
Declare @.nPos Int,@.Strip varchar(150)
Set @.nPos=1
Set @.Strip='0123456789!@.#$%^&*()-_=+[]{}\|;:"<>,./?'
While @.nPos<=Len(@.Strip)
Begin
Set @.String=Replace(@.String,Substring(@.Strip
,@.nPos,1),'')
Set @.nPos=@.nPos+1
End
Return @.String
END|||Wow; that's nice.
<golf clap>
Stu|||Thanks, but if I thunk'd a moment longer, I would have trapped the single
quotes.
Return Replace(@.String,'','')|||Elegant, thank you. And thanks to Stu. I learned from yours also.
"John Cappelletti" wrote:
> quickly wrote this (just for fun)
> CREATE FUNCTION [dbo].[udf_AlphaOnly] (@.String varchar(255))
> RETURNS varchar(255)
> AS
> BEGIN
> Declare @.nPos Int,@.Strip varchar(150)
> Set @.nPos=1
> Set @.Strip='0123456789!@.#$%^&*()-_=+[]{}\|;:"<>,./?'
> While @.nPos<=Len(@.Strip)
> Begin
> Set @.String=Replace(@.String,Substring(@.Strip
,@.nPos,1),'')
> Set @.nPos=@.nPos+1
> End
> Return @.String
> END
>|||Sorry, I was clear until your "moment longer." You've got all single quotes.
You're trapping a string of 5 single quotes and replacing with two single
quotes? Where does that come from?
"John Cappelletti" wrote:
> Thanks, but if I thunk'd a moment longer, I would have trapped the single
> quotes.
> Return Replace(@.String,'','')
>|||I omitted the single quote from the strip string (and space).
Since I grab only 1 character at a time from the strip string, one final
replace is required, and the only way to put a single quote within single
quotes is to double them up.
The 5 should be 4 (I'm distracted by a bad movie)
Return Replace(@.String,'''','')
Good catch!
John
"richardb" wrote:
> Sorry, I was clear until your "moment longer." You've got all single quote
s.
> You're trapping a string of 5 single quotes and replacing with two single
> quotes? Where does that come from?
> "John Cappelletti" wrote:
>
Friday, March 9, 2012
Function performances
I've made a user defined frunction that calculate a percentage reading data
from tables in db.
If i run the function with that code
set dateformat dmy
declare @.aaa DECIMAL(5,2)
set @.aaa=dbo.fn_name()
print @.aaa
or with that code
select dbo.fn_name()
it takes 21 seconds...too long
If i copy the code of the function and execute it in query analyzer, it
takes less than 1 second.
How is it possible?Function is not necessarily good for all kind of operation especially
for manipulating data in sets.
If your need to manipulate data in sets, you might as well do it in
stored proc to give you better performance and try to avoid cursor as
much as possible.
Roberto Lo Baido wrote:
> I've made a user defined frunction that calculate a percentage reading data
> from tables in db.
> If i run the function with that code
> set dateformat dmy
> declare @.aaa DECIMAL(5,2)
> set @.aaa=dbo.fn_name()
> print @.aaa
> or with that code
> select dbo.fn_name()
> it takes 21 seconds...too long
> If i copy the code of the function and execute it in query analyzer, it
> takes less than 1 second.
> How is it possible?
from tables in db.
If i run the function with that code
set dateformat dmy
declare @.aaa DECIMAL(5,2)
set @.aaa=dbo.fn_name()
print @.aaa
or with that code
select dbo.fn_name()
it takes 21 seconds...too long
If i copy the code of the function and execute it in query analyzer, it
takes less than 1 second.
How is it possible?Function is not necessarily good for all kind of operation especially
for manipulating data in sets.
If your need to manipulate data in sets, you might as well do it in
stored proc to give you better performance and try to avoid cursor as
much as possible.
Roberto Lo Baido wrote:
> I've made a user defined frunction that calculate a percentage reading data
> from tables in db.
> If i run the function with that code
> set dateformat dmy
> declare @.aaa DECIMAL(5,2)
> set @.aaa=dbo.fn_name()
> print @.aaa
> or with that code
> select dbo.fn_name()
> it takes 21 seconds...too long
> If i copy the code of the function and execute it in query analyzer, it
> takes less than 1 second.
> How is it possible?
Function performances
I've made a user defined frunction that calculate a percentage reading data
from tables in db.
If i run the function with that code
set dateformat dmy
declare @.aaa DECIMAL(5,2)
set @.aaa=dbo.fn_name()
print @.aaa
or with that code
select dbo.fn_name()
it takes 21 seconds...too long
If i copy the code of the function and execute it in query analyzer, it
takes less than 1 second.
How is it possible?
Function is not necessarily good for all kind of operation especially
for manipulating data in sets.
If your need to manipulate data in sets, you might as well do it in
stored proc to give you better performance and try to avoid cursor as
much as possible.
Roberto Lo Baido wrote:
> I've made a user defined frunction that calculate a percentage reading data
> from tables in db.
> If i run the function with that code
> set dateformat dmy
> declare @.aaa DECIMAL(5,2)
> set @.aaa=dbo.fn_name()
> print @.aaa
> or with that code
> select dbo.fn_name()
> it takes 21 seconds...too long
> If i copy the code of the function and execute it in query analyzer, it
> takes less than 1 second.
> How is it possible?
from tables in db.
If i run the function with that code
set dateformat dmy
declare @.aaa DECIMAL(5,2)
set @.aaa=dbo.fn_name()
print @.aaa
or with that code
select dbo.fn_name()
it takes 21 seconds...too long
If i copy the code of the function and execute it in query analyzer, it
takes less than 1 second.
How is it possible?
Function is not necessarily good for all kind of operation especially
for manipulating data in sets.
If your need to manipulate data in sets, you might as well do it in
stored proc to give you better performance and try to avoid cursor as
much as possible.
Roberto Lo Baido wrote:
> I've made a user defined frunction that calculate a percentage reading data
> from tables in db.
> If i run the function with that code
> set dateformat dmy
> declare @.aaa DECIMAL(5,2)
> set @.aaa=dbo.fn_name()
> print @.aaa
> or with that code
> select dbo.fn_name()
> it takes 21 seconds...too long
> If i copy the code of the function and execute it in query analyzer, it
> takes less than 1 second.
> How is it possible?
Wednesday, March 7, 2012
function -> first letter of each word - capital
Hello
I'm looking for a ready to use user function which takes a string as a
argument and returns string containing fist letter of each word as capital.
example:
initail: sUN iS ShINIng
result: Sun Is Shining
The similar role in Oracle has function called INITCAP
Best Regards
Darek T.http://www.devx.com/tips/Tip/17608
Aneesh
"Dariusz Tomon" <d.tomon@.mazars.pl> wrote in message
news:esb8iz2yGHA.3440@.TK2MSFTNGP06.phx.gbl...
> Hello
> I'm looking for a ready to use user function which takes a string as a
> argument and returns string containing fist letter of each word as
> capital.
> example:
> initail: sUN iS ShINIng
> result: Sun Is Shining
> The similar role in Oracle has function called INITCAP
> Best Regards
> Darek T.
>|||If you are using SQL Server 2005 then use the FOR XML enhancements, see my
blog entry:
http://sqlblogcasts.com/blogs/tonyr.../06/20/832.aspx
Tony Rogerson
SQL Server MVP
http://sqlblogcasts.com/blogs/tonyrogerson - technical commentary from a SQL
Server Consultant
http://sqlserverfaq.com - free video tutorials
"Dariusz Tomon" <d.tomon@.mazars.pl> wrote in message
news:esb8iz2yGHA.3440@.TK2MSFTNGP06.phx.gbl...
> Hello
> I'm looking for a ready to use user function which takes a string as a
> argument and returns string containing fist letter of each word as
> capital.
> example:
> initail: sUN iS ShINIng
> result: Sun Is Shining
> The similar role in Oracle has function called INITCAP
> Best Regards
> Darek T.
>
I'm looking for a ready to use user function which takes a string as a
argument and returns string containing fist letter of each word as capital.
example:
initail: sUN iS ShINIng
result: Sun Is Shining
The similar role in Oracle has function called INITCAP
Best Regards
Darek T.http://www.devx.com/tips/Tip/17608
Aneesh
"Dariusz Tomon" <d.tomon@.mazars.pl> wrote in message
news:esb8iz2yGHA.3440@.TK2MSFTNGP06.phx.gbl...
> Hello
> I'm looking for a ready to use user function which takes a string as a
> argument and returns string containing fist letter of each word as
> capital.
> example:
> initail: sUN iS ShINIng
> result: Sun Is Shining
> The similar role in Oracle has function called INITCAP
> Best Regards
> Darek T.
>|||If you are using SQL Server 2005 then use the FOR XML enhancements, see my
blog entry:
http://sqlblogcasts.com/blogs/tonyr.../06/20/832.aspx
Tony Rogerson
SQL Server MVP
http://sqlblogcasts.com/blogs/tonyrogerson - technical commentary from a SQL
Server Consultant
http://sqlserverfaq.com - free video tutorials
"Dariusz Tomon" <d.tomon@.mazars.pl> wrote in message
news:esb8iz2yGHA.3440@.TK2MSFTNGP06.phx.gbl...
> Hello
> I'm looking for a ready to use user function which takes a string as a
> argument and returns string containing fist letter of each word as
> capital.
> example:
> initail: sUN iS ShINIng
> result: Sun Is Shining
> The similar role in Oracle has function called INITCAP
> Best Regards
> Darek T.
>
function -> first letter of each word - capital
Hello
I'm looking for a ready to use user function which takes a string as a
argument and returns string containing fist letter of each word as capital.
example:
initail: sUN iS ShINIng
result: Sun Is Shining
The similar role in Oracle has function called INITCAP
Best Regards
Darek T.http://www.devx.com/tips/Tip/17608
Aneesh
"Dariusz Tomon" <d.tomon@.mazars.pl> wrote in message
news:esb8iz2yGHA.3440@.TK2MSFTNGP06.phx.gbl...
> Hello
> I'm looking for a ready to use user function which takes a string as a
> argument and returns string containing fist letter of each word as
> capital.
> example:
> initail: sUN iS ShINIng
> result: Sun Is Shining
> The similar role in Oracle has function called INITCAP
> Best Regards
> Darek T.
>|||If you are using SQL Server 2005 then use the FOR XML enhancements, see my
blog entry:
http://sqlblogcasts.com/blogs/tonyrogerson/archive/2006/06/20/832.aspx
--
Tony Rogerson
SQL Server MVP
http://sqlblogcasts.com/blogs/tonyrogerson - technical commentary from a SQL
Server Consultant
http://sqlserverfaq.com - free video tutorials
"Dariusz Tomon" <d.tomon@.mazars.pl> wrote in message
news:esb8iz2yGHA.3440@.TK2MSFTNGP06.phx.gbl...
> Hello
> I'm looking for a ready to use user function which takes a string as a
> argument and returns string containing fist letter of each word as
> capital.
> example:
> initail: sUN iS ShINIng
> result: Sun Is Shining
> The similar role in Oracle has function called INITCAP
> Best Regards
> Darek T.
>
I'm looking for a ready to use user function which takes a string as a
argument and returns string containing fist letter of each word as capital.
example:
initail: sUN iS ShINIng
result: Sun Is Shining
The similar role in Oracle has function called INITCAP
Best Regards
Darek T.http://www.devx.com/tips/Tip/17608
Aneesh
"Dariusz Tomon" <d.tomon@.mazars.pl> wrote in message
news:esb8iz2yGHA.3440@.TK2MSFTNGP06.phx.gbl...
> Hello
> I'm looking for a ready to use user function which takes a string as a
> argument and returns string containing fist letter of each word as
> capital.
> example:
> initail: sUN iS ShINIng
> result: Sun Is Shining
> The similar role in Oracle has function called INITCAP
> Best Regards
> Darek T.
>|||If you are using SQL Server 2005 then use the FOR XML enhancements, see my
blog entry:
http://sqlblogcasts.com/blogs/tonyrogerson/archive/2006/06/20/832.aspx
--
Tony Rogerson
SQL Server MVP
http://sqlblogcasts.com/blogs/tonyrogerson - technical commentary from a SQL
Server Consultant
http://sqlserverfaq.com - free video tutorials
"Dariusz Tomon" <d.tomon@.mazars.pl> wrote in message
news:esb8iz2yGHA.3440@.TK2MSFTNGP06.phx.gbl...
> Hello
> I'm looking for a ready to use user function which takes a string as a
> argument and returns string containing fist letter of each word as
> capital.
> example:
> initail: sUN iS ShINIng
> result: Sun Is Shining
> The similar role in Oracle has function called INITCAP
> Best Regards
> Darek T.
>
Sunday, February 19, 2012
Full-Text Search / User Instances
Is there any documentation on using full-text search with user instances? Is it even supported?
FTS is disabled for User Instances.
Mike
|||We just spent quite a bit of time adding support for user instances into our application. It solves a number of problems for us and we're very happy with how it works. But I wouldn't have done it had I known about the FTS limitation.
Please tell me there is a chance of this changing at some point?
|||does this go for the default user instance as well
\sqlExpress
|||.\sqlexpress is not a User Instance, it is the default named instance that SQL Express installs to; we call this the "main" instance. FTS is functional in the main instance.
Mike Wachal - SQL Express team
|||Hi Marc,
This won't change for SQL 2005 but we are investigating it for a future version.
Mike Wachal - SQL Express team
Full-Text Search
I would like to use the Full-Text Search in MS SQL 2000, but I'm not
sure whether I can use it in my setup.
In my application the user is able to type some text (about 400
words). In the database I have a list of words that I would like to
match to the text. Is it possible to use stemming etc in this
context? Do I need to first add the text to the database and then
search for the words one by one?
Thanks in advance!
-- -- -- -
Posted with NewsLeecher v3.9 Beta 1
Web @. http://www.newsleecher.com/?usenet
-- -- -- -- -
Hello Savage,
Essentially you want to text mine your content. We do exactly as you want
by storing the text and then using looping through the keywords to search
for and store the results. We do it in a batch though, searching through
a batch of jobs at one time. This is because its not simple to do a full
text search against 1 row in a table. You could split your text into individual
words and then look for matches. There are many routines to split text but
are largely limited to one delimiter rather than a set.
Simon Sabin
SQL Server MVP
http://sqlblogcasts.com/blogs/simons
> I would like to use the Full-Text Search in MS SQL 2000, but I'm not
> sure whether I can use it in my setup.
> In my application the user is able to type some text (about 400
> words). In the database I have a list of words that I would like to
> match to the text. Is it possible to use stemming etc in this context?
> Do I need to first add the text to the database and then search for
> the words one by one?
> Thanks in advance!
> --
> -- -- -- -
> Posted with NewsLeecher v3.9 Beta 1
> Web @. http://www.newsleecher.com/?usenet
> -- -- -- -- -
|||Thanks a lot for your answer. I will try to implement this!
-- -- -- -
Posted with NewsLeecher v3.9 Beta 1
Web @. http://www.newsleecher.com/?usenet
-- -- -- -- -
|||For stemming you would need to do a freetext search. Another option is to
build an inverted file index and only store and query on the root of the
word, keeping in mind handling exceptions, i.e. a search on mouse would also
return hits to mice.
Look at Porter Stemming algorithm implementations to understand how this
would work.
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
"Savage" <my@.email.com> wrote in message
news:45e947d6$0$9908$e4fe514c@.dreader25.news.xs4al l.nl...
>I would like to use the Full-Text Search in MS SQL 2000, but I'm not
> sure whether I can use it in my setup.
> In my application the user is able to type some text (about 400
> words). In the database I have a list of words that I would like to
> match to the text. Is it possible to use stemming etc in this
> context? Do I need to first add the text to the database and then
> search for the words one by one?
> Thanks in advance!
>
> --
> -- -- -- -
> Posted with NewsLeecher v3.9 Beta 1
> Web @. http://www.newsleecher.com/?usenet
> -- -- -- -- -
>
|||Thanks for your help!
-- -- -- -
Posted with NewsLeecher v3.9 Beta 1
Web @. http://www.newsleecher.com/?usenet
-- -- -- -- -
sure whether I can use it in my setup.
In my application the user is able to type some text (about 400
words). In the database I have a list of words that I would like to
match to the text. Is it possible to use stemming etc in this
context? Do I need to first add the text to the database and then
search for the words one by one?
Thanks in advance!
-- -- -- -
Posted with NewsLeecher v3.9 Beta 1
Web @. http://www.newsleecher.com/?usenet
-- -- -- -- -
Hello Savage,
Essentially you want to text mine your content. We do exactly as you want
by storing the text and then using looping through the keywords to search
for and store the results. We do it in a batch though, searching through
a batch of jobs at one time. This is because its not simple to do a full
text search against 1 row in a table. You could split your text into individual
words and then look for matches. There are many routines to split text but
are largely limited to one delimiter rather than a set.
Simon Sabin
SQL Server MVP
http://sqlblogcasts.com/blogs/simons
> I would like to use the Full-Text Search in MS SQL 2000, but I'm not
> sure whether I can use it in my setup.
> In my application the user is able to type some text (about 400
> words). In the database I have a list of words that I would like to
> match to the text. Is it possible to use stemming etc in this context?
> Do I need to first add the text to the database and then search for
> the words one by one?
> Thanks in advance!
> --
> -- -- -- -
> Posted with NewsLeecher v3.9 Beta 1
> Web @. http://www.newsleecher.com/?usenet
> -- -- -- -- -
|||Thanks a lot for your answer. I will try to implement this!
-- -- -- -
Posted with NewsLeecher v3.9 Beta 1
Web @. http://www.newsleecher.com/?usenet
-- -- -- -- -
|||For stemming you would need to do a freetext search. Another option is to
build an inverted file index and only store and query on the root of the
word, keeping in mind handling exceptions, i.e. a search on mouse would also
return hits to mice.
Look at Porter Stemming algorithm implementations to understand how this
would work.
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
"Savage" <my@.email.com> wrote in message
news:45e947d6$0$9908$e4fe514c@.dreader25.news.xs4al l.nl...
>I would like to use the Full-Text Search in MS SQL 2000, but I'm not
> sure whether I can use it in my setup.
> In my application the user is able to type some text (about 400
> words). In the database I have a list of words that I would like to
> match to the text. Is it possible to use stemming etc in this
> context? Do I need to first add the text to the database and then
> search for the words one by one?
> Thanks in advance!
>
> --
> -- -- -- -
> Posted with NewsLeecher v3.9 Beta 1
> Web @. http://www.newsleecher.com/?usenet
> -- -- -- -- -
>
|||Thanks for your help!
-- -- -- -
Posted with NewsLeecher v3.9 Beta 1
Web @. http://www.newsleecher.com/?usenet
-- -- -- -- -
Subscribe to:
Posts (Atom)