Showing posts with label object. Show all posts
Showing posts with label object. Show all posts

Wednesday, March 7, 2012

Function execution

Hello,
I am trying to optimize a function, and need some
information on functions, can anyone help me out.
1. Is function a compiled object of SQL.
2. If yes how do we recompile it.
Thanks,
ManojManoj,
Are these user defined functions? Or using functions like MAX, MIN, etc.
Vikram Jayaram
Microsoft, SQL Server
This posting is provided "AS IS" with no warranties, and confers no rights.
Subscribe to MSDN & use http://msdn.microsoft.com/newsgroups.

Function execution

Hello,
I am trying to optimize a function, and need some
information on functions, can anyone help me out.
1. Is function a compiled object of SQL.
2. If yes how do we recompile it.
Thanks,
Manoj
Manoj,
Are these user defined functions? Or using functions like MAX, MIN, etc.
Vikram Jayaram
Microsoft, SQL Server
This posting is provided "AS IS" with no warranties, and confers no rights.
Subscribe to MSDN & use http://msdn.microsoft.com/newsgroups.

Function can be used in one server and not another

I have created a Function and I can call it in one server and i created
it in another server in my database and I get the error that object
does not exists in master.dbo
how do i get this funtion to work
i can see the function in the list.Hi,
You can use four part naming covention to call object from diffrent server
i.e. server.database.owner.objet
But before this you need to add that server as linked server using
sp_addlinkserver
vishal.sql@.gmail.com wrote:
>I have created a Function and I can call it in one server and i created
>it in another server in my database and I get the error that object
>does not exists in master.dbo
>how do i get this funtion to work
>i can see the function in the list.
--
Message posted via SQLMonster.com
http://www.sqlmonster.com/Uwe/Forums.aspx/sql-server/200605/1

function call with table as parameter

Hi all, I want to use a function with a tabel object as parameter. Does
someone know a method to do this. I have read that a table as parameter
is invalid.Tables are accessible to functions as well as to calling code so it
shouldn't be necessary to pass them as parameters. It sounds like you
are trying to abstract some logic in a function that might be better
done some other way.

Please explain more fully the problem you are having.

--
David Portas
SQL Server MVP
--|||I should have said that PERMANENT tables are accessible to functions as
well as to calling code. Temporary tables are not. Are you trying to
access a temporary table within a function? If so, consider using an SP
instead.

--
David Portas
SQL Server MVP
--|||I am writing a SP and my idea was to call a function that does some
substitutions at a template-text. The substitution values and original
values should be posted by a dynamic generated table at the SP.

But perhaps it is realy the best way to do the substitutions direct
inside the SP.|||Thomas (Thomas.Martin@.eu.necel.com) writes:
> Hi all, I want to use a function with a tabel object as parameter. Does
> someone know a method to do this. I have read that a table as parameter
> is invalid.

This article of mine may give you some inspiration:
http://www.sommarskog.se/share_data.html.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp

Sunday, February 26, 2012

Fully qualified object names help reuse of execution plans.

Fully qualified object names help reuse of execution plans.
Is this true? Discuss.
Also, what constitutes fully qualified?
Is it
server.database.owner.object
or can you get away with
database.owner.object
and still resuse your execution plans?
ThanksYou should read this KB. Even though it is for 2005 most of the same
principles still apply.
http://www.microsoft.com/technet/pr...005/recomp.mspx
As for your question of what does fully mean well that depends. Mostly it
means you should always specify the object owner along with the object.
dbo.yoursp or dbo.yourtable etc.
If you are accessing an object from within the same db then just specify the
owner and the object. Do not specify the database as it is no necessary and
actually invokes a few more lines of code than necessary. If you need to
specify an object in another db on the same server than you must specify
that as well.
OtherDB.dbo.Object
Andrew J. Kelly SQL MVP
"Damien" <Damien@.discussions.microsoft.com> wrote in message
news:2BBC6EA6-2E85-4643-8E07-16E031D8E8A9@.microsoft.com...
> Fully qualified object names help reuse of execution plans.
> Is this true? Discuss.
> Also, what constitutes fully qualified?
> Is it
> server.database.owner.object
> or can you get away with
> database.owner.object
> and still resuse your execution plans?
> Thanks
>|||Hi
http://msdn.microsoft.com/library/d...br />
4azp.asp
If you want more information, get yourself "Inside SQL Server 2000" by Kalen
Delaney.
owner.object is good enough for re-use.
--
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"Damien" <Damien@.discussions.microsoft.com> wrote in message
news:2BBC6EA6-2E85-4643-8E07-16E031D8E8A9@.microsoft.com...
> Fully qualified object names help reuse of execution plans.
> Is this true? Discuss.
> Also, what constitutes fully qualified?
> Is it
> server.database..object
> or can you get away with
> database.owner.object
> and still resuse your execution plans?
> Thanks
>

Full-Text Setup and Search

Hi,

I have a database developed using SQL Server Management Studio Express with Full-Text searching. I can go into the Object Explorer and right click on my database and choose Properties, select File and the 'Use-full-ext indexing' is checked.

I'm not sure how I create an index for a table, can someone help? I want to create an index for table 'tblLogNotes' and have the following columns:

note_id = (PK, int, not null)
note = (varchar(3000), not null)
log_id = (FK, int, not null)
operatorid = (int, not null)
note_created = (datetime, not null)

I know I did something but not sure what I did, but on one of my tables, when I right click on table and choose 'log_note', I can see that Full-text Specification = yes, (is full-text indexed = yes), full-text type column = <none> and language = English (United States).

Table 'tblLog' has the following columns:
log_id - (PK, int - not null)
log_note (varchar(3000), not null)
tag_number(varchar(50), not null)

However, when I try the following query, I get nothing:

SELECT *
FROM tblLog
WHERE CONTAINS(Log_note, '"pump*"')

I've also tried: 'pump'

What am I doing wrong?

Thanks,

Hi Ed,

You need to create a Full Text Catalog and a Full Text Index before you can query against them. See...

CREATE FULLTEXT CATALOG

CREATE FULLTEXT INDEX

and

The Full Text Overview topic in Books Online.

SSMSE does not enable the Full Text commands for technical reasons, but you can use the Template Explorer to get the basic SQL statements and then just fill in the blanks for your database.

Mike