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

Thursday, March 22, 2012

Bookmark, Explain Plan understanding

When I display my execution plan, a node indicates an Index Seek, the object
listed is the name of the nonclustered indexe used, and the Output list has
[Bmk1002]. Normally in the Output list I see a list of columns when there is
a Bookmark involved, but this is confusing to me cause it is an Index Seek
and the Output list is simply [Bmk1002]. Using "set showplan_all on" shows
the same thing. In this instance do I look at the corresponding Bookmark node
to determine which columns are being sought? Why does it give me a Bookmark
when I am having returned an Index Seek? This is a nasty multi-join query so
I am not including the statement or the tables and indexes. Any possible
explanations would be appreciated.
--
Message posted via http://www.sqlmonster.comWell, it is because you are trying to get the column/s that do not covered
by index and SQL Server is using nonclusterd index to point to datapage to
return the data
Like
select col1, col30 from table where col1=5
col1 has an index and we will see index seek with bookmark because col30
does not have any index in that case
"cbrichards via SQLMonster.com" <u3288@.uwe> wrote in message
news:605b4028efd9b@.uwe...
> When I display my execution plan, a node indicates an Index Seek, the
> object
> listed is the name of the nonclustered indexe used, and the Output list
> has
> [Bmk1002]. Normally in the Output list I see a list of columns when there
> is
> a Bookmark involved, but this is confusing to me cause it is an Index Seek
> and the Output list is simply [Bmk1002]. Using "set showplan_all on" shows
> the same thing. In this instance do I look at the corresponding Bookmark
> node
> to determine which columns are being sought? Why does it give me a
> Bookmark
> when I am having returned an Index Seek? This is a nasty multi-join query
> so
> I am not including the statement or the tables and indexes. Any possible
> explanations would be appreciated.
> --
> Message posted via http://www.sqlmonster.comsql

Monday, March 19, 2012

Bogus "Invalid object name" error

Hi all,
I'm posting this so it'll be archived in the great google
repository, and hopefully be useful to someone. I spent awhile
troubleshooting what turned out to be a completely misleading error
arising from a simple typo in a query. Here's the crux:
create table foo (id int)
The command(s) completed successfully.
insert foo ('id') values (1)
Server: Msg 208, Level 16, State 3, Line 1
Invalid object name 'foo'.
insert foo (id) values (1)
(1 row(s) affected)
drop table foo
The command(s) completed successfully.
--
My first insert statement has incorrect single quotes around the
column name, which for some reason leads to the error shown.
Unfortunately, my real-life problem was much more convoluted, and
this took a couple hours to debug. I hope this post saves someone
time someday! This is on SQLServer 2000 w/SP3a.
Cheers...It probably won't when it happens, but it may for people who read it :)
These strange types of error messages have been around as long as time
itself. Thanks for posting stuff like this!
--
----
Louis Davidson - http://spaces.msn.com/members/drsql/
SQL Server MVP
"Jerry" <leavemealone@.nowhere.com> wrote in message
news:Xns9660740FD7089leavemealonenowhere
c@.207.225.159.8...
> Hi all,
> I'm posting this so it'll be archived in the great google
> repository, and hopefully be useful to someone. I spent awhile
> troubleshooting what turned out to be a completely misleading error
> arising from a simple typo in a query. Here's the crux:
> --
> create table foo (id int)
> The command(s) completed successfully.
> insert foo ('id') values (1)
> Server: Msg 208, Level 16, State 3, Line 1
> Invalid object name 'foo'.
> insert foo (id) values (1)
> (1 row(s) affected)
> drop table foo
> The command(s) completed successfully.
> --
> My first insert statement has incorrect single quotes around the
> column name, which for some reason leads to the error shown.
> Unfortunately, my real-life problem was much more convoluted, and
> this took a couple hours to debug. I hope this post saves someone
> time someday! This is on SQLServer 2000 w/SP3a.
> Cheers...

Wednesday, March 7, 2012

blocked process counter in perfmon

I could have sworn I saw a new counter in perfmon for SQL around blocked
process count.. Not too sure under which particular object it was.
And if so, do you use it and how beneficial is it ?Hassan
Could it be at SQL Server Profiler?
"Hassan" <hassan@.hotmail.com> wrote in message
news:uURSG$XXIHA.4880@.TK2MSFTNGP03.phx.gbl...
>I could have sworn I saw a new counter in perfmon for SQL around blocked
>process count.. Not too sure under which particular object it was.
> And if so, do you use it and how beneficial is it ?
>
>|||Hi
Maybe you are thinking of Lock Blocks in the Memory Manager collection,
which is the number of rindividual esources that are locked.
There is also a Deadlock/sec counter which is not the same a blocked
processes either!
John
"Hassan" wrote:
> I could have sworn I saw a new counter in perfmon for SQL around blocked
> process count.. Not too sure under which particular object it was.
> And if so, do you use it and how beneficial is it ?
>
>|||I think I found it..
"Processes blocked " in SQL Server : General Stats ;)
"John Bell" <jbellnewsposts@.hotmail.com> wrote in message
news:0D0FA9A6-E694-44F6-AFE1-EEBBC9670E45@.microsoft.com...
> Hi
> Maybe you are thinking of Lock Blocks in the Memory Manager collection,
> which is the number of rindividual esources that are locked.
> There is also a Deadlock/sec counter which is not the same a blocked
> processes either!
> John
> "Hassan" wrote:
>> I could have sworn I saw a new counter in perfmon for SQL around blocked
>> process count.. Not too sure under which particular object it was.
>> And if so, do you use it and how beneficial is it ?
>>
>>

Block to drop any object with ddl triger

Hi all,
I want block attempt to drop any objects(tables, sp, views...) of my data
base.
Have way to do this?
I did see same thing about DDL trigers, any one can sed-me one sample?
Thanks to allHi all,
Thanks,
I find one sample...
CREATE TRIGGER safety
ON DATABASE
FOR DROP_TABLE, ALTER_TABLE
AS
PRINT 'You must disable Trigger "safety" to drop or alter tables!'
ROLLBACK ;
Thanks again
"retf" <re.tf@.terra.com.br> escreveu na mensagem
news:%23cQ9yq6eGHA.1272@.TK2MSFTNGP03.phx.gbl...
> Hi all,
> I want block attempt to drop any objects(tables, sp, views...) of my data
> base.
> Have way to do this?
> I did see same thing about DDL trigers, any one can sed-me one sample?
> Thanks to all
>|||This should really be
CREATE TRIGGER safety
ON DATABASE
FOR DROP_TABLE, ALTER_TABLE
AS
BEGIN
RAISERROR('You must disable Trigger "safety" to drop or alter
tables!',16,1)
ROLLBACK ;
END
Without an error, a client may think the statement suceeded.
David
"retf" <re.tf@.terra.com.br> wrote in message
news:%23P2uRt6eGHA.3484@.TK2MSFTNGP02.phx.gbl...
> Hi all,
> Thanks,
> I find one sample...
> CREATE TRIGGER safety
> ON DATABASE
> FOR DROP_TABLE, ALTER_TABLE
> AS
> PRINT 'You must disable Trigger "safety" to drop or alter tables!'
> ROLLBACK ;
>
> Thanks again
> "retf" <re.tf@.terra.com.br> escreveu na mensagem
> news:%23cQ9yq6eGHA.1272@.TK2MSFTNGP03.phx.gbl...
>|||David Browne (davidbaxterbrowne no potted meat@.hotmail.com) writes:
> This should really be
>
> CREATE TRIGGER safety
> ON DATABASE
> FOR DROP_TABLE, ALTER_TABLE
> AS
> BEGIN
> RAISERROR('You must disable Trigger "safety" to drop or alter
> tables!',16,1)
> ROLLBACK ;
> END
> Without an error, a client may think the statement suceeded.
Quibble: there will be an error message without the RAISERROR. To
wit, in SQL 2005 a ROLLBACK in a trigger raises an error message.
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx

Friday, February 24, 2012

BLOB

Hi,
I'm new on the group, sorry if that topic is being repeated.
I'm facing the problem of puting a big object into MS SQL.
Does the procedure is being executed on the DB site, or I can
run it outside the DB (separate e.g. C++ programme).
I've read such articles like 'Who's Afraid of the Big, Bad BLOB?'
and I still don't know how to bite it.
Will be gratefull for any help or Inet sources.
LaurusThe Books Online has some examples. Look for "Building SQL Server
Applications" under the Contents tab.
Wei Xiao [MSFT]
SQL Server Storage Engine Development
http://blogs.msdn.com/weix
This posting is provided "AS IS" with no warranties, and confers no rights.
"Laurus" <s1336@.poczta.onet.pl> wrote in message
news:dbgu9f$g9m$1@.news.onet.pl...
> Hi,
> I'm new on the group, sorry if that topic is being repeated.
> I'm facing the problem of puting a big object into MS SQL.
> Does the procedure is being executed on the DB site, or I can
> run it outside the DB (separate e.g. C++ programme).
> I've read such articles like 'Who's Afraid of the Big, Bad BLOB?'
> and I still don't know how to bite it.
> Will be gratefull for any help or Inet sources.
> Laurus
>
>|||
> The Books Online has some examples. Look for "Building SQL Server
> Applications" under the Contents tab.
Thanks. I found it.
Laurus

BLOB

Hi,
I'm new on the group, sorry if that topic is being repeated.
I'm facing the problem of puting a big object into MS SQL.
Does the procedure is being executed on the DB site, or I can
run it outside the DB (separate e.g. C++ programme).
I've read such articles like 'Who's Afraid of the Big, Bad BLOB?'
and I still don't know how to bite it.
Will be gratefull for any help or Inet sources.
Laurus
The Books Online has some examples. Look for "Building SQL Server
Applications" under the Contents tab.
Wei Xiao [MSFT]
SQL Server Storage Engine Development
http://blogs.msdn.com/weix
This posting is provided "AS IS" with no warranties, and confers no rights.
"Laurus" <s1336@.poczta.onet.pl> wrote in message
news:dbgu9f$g9m$1@.news.onet.pl...
> Hi,
> I'm new on the group, sorry if that topic is being repeated.
> I'm facing the problem of puting a big object into MS SQL.
> Does the procedure is being executed on the DB site, or I can
> run it outside the DB (separate e.g. C++ programme).
> I've read such articles like 'Who's Afraid of the Big, Bad BLOB?'
> and I still don't know how to bite it.
> Will be gratefull for any help or Inet sources.
> Laurus
>
>
|||
> The Books Online has some examples. Look for "Building SQL Server
> Applications" under the Contents tab.
Thanks. I found it.
Laurus

BLOB

Hi,
I'm new on the group, sorry if that topic is being repeated.
I'm facing the problem of puting a big object into MS SQL.
Does the procedure is being executed on the DB site, or I can
run it outside the DB (separate e.g. C++ programme).
I've read such articles like 'Who's Afraid of the Big, Bad BLOB?'
and I still don't know how to bite it.
Will be gratefull for any help or Inet sources.
LaurusThe Books Online has some examples. Look for "Building SQL Server
Applications" under the Contents tab.
--
Wei Xiao [MSFT]
SQL Server Storage Engine Development
http://blogs.msdn.com/weix
This posting is provided "AS IS" with no warranties, and confers no rights.
"Laurus" <s1336@.poczta.onet.pl> wrote in message
news:dbgu9f$g9m$1@.news.onet.pl...
> Hi,
> I'm new on the group, sorry if that topic is being repeated.
> I'm facing the problem of puting a big object into MS SQL.
> Does the procedure is being executed on the DB site, or I can
> run it outside the DB (separate e.g. C++ programme).
> I've read such articles like 'Who's Afraid of the Big, Bad BLOB?'
> and I still don't know how to bite it.
> Will be gratefull for any help or Inet sources.
> Laurus
>
>|||> The Books Online has some examples. Look for "Building SQL Server
> Applications" under the Contents tab.
Thanks. I found it.
--
Laurus

Thursday, February 16, 2012

blank pages

When I print my report, every other page is blank. I have resized everything
down to half the page, played with margins and object sizes to see if I just
had an oversized item, but to no avail. Is there a setting or somthing that
does this?
I am at my wits end!
thanks!Check the width of your report's Body - right-click on the body bar and
select properties - Size>width. This should be less than or equal to
Page width - (Left margin + Right margin) <- all in Report Properties
Layout tab
HTH,
Magendo_man
"Carl Henthorn" wrote:
> When I print my report, every other page is blank. I have resized everything
> down to half the page, played with margins and object sizes to see if I just
> had an oversized item, but to no avail. Is there a setting or somthing that
> does this?
> I am at my wits end!
> thanks!