I have already posted this but have not received an answer.
Hi there,
I have set the proxy user details using
xp_sqlagent_proxy_account 'set' and the command completes successfully, so
the logon details are correct. I have also logged onto the server using
those details just to make sure and that works OK. However, when I fire a
trigger that is making a call to xp_cmd_shell, I get the message "Logon
failure: unknown user name or bad password" Anyone know what the issue is
here?
This is SQL Server 2000 SP3 on Windows 2000 SP4.Try resetting the proxy account using the user and password
you can log in with - the easiest way to reset is to select
the properties of SQL Server Agent, on the Job Control tab,
click on Reset Proxy Account.
-Sue
On Wed, 27 Jul 2005 15:17:40 +0100, "Waldy"
<waldy@.notmail.com> wrote:
>I have already posted this but have not received an answer.
>Hi there,
> I have set the proxy user details using
>xp_sqlagent_proxy_account 'set' and the command completes successfully, so
>the logon details are correct. I have also logged onto the server using
>those details just to make sure and that works OK. However, when I fire a
>trigger that is making a call to xp_cmd_shell, I get the message "Logon
>failure: unknown user name or bad password" Anyone know what the issue is
>here?
>This is SQL Server 2000 SP3 on Windows 2000 SP4.
>
Showing posts with label details. Show all posts
Showing posts with label details. Show all posts
Wednesday, March 28, 2012
Friday, March 23, 2012
is this possible
hey all,
what's the best way to get all the records in a master table and a sum of a
column in a related details table?
thanks,
rodcharThe best way is to post DDL and sample data (
http://www.aspfaq.com/etiquette.asp?id=5006 )
But...
SELECT Master.PKCol, SUM(Detail.SomeCol) SumSomeCol
FROM Master
JOIN Detail ON Master.PKCol = Detail.PKCol
GROUP BY Master.PKCol
Adam Machanic
SQL Server MVP
http://www.datamanipulation.net
--
"rodchar" <rodchar@.discussions.microsoft.com> wrote in message
news:D309581C-EBC3-4AA9-A5BC-91AEA5FE88FF@.microsoft.com...
> hey all,
> what's the best way to get all the records in a master table and a sum of
a
> column in a related details table?
> thanks,
> rodchar|||without seeing the ddl, this is a guess.
select m.id,sum(c.col)
from master m left join child c on m.id=c.fk
group by m.id
-oj
"rodchar" <rodchar@.discussions.microsoft.com> wrote in message
news:D309581C-EBC3-4AA9-A5BC-91AEA5FE88FF@.microsoft.com...
> hey all,
> what's the best way to get all the records in a master table and a sum of
> a
> column in a related details table?
> thanks,
> rodchar|||Well...you query it for the things you need and sum the column that gives yo
u
the answer. Once you have it, it will be obvious how it should be assemble t
o
get those things you need.
Vagueness begets vague answers. Post DDL
Thomas
"rodchar" <rodchar@.discussions.microsoft.com> wrote in message
news:D309581C-EBC3-4AA9-A5BC-91AEA5FE88FF@.microsoft.com...
> hey all,
> what's the best way to get all the records in a master table and a sum of
a
> column in a related details table?
> thanks,
> rodchar|||SELECT <col_list_from_master_table>,
(SELECT SUM(<col_name> )
FROM details_table AS D
WHERE D.referencing_col = M.referenced_col) AS sumdetail
FROM master_table AS M
BG, SQL Server MVP
www.SolidQualityLearning.com
"rodchar" <rodchar@.discussions.microsoft.com> wrote in message
news:D309581C-EBC3-4AA9-A5BC-91AEA5FE88FF@.microsoft.com...
> hey all,
> what's the best way to get all the records in a master table and a sum of
> a
> column in a related details table?
> thanks,
> rodchar
what's the best way to get all the records in a master table and a sum of a
column in a related details table?
thanks,
rodcharThe best way is to post DDL and sample data (
http://www.aspfaq.com/etiquette.asp?id=5006 )
But...
SELECT Master.PKCol, SUM(Detail.SomeCol) SumSomeCol
FROM Master
JOIN Detail ON Master.PKCol = Detail.PKCol
GROUP BY Master.PKCol
Adam Machanic
SQL Server MVP
http://www.datamanipulation.net
--
"rodchar" <rodchar@.discussions.microsoft.com> wrote in message
news:D309581C-EBC3-4AA9-A5BC-91AEA5FE88FF@.microsoft.com...
> hey all,
> what's the best way to get all the records in a master table and a sum of
a
> column in a related details table?
> thanks,
> rodchar|||without seeing the ddl, this is a guess.
select m.id,sum(c.col)
from master m left join child c on m.id=c.fk
group by m.id
-oj
"rodchar" <rodchar@.discussions.microsoft.com> wrote in message
news:D309581C-EBC3-4AA9-A5BC-91AEA5FE88FF@.microsoft.com...
> hey all,
> what's the best way to get all the records in a master table and a sum of
> a
> column in a related details table?
> thanks,
> rodchar|||Well...you query it for the things you need and sum the column that gives yo
u
the answer. Once you have it, it will be obvious how it should be assemble t
o
get those things you need.
Vagueness begets vague answers. Post DDL
Thomas
"rodchar" <rodchar@.discussions.microsoft.com> wrote in message
news:D309581C-EBC3-4AA9-A5BC-91AEA5FE88FF@.microsoft.com...
> hey all,
> what's the best way to get all the records in a master table and a sum of
a
> column in a related details table?
> thanks,
> rodchar|||SELECT <col_list_from_master_table>,
(SELECT SUM(<col_name> )
FROM details_table AS D
WHERE D.referencing_col = M.referenced_col) AS sumdetail
FROM master_table AS M
BG, SQL Server MVP
www.SolidQualityLearning.com
"rodchar" <rodchar@.discussions.microsoft.com> wrote in message
news:D309581C-EBC3-4AA9-A5BC-91AEA5FE88FF@.microsoft.com...
> hey all,
> what's the best way to get all the records in a master table and a sum of
> a
> column in a related details table?
> thanks,
> rodchar
Wednesday, March 21, 2012
Is this Correct database design
HI all,
I have a claims database, which has a header table, details table and
otherinfo table. The header table will contain claim header info, ie
claimnumber date of loss etc., the details would contain claim detail, as
details of loss, damage ammounts, etc, the otherinfo contains information
not common to all classes of claims, so I would have a motor table
conmtaining driver, motor type model etc, GPA, would contain empoyee name,
earnings medical etc.
Now this is just in pricipal, hence no ddl, but anyway, some one suggested
that for the otherinfo table I create a descriptor table that will enable us
to add numerous columns for this "otherinfo" information at will
his quote is:
"descriptor table that can hold the field names, the data type, an input
string regular expression, and a bit field for required or not. Field Start
Date, and Field End Date. Fields can then be added and removed at will"
Whyle this might sound good, my gut says its a bad idea, for starters, it
could be a nightmare trying to create stable reports, etc.
Any other thought here or suggestions
Thanks
RobertYour gut feeling is correct; this is generally a bad idea. SQL
databases should be used for strongly-typed and stable schemas; in
other words, the designer should know what the information is going to
look like before you develop it. Trying to dynamically construct
tables from columns and column values added at will is a performance
nightmare. If a column is needed for reporting purposes (or some other
application purpose) then alter your design.
That being said, there are other database engines that MAY do what you
require, such as object-oriented databases; I've never worked with
them, so I don't know for sure. Yo may also explore other options for
holding miscellaneous information (such as the xml datatype in SQL
2005). However, what your friend is suggesting is NOT a relational
design, and therfore should not be used in an RDBMS solution.
HTH,
Stusql
I have a claims database, which has a header table, details table and
otherinfo table. The header table will contain claim header info, ie
claimnumber date of loss etc., the details would contain claim detail, as
details of loss, damage ammounts, etc, the otherinfo contains information
not common to all classes of claims, so I would have a motor table
conmtaining driver, motor type model etc, GPA, would contain empoyee name,
earnings medical etc.
Now this is just in pricipal, hence no ddl, but anyway, some one suggested
that for the otherinfo table I create a descriptor table that will enable us
to add numerous columns for this "otherinfo" information at will
his quote is:
"descriptor table that can hold the field names, the data type, an input
string regular expression, and a bit field for required or not. Field Start
Date, and Field End Date. Fields can then be added and removed at will"
Whyle this might sound good, my gut says its a bad idea, for starters, it
could be a nightmare trying to create stable reports, etc.
Any other thought here or suggestions
Thanks
RobertYour gut feeling is correct; this is generally a bad idea. SQL
databases should be used for strongly-typed and stable schemas; in
other words, the designer should know what the information is going to
look like before you develop it. Trying to dynamically construct
tables from columns and column values added at will is a performance
nightmare. If a column is needed for reporting purposes (or some other
application purpose) then alter your design.
That being said, there are other database engines that MAY do what you
require, such as object-oriented databases; I've never worked with
them, so I don't know for sure. Yo may also explore other options for
holding miscellaneous information (such as the xml datatype in SQL
2005). However, what your friend is suggesting is NOT a relational
design, and therfore should not be used in an RDBMS solution.
HTH,
Stusql
Subscribe to:
Posts (Atom)