Showing posts with label facing. Show all posts
Showing posts with label facing. Show all posts

Wednesday, March 28, 2012

Incorrect Time Zone

I have just setup up SQL Notification Services 2005 at my workplace and running an instance of it. The problem that I am facing is with the deliveryrequesttime and sent time in the notification distribution view. These times are ahead of the server time by 5 hours. The server is set correctly to the local time and time zone. I would like to synchronize the deliveryrequesttime and senttime to the server time.

TIA

SSNS processes everything in UTC time. I'm guessing you are offset from the UTC by 5 hours.|||How do I go about solving this problem? Is there a setting that I modify?|||I understand from your original post that you'd like to make SSNS process things in accordance with your local time zone. But SSNS works in terms of UTC so that it can process scheduled subscriptions for multiple time zones.

What are you trying to accomplish? If it's for reporting purposes, you can calculate the offset.

HTH...

Joe|||

This was the concrete answer i was looking for.

Thanks

Tha

Incorrect Time Zone

I have just setup up SQL Notification Services 2005 at my workplace and running an instance of it. The problem that I am facing is with the deliveryrequesttime and sent time in the notification distribution view. These times are ahead of the server time by 5 hours. The server is set correctly to the local time and time zone. I would like to synchronize the deliveryrequesttime and senttime to the server time.

TIA

SSNS processes everything in UTC time. I'm guessing you are offset from the UTC by 5 hours.|||How do I go about solving this problem? Is there a setting that I modify?|||I understand from your original post that you'd like to make SSNS process things in accordance with your local time zone. But SSNS works in terms of UTC so that it can process scheduled subscriptions for multiple time zones.

What are you trying to accomplish? If it's for reporting purposes, you can calculate the offset.

HTH...

Joe|||

This was the concrete answer i was looking for.

Thanks

Tha

sql

Incorrect Time Zone

I have just setup up SQL Notification Services 2005 at my workplace and running an instance of it. The problem that I am facing is with the deliveryrequesttime and sent time in the notification distribution view. These times are ahead of the server time by 5 hours. The server is set correctly to the local time and time zone. I would like to synchronize the deliveryrequesttime and senttime to the server time.

TIA

SSNS processes everything in UTC time. I'm guessing you are offset from the UTC by 5 hours.|||How do I go about solving this problem? Is there a setting that I modify?|||I understand from your original post that you'd like to make SSNS process things in accordance with your local time zone. But SSNS works in terms of UTC so that it can process scheduled subscriptions for multiple time zones.

What are you trying to accomplish? If it's for reporting purposes, you can calculate the offset.

HTH...

Joe|||

This was the concrete answer i was looking for.

Thanks

Tha

Incorrect Time Zone

I have just setup up SQL Notification Services 2005 at my workplace and running an instance of it. The problem that I am facing is with the deliveryrequesttime and sent time in the notification distribution view. These times are ahead of the server time by 5 hours. The server is set correctly to the local time and time zone. I would like to synchronize the deliveryrequesttime and senttime to the server time.

TIA

SSNS processes everything in UTC time. I'm guessing you are offset from the UTC by 5 hours.|||How do I go about solving this problem? Is there a setting that I modify?|||I understand from your original post that you'd like to make SSNS process things in accordance with your local time zone. But SSNS works in terms of UTC so that it can process scheduled subscriptions for multiple time zones.

What are you trying to accomplish? If it's for reporting purposes, you can calculate the offset.

HTH...

Joe|||

This was the concrete answer i was looking for.

Thanks

Tha

Friday, March 9, 2012

Inconsistent Database Performance

Hi,

I am facing a peculiar problem while looking ahead in a live Database
currently under operation in one of my clients Project. An
Application that is updating 3 - tables in the Database is missing to
update a certain number of Fields in one of the Tables. The fact is
not frequent and I have checked through the Server Performance Monitor
that there is no performance slag of the Server during any point of
time.

The Tables are indexed with common Key fields. Can anybody help me in
this regard ?

Thanks & Regards.

--
Posted using the http://www.dbforumz.com interface, at author's request
Articles individually checked for conformance to usenet standards
Topic URL: http://www.dbforumz.com/General-Dis...pict193836.html
Visit Topic URL to contact author (reg. req'd). Report abuse: http://www.dbforumz.com/eform.php?p=655931"gangulyarindam" <UseLinkToEmail@.dbForumz.com> wrote in message
news:42010bd1$1_5@.alt.athenanews.com...
> Hi,
> I am facing a peculiar problem while looking ahead in a live Database
> currently under operation in one of my client's Project. An
> Application that is updating 3 - tables in the Database is missing to
> update a certain number of Fields in one of the Tables. The fact is
> not frequent and I have checked through the Server Performance Monitor
> that there is no performance slag of the Server during any point of
> time.
> The Tables are indexed with common Key fields. Can anybody help me in
> this regard ?
> Thanks & Regards.
> --
> Posted using the http://www.dbforumz.com interface, at author's request
> Articles individually checked for conformance to usenet standards
> Topic URL:
> http://www.dbforumz.com/General-Dis...pict193836.html
> Visit Topic URL to contact author (reg. req'd). Report abuse:
> http://www.dbforumz.com/eform.php?p=655931

You can use Profiler to see exactly what commands the application is sending
to MSSQL - sometimes an application may not be doing what you think it is,
especially if it builds SQL strings dynamically.

If that doesn't help, you would need to give some more information about
your environment and exactly what is going wrong.

Simon|||gangulyarindam (UseLinkToEmail@.dbForumz.com) writes:
> I am facing a peculiar problem while looking ahead in a live Database
> currently under operation in one of my client's Project. An
> Application that is updating 3 - tables in the Database is missing to
> update a certain number of Fields in one of the Tables. The fact is
> not frequent and I have checked through the Server Performance Monitor
> that there is no performance slag of the Server during any point of
> time.
> The Tables are indexed with common Key fields. Can anybody help me in
> this regard ?

There is far too little information to give much useful advice. But
it certainly sounds like an application problem to me. Maybe there is
some bad error handling. Maybe you have a poor transaction scope, so
that the update is carried out partly.

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

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

Friday, February 24, 2012

In(@variable) clause and TABLE datatype variable

Hi this question has been asked several times and some solution has been
provided already. But the one I am facing is with a twist. I need to use the
IN() clause with a variable as its parameter. The variable is a list of comm
a
separated character values all enclosed in pairs of single quotes. I could
have solved this problem by enclosing the final query in a single quote and
running Exec command on it (with the Variable list outside the quotes) but I
also need to use a Table data type variable which raises error when EXEC
command is run.
Followig is the example that may explain well.
I have oversimplified this example and it does things that we would not do
in normal situation
use pubs;
-- declare and set Table variable
declare @.TableVariable TABLE ( col char(4) );
INSERT @.TableVariable
Select pub_id FROM publishers
;
--declare and set CSV single quoted characters list
declare @.ListVariable varchar(100);
set @.ListVariable = ' ''0736'', ''0877'' '; --these pub_ids are in the
publishers table, promise
--the query where the Table variable is used as well as the IN() clause is
used
Select TableVariable.col
From @.TableVariable as TableVariable
Where TableVariable.col IN (@.ListVariable)
-- returns 0 rows
--if we use Exec by replacing the last code section above with as following
declare @.command varchar(2000)
set @.command='
Select TableVariable.col
From @.TableVariable as TableVariable
Where TableVariable.col IN ('+@.ListVariable+')
'
exec (@.command)
--Then we get the error message:
-- Must declare the variable '@.TableVariable'.
Expand AllCollapse All
Manage Your Profile |Legal |Contact Us |MSDN Flash Newsletterhttp://www.sommarskog.se/arrays-in-sql.html
David Portas
SQL Server MVP
--
"Aamir Ghanchi" <AamirGhanchi@.discussions.microsoft.com> wrote in message
news:D82370C5-6E5E-4178-98B8-0017FE88E809@.microsoft.com...
> Hi this question has been asked several times and some solution has been
> provided already. But the one I am facing is with a twist. I need to use
> the
> IN() clause with a variable as its parameter. The variable is a list of
> comma
> separated character values all enclosed in pairs of single quotes. I could
> have solved this problem by enclosing the final query in a single quote
> and
> running Exec command on it (with the Variable list outside the quotes) but
> I
> also need to use a Table data type variable which raises error when EXEC
> command is run.
> Followig is the example that may explain well.
> I have oversimplified this example and it does things that we would not do
> in normal situation
> use pubs;
> -- declare and set Table variable
> declare @.TableVariable TABLE ( col char(4) );
> INSERT @.TableVariable
> Select pub_id FROM publishers
> ;
> --declare and set CSV single quoted characters list
> declare @.ListVariable varchar(100);
> set @.ListVariable = ' ''0736'', ''0877'' '; --these pub_ids are in the
> publishers table, promise
> --the query where the Table variable is used as well as the IN() clause is
> used
> Select TableVariable.col
> From @.TableVariable as TableVariable
> Where TableVariable.col IN (@.ListVariable)
> -- returns 0 rows
> --if we use Exec by replacing the last code section above with as
> following
> declare @.command varchar(2000)
> set @.command='
> Select TableVariable.col
> From @.TableVariable as TableVariable
> Where TableVariable.col IN ('+@.ListVariable+')
> '
> exec (@.command)
> --Then we get the error message:
> -- Must declare the variable '@.TableVariable'.
>
> Expand AllCollapse All
>
> Manage Your Profile |Legal |Contact Us |MSDN Flash Newsletter
>

IN(@variable) clause and Table Data Type variable

Hi this question has been asked several times and some solution has been
provided already. But the one I am facing is with a twist. I need to use the
IN() clause with a variable as its parameter. The variable is a list of comm
a
separated character values all enclosed in pairs of single quotes. I could
have solved this problem by enclosing the final query in a single quote and
running Exec command on it (with the Variable list outside the quotes) but I
also need to use a Table data type variable which raises error when EXEC
command is run.
Followig is the example that may explain well.
I have oversimplified this example and it does things that we would not do
in normal situation
use pubs;
-- declare and set Table variable
declare @.TableVariable TABLE ( col char(4) );
INSERT @.TableVariable
Select pub_id FROM publishers
;
--declare and set CSV single quoted characters list
declare @.ListVariable varchar(100);
set @.ListVariable = ' ''0736'', ''0877'' '; --these pub_ids are in the
publishers table, promise
--the query where the Table variable is used as well as the IN() clause is
used
Select TableVariable.col
From @.TableVariable as TableVariable
Where TableVariable.col IN (@.ListVariable)
-- returns 0 rows
--if we use Exec by replacing the last code section above with as following
declare @.command varchar(2000)
set @.command='
Select TableVariable.col
From @.TableVariable as TableVariable
Where TableVariable.col IN ('+@.ListVariable+')
'
exec (@.command)
--Then we get the error message:
-- Must declare the variable '@.TableVariable'.
Expand AllCollapse All
Manage Your Profile |Legal |Contact Us |MSDN Flash NewsletterI'd suggest using something like this. in (select id from tablname)
in your dynamic SQL example don't use the variable.
Set @.command = ' Select TableVariable.col
>From @.TableVariable as TableVariable
Where TableVariable.col IN ('
loop on list
select @.command = @.command + each number
End
select @.command = @.command + ')'
exec (@.command)|||Use a temp table instead.
David Gugick
Imceda Software
www.imceda.com|||http://www.sommarskog.se/arrays-in-sql.html
David Portas
SQL Server MVP
--
"Aamir Ghanchi" <AamirGhanchi@.discussions.microsoft.com> wrote in message
news:EAE233F0-A1C4-4CEF-9F72-8EB4EB4884E2@.microsoft.com...
> Hi this question has been asked several times and some solution has been
> provided already. But the one I am facing is with a twist. I need to use
> the
> IN() clause with a variable as its parameter. The variable is a list of
> comma
> separated character values all enclosed in pairs of single quotes. I could
> have solved this problem by enclosing the final query in a single quote
> and
> running Exec command on it (with the Variable list outside the quotes) but
> I
> also need to use a Table data type variable which raises error when EXEC
> command is run.
> Followig is the example that may explain well.
> I have oversimplified this example and it does things that we would not do
> in normal situation
> use pubs;
> -- declare and set Table variable
> declare @.TableVariable TABLE ( col char(4) );
> INSERT @.TableVariable
> Select pub_id FROM publishers
> ;
> --declare and set CSV single quoted characters list
> declare @.ListVariable varchar(100);
> set @.ListVariable = ' ''0736'', ''0877'' '; --these pub_ids are in the
> publishers table, promise
> --the query where the Table variable is used as well as the IN() clause is
> used
> Select TableVariable.col
> From @.TableVariable as TableVariable
> Where TableVariable.col IN (@.ListVariable)
> -- returns 0 rows
> --if we use Exec by replacing the last code section above with as
> following
> declare @.command varchar(2000)
> set @.command='
> Select TableVariable.col
> From @.TableVariable as TableVariable
> Where TableVariable.col IN ('+@.ListVariable+')
> '
> exec (@.command)
> --Then we get the error message:
> -- Must declare the variable '@.TableVariable'.
>
> Expand AllCollapse All
>
> Manage Your Profile |Legal |Contact Us |MSDN Flash Newsletter
>|||On Mon, 7 Feb 2005 14:31:03 -0800, Aamir Ghanchi wrote:
(snip)
I have already answered this question in .server, even before you posted
it (twice!) to this group. Please don't multi-post.
Best, Hugo
--
(Remove _NO_ and _SPAM_ to get my e-mail address)|||Good thought. and this is what I did initially. but my IN() clause is
enclosed within the aggregate function SUM and subquery is not allowed in it
.
Thanks though.
"Paul Moore" wrote:

> I'd suggest using something like this. in (select id from tablname)
>
> in your dynamic SQL example don't use the variable.
> Set @.command = ' Select TableVariable.col
> Where TableVariable.col IN ('
> loop on list
> select @.command = @.command + each number
> End
> select @.command = @.command + ')'
> exec (@.command)
>|||slow though, but I guess thats the only viable option I am left with.
Thank you.
"David Gugick" wrote:

> Use a temp table instead.
> --
> David Gugick
> Imceda Software
> www.imceda.com
>|||I understand. I just started using MSDN website for posting messages since
the new Google Groups interface eats up all the indentation on code snippets
.
Bad thing, I can't crosspost through MSDN site :(
thanks.
"Hugo Kornelis" wrote:

> On Mon, 7 Feb 2005 14:31:03 -0800, Aamir Ghanchi wrote:
> (snip)
> I have already answered this question in .server, even before you posted
> it (twice!) to this group. Please don't multi-post.
> Best, Hugo
> --
> (Remove _NO_ and _SPAM_ to get my e-mail address)
>|||>> but my IN() clause is enclosed within the aggregate function SUM
and subquery is not allowed in it. <<
What did you think that the arithmetic sum of a logical expression
would be anyway? Think about it for two seconds.

IN(@ListVariable) and TABLE Data Type

Hi this question has been asked several times and some solution has been
provided already. But the one I am facing is with a twist. I need to use the
IN() clause with a variable as its parameter. The variable is a list of comma
separated character values all enclosed in pairs of single quotes. I could
have solved this problem by enclosing the final query in a single quote and
running Exec command on it (with the Variable list outside the quotes) but I
also need to use a Table data type variable which raises error when EXEC
command is run.
Followig is the example that may explain well.
I have oversimplified this example and it does things that we would not do
in normal situation
use pubs;
-- declare and set Table variable
declare @.TableVariable TABLE ( col char(4) );
INSERT @.TableVariable
Select pub_id FROM publishers
;
--declare and set CSV single quoted characters list
declare @.ListVariable varchar(100);
set @.ListVariable = ' ''0736'', ''0877'' '; --these pub_ids are in the
publishers table, promise
--the query where the Table variable is used as well as the IN() clause is
used
Select TableVariable.col
From @.TableVariable as TableVariable
Where TableVariable.col IN (@.ListVariable)
-- returns 0 rows
--if we use Exec by replacing the last code section above with as following
declare @.command varchar(2000)
set @.command='
Select TableVariable.col
From @.TableVariable as TableVariable
Where TableVariable.col IN ('+@.ListVariable+')
'
exec (@.command)
--Then we get the error message:
-- Must declare the variable '@.TableVariable'.
On Mon, 7 Feb 2005 13:27:06 -0800, "aamirghanchi@.yahoo.com"
<aamirghanchi@.yahoo.com@.discussions.microsoft.com> wrote:

> I need to use the
>IN() clause with a variable as its parameter. The variable is a list of comma
>separated character values all enclosed in pairs of single quotes. I could
>have solved this problem by enclosing the final query in a single quote and
>running Exec command on it (with the Variable list outside the quotes) but I
>also need to use a Table data type variable which raises error when EXEC
>command is run.
Hi aamirqhanchi,
http://www.sommarskog.se/arrays-in-sql.html
Best, Hugo
(Remove _NO_ and _SPAM_ to get my e-mail address)

IN(@ListVariable) and TABLE Data Type

Hi this question has been asked several times and some solution has been
provided already. But the one I am facing is with a twist. I need to use the
IN() clause with a variable as its parameter. The variable is a list of comm
a
separated character values all enclosed in pairs of single quotes. I could
have solved this problem by enclosing the final query in a single quote and
running Exec command on it (with the Variable list outside the quotes) but I
also need to use a Table data type variable which raises error when EXEC
command is run.
Followig is the example that may explain well.
I have oversimplified this example and it does things that we would not do
in normal situation
use pubs;
-- declare and set Table variable
declare @.TableVariable TABLE ( col char(4) );
INSERT @.TableVariable
Select pub_id FROM publishers
;
--declare and set CSV single quoted characters list
declare @.ListVariable varchar(100);
set @.ListVariable = ' ''0736'', ''0877'' '; --these pub_ids are in the
publishers table, promise
--the query where the Table variable is used as well as the IN() clause is
used
Select TableVariable.col
From @.TableVariable as TableVariable
Where TableVariable.col IN (@.ListVariable)
-- returns 0 rows
--if we use Exec by replacing the last code section above with as following
declare @.command varchar(2000)
set @.command='
Select TableVariable.col
From @.TableVariable as TableVariable
Where TableVariable.col IN ('+@.ListVariable+')
'
exec (@.command)
--Then we get the error message:
-- Must declare the variable '@.TableVariable'.On Mon, 7 Feb 2005 13:27:06 -0800, "aamirghanchi@.yahoo.com"
<aamirghanchi@.yahoo.com@.discussions.microsoft.com> wrote:

> I need to use the
>IN() clause with a variable as its parameter. The variable is a list of com
ma
>separated character values all enclosed in pairs of single quotes. I could
>have solved this problem by enclosing the final query in a single quote and
>running Exec command on it (with the Variable list outside the quotes) but
I
>also need to use a Table data type variable which raises error when EXEC
>command is run.
Hi aamirqhanchi,
http://www.sommarskog.se/arrays-in-sql.html
Best, Hugo
--
(Remove _NO_ and _SPAM_ to get my e-mail address)

IN(@ListVariable) and TABLE Data Type

Hi this question has been asked several times and some solution has been
provided already. But the one I am facing is with a twist. I need to use the
IN() clause with a variable as its parameter. The variable is a list of comma
separated character values all enclosed in pairs of single quotes. I could
have solved this problem by enclosing the final query in a single quote and
running Exec command on it (with the Variable list outside the quotes) but I
also need to use a Table data type variable which raises error when EXEC
command is run.
Followig is the example that may explain well.
I have oversimplified this example and it does things that we would not do
in normal situation
use pubs;
-- declare and set Table variable
declare @.TableVariable TABLE ( col char(4) );
INSERT @.TableVariable
Select pub_id FROM publishers
;
--declare and set CSV single quoted characters list
declare @.ListVariable varchar(100);
set @.ListVariable = ' ''0736'', ''0877'' '; --these pub_ids are in the
publishers table, promise
--the query where the Table variable is used as well as the IN() clause is
used
Select TableVariable.col
From @.TableVariable as TableVariable
Where TableVariable.col IN (@.ListVariable)
-- returns 0 rows
--if we use Exec by replacing the last code section above with as following
declare @.command varchar(2000)
set @.command='
Select TableVariable.col
From @.TableVariable as TableVariable
Where TableVariable.col IN ('+@.ListVariable+')
'
exec (@.command)
--Then we get the error message:
-- Must declare the variable '@.TableVariable'.On Mon, 7 Feb 2005 13:27:06 -0800, "aamirghanchi@.yahoo.com"
<aamirghanchi@.yahoo.com@.discussions.microsoft.com> wrote:
> I need to use the
>IN() clause with a variable as its parameter. The variable is a list of comma
>separated character values all enclosed in pairs of single quotes. I could
>have solved this problem by enclosing the final query in a single quote and
>running Exec command on it (with the Variable list outside the quotes) but I
>also need to use a Table data type variable which raises error when EXEC
>command is run.
Hi aamirqhanchi,
http://www.sommarskog.se/arrays-in-sql.html
Best, Hugo
--
(Remove _NO_ and _SPAM_ to get my e-mail address)