Showing posts with label particular. Show all posts
Showing posts with label particular. Show all posts

Tuesday, March 20, 2012

Cant see hostname in sysprocesses

Why is it that a particular application does not show its hostname in
sysprocesses ? Its hard for us to troubleshoot since we cant see the
hostname.
What part within the application should i look in that ensures the hostname
would be displayed ?
ThanksIt is part of the information passed by the host application to sql server in
the connection string. Some applications set it, others do not.
SqlConnection.ConnectionString Property (System.Data.SqlClient)
http://msdn2.microsoft.com/library/f28szy5b(en-us,vs.80).aspx
AMB
"Hassan" wrote:
> Why is it that a particular application does not show its hostname in
> sysprocesses ? Its hard for us to troubleshoot since we cant see the
> hostname.
> What part within the application should i look in that ensures the hostname
> would be displayed ?
> Thanks
>
>sql

Cant see hostname in sysprocesses

Why is it that a particular application does not show its hostname in
sysprocesses ? Its hard for us to troubleshoot since we cant see the
hostname.
What part within the application should i look in that ensures the hostname
would be displayed ?
ThanksIt is part of the information passed by the host application to sql server i
n
the connection string. Some applications set it, others do not.
SqlConnection.ConnectionString Property (System.Data.SqlClient)
http://msdn2.microsoft.com/library/f28szy5b(en-us,vs.80).aspx
AMB
"Hassan" wrote:

> Why is it that a particular application does not show its hostname in
> sysprocesses ? Its hard for us to troubleshoot since we cant see the
> hostname.
> What part within the application should i look in that ensures the hostnam
e
> would be displayed ?
> Thanks
>
>

Cant see hostname in sysprocesses

Why is it that a particular application does not show its hostname in
sysprocesses ? Its hard for us to troubleshoot since we cant see the
hostname.
What part within the application should i look in that ensures the hostname
would be displayed ?
Thanks
It is part of the information passed by the host application to sql server in
the connection string. Some applications set it, others do not.
SqlConnection.ConnectionString Property (System.Data.SqlClient)
http://msdn2.microsoft.com/library/f28szy5b(en-us,vs.80).aspx
AMB
"Hassan" wrote:

> Why is it that a particular application does not show its hostname in
> sysprocesses ? Its hard for us to troubleshoot since we cant see the
> hostname.
> What part within the application should i look in that ensures the hostname
> would be displayed ?
> Thanks
>
>

Monday, March 19, 2012

Can't see a particular table in a database

Hello,
I am trying to get info from a SQL7 database via ODBC. I can connect and
view the vast majority of tables, but one particular table (ceninfo_data)
does not appear.
In SQL Enterprise manager, I have taken a look at the permissions on the
table and public can select from it.
What am I missing?
Cheers
CQMMAN
"See, free nations are peaceful nations. Free nations don't attack each
other. Free nations don't develop weapons of mass destruction." George W
Bush -Milwaukee, Wis., Oct. 3, 2003Doh!
Fixed it. I was replicating a database and had changed the permissions on
the original, but not on the replicated database.
Cheers
"CQMMAN" <cqmman@.yahoo.co.uk> wrote in message
news:bq2jmp$1uhsi3$1@.ID-215193.news.uni-berlin.de...
quote:

> Hello,
> I am trying to get info from a SQL7 database via ODBC. I can connect and
> view the vast majority of tables, but one particular table (ceninfo_data)
> does not appear.
> In SQL Enterprise manager, I have taken a look at the permissions on the
> table and public can select from it.
> What am I missing?
> Cheers
> CQMMAN
> "See, free nations are peaceful nations. Free nations don't attack each
> other. Free nations don't develop weapons of mass destruction." George W
> Bush -Milwaukee, Wis., Oct. 3, 2003
>

Saturday, February 25, 2012

Cant order by text values?

Hi,

I've got the following code that pulls out forum topics that have been added to on a particular day:

SELECT
forum_posts.post_date
, forum_threads.id
, forum_threads.subject
FROM forum_threads INNER JOIN forum_posts
ON forum_posts.thread_id = forum_threads.id
WHERE day(post_date)=day(getdate())
AND month(post_date)=month(getdate())
AND year(post_date)=year(getdate())
GROUP BY forum_threads.id
,forum_threads.subject
,forum_posts.post_date
ORDER BY forum_threads.id ASC, forum_posts.post_date ASC

I tried including the body of the post in this:

SELECT
forum_posts.post_date
, forum_posts.body
, forum_threads.id
, forum_threads.subject
FROM forum_threads INNER JOIN forum_posts
ON forum_posts.thread_id = forum_threads.id
WHERE day(post_date)=day(getdate())
AND month(post_date)=month(getdate())
AND year(post_date)=year(getdate())
GROUP BY forum_threads.id
,forum_threads.subject
,forum_posts.post_date
,forum_posts.body
ORDER BY forum_threads.id ASC, forum_posts.post_date ASC

But was told that "The text, ntext, and image data types cannot be compared or sorted, except when using IS NULL or LIKE operator."

Well, the body field is text datatype alright, but how do I therefore include it in the results?The GROUP BY is what it is complaining about. Why is that there?

Originally posted by Spudhead
Hi,

I've got the following code that pulls out forum topics that have been added to on a particular day:

SELECT
forum_posts.post_date
, forum_threads.id
, forum_threads.subject
FROM forum_threads INNER JOIN forum_posts
ON forum_posts.thread_id = forum_threads.id
WHERE day(post_date)=day(getdate())
AND month(post_date)=month(getdate())
AND year(post_date)=year(getdate())
GROUP BY forum_threads.id
,forum_threads.subject
,forum_posts.post_date
ORDER BY forum_threads.id ASC, forum_posts.post_date ASC

I tried including the body of the post in this:

SELECT
forum_posts.post_date
, forum_posts.body
, forum_threads.id
, forum_threads.subject
FROM forum_threads INNER JOIN forum_posts
ON forum_posts.thread_id = forum_threads.id
WHERE day(post_date)=day(getdate())
AND month(post_date)=month(getdate())
AND year(post_date)=year(getdate())
GROUP BY forum_threads.id
,forum_threads.subject
,forum_posts.post_date
,forum_posts.body
ORDER BY forum_threads.id ASC, forum_posts.post_date ASC

But was told that "The text, ntext, and image data types cannot be compared or sorted, except when using IS NULL or LIKE operator."

Well, the body field is text datatype alright, but how do I therefore include it in the results?|||Because I'm a muppet.

Thanks :)|||Make this...

SELECT
forum_threads.id
,forum_threads.subject
,forum_posts.post_date
FROM forum_threads INNER JOIN forum_posts
ON forum_posts.thread_id = forum_threads.id
GROUP BY forum_threads.id
,forum_threads.subject
,forum_posts.post_date
HAVING day(post_date)=day(getdate())
AND month(post_date)=month(getdate())
AND year(post_date)=year(getdate())
ORDER BY forum_threads.id, forum_posts.post_date

...the option ASC is default;
...use the command Having.