Hi All,
I have installed SQL Server 2005 and created a job. I made the job failed to test the mailsend program. The notification step that uses the mailsend succeeded but I did not get an email. I am using mailsend program on SQL Server 2000 and it works fine. I am really stomped and don't know what to do to fix it?
Thanks.what are you using to send mail? xp_sendmail? xp_smtpmail? CDOSYS? CDONTS?
I feel stomped everyday.|||I am using xp_sendmail.|||have you...
installed outlook on your DB server?
is the agent using a network account mapped to an exhange mail profile?
have you tested sending mail directly from the mail client?
have you started a sql mail client session with xp_startmail?|||Yes, Outlook Express
How can I check it? Our network guys set up the server
Yes and it was successfull
I have read in BOL that this feature will be removed in a future version of Microsoft SQL Server.|||Have you opened the "Surface Area Configuration" tool and looked under feature configuration to enable SQL Mail?
BTW ... Database Mail is the preferred method with 2005.|||I'll try Database Mail option|||Database Mail is MUCH better. It takes a bit of configuration, but it's really nice.
hmscott|||On SQL Server 2005 use sp_senddbmail. It sends mail using SMTP and uses service broker for queuing mails to be sent. No need for Outlook on the server anymore, and the mail sending process is 100% asyncronous.
Showing posts with label program. Show all posts
Showing posts with label program. Show all posts
Friday, March 9, 2012
Saturday, February 25, 2012
macro substitution or command @var
In VFP we can use in the program the variable
var ='some_statement'
var && here will be 'some_statement'
&var && here will be some_statement
In SQL Server if we have :
declare @.var varchar(8000)
set @.var='some_statement'
In the program
@.var --here will be 'some_statement'
But if we want to use the variable @.var the same way as in the second
variant what we should do ?Can you give an example of 'some_statement'?
If that's a T-SQL statement lookup EXECUTE and sp_executesql in Books Online
.
However, we can provide a more appropriate solution if you share some more
information. You can start by explaining what exactly you are trying to do.
ML|||Why do you want to use dynamic code? When I worked on VFP our
development standards only permitted macro substitution in very
exceptional cases - and rightly so. Dynamic code is hard to test, debug
and maintain and in my experience its use in production code is usually
the result of poor design or laziness.
Dynamic SQL does have certain "legitimate" uses for DBA type tasks, and
for those we have the EXEC and sp_executesql statements.
David Portas
SQL Server MVP
--|||Thank you.
"ML" wrote:
> Can you give an example of 'some_statement'?
> If that's a T-SQL statement lookup EXECUTE and sp_executesql in Books Onli
ne.
> However, we can provide a more appropriate solution if you share some more
> information. You can start by explaining what exactly you are trying to do
.
>
> ML|||Thank you.
"David Portas" wrote:
> Why do you want to use dynamic code? When I worked on VFP our
> development standards only permitted macro substitution in very
> exceptional cases - and rightly so. Dynamic code is hard to test, debug
> and maintain and in my experience its use in production code is usually
> the result of poor design or laziness.
> Dynamic SQL does have certain "legitimate" uses for DBA type tasks, and
> for those we have the EXEC and sp_executesql statements.
> --
> David Portas
> SQL Server MVP
> --
>
var ='some_statement'
var && here will be 'some_statement'
&var && here will be some_statement
In SQL Server if we have :
declare @.var varchar(8000)
set @.var='some_statement'
In the program
@.var --here will be 'some_statement'
But if we want to use the variable @.var the same way as in the second
variant what we should do ?Can you give an example of 'some_statement'?
If that's a T-SQL statement lookup EXECUTE and sp_executesql in Books Online
.
However, we can provide a more appropriate solution if you share some more
information. You can start by explaining what exactly you are trying to do.
ML|||Why do you want to use dynamic code? When I worked on VFP our
development standards only permitted macro substitution in very
exceptional cases - and rightly so. Dynamic code is hard to test, debug
and maintain and in my experience its use in production code is usually
the result of poor design or laziness.
Dynamic SQL does have certain "legitimate" uses for DBA type tasks, and
for those we have the EXEC and sp_executesql statements.
David Portas
SQL Server MVP
--|||Thank you.
"ML" wrote:
> Can you give an example of 'some_statement'?
> If that's a T-SQL statement lookup EXECUTE and sp_executesql in Books Onli
ne.
> However, we can provide a more appropriate solution if you share some more
> information. You can start by explaining what exactly you are trying to do
.
>
> ML|||Thank you.
"David Portas" wrote:
> Why do you want to use dynamic code? When I worked on VFP our
> development standards only permitted macro substitution in very
> exceptional cases - and rightly so. Dynamic code is hard to test, debug
> and maintain and in my experience its use in production code is usually
> the result of poor design or laziness.
> Dynamic SQL does have certain "legitimate" uses for DBA type tasks, and
> for those we have the EXEC and sp_executesql statements.
> --
> David Portas
> SQL Server MVP
> --
>
Labels:
command,
database,
macro,
microsoft,
mysql,
ome_statement,
oracle,
program,
server,
sql,
substitution,
var,
variablevar,
vfp
Subscribe to:
Posts (Atom)