Job '<job name>' : Step <step number>, '<step name>' :
Began Executing <date time>
Is it possible to suppress this message? Perusing the msdb
stored procedure sp_start_job, one finds:
1) An input parameter
@output_flag INT = 1 -- Set to 0 to
-- suppress the success message
2) A conditional statement relating to the above
IF ((@retval = 0) AND (@output_flag = 1))
RAISERROR(14243, 0, 1, @job_name)
However, error message 14243 is 'Job '%s' started
successfully', not the message that appears at the
beginning of a Job Step output file. Therefore, is one
correct in presuming that passing the @output_flag
parameter as 0 to sp_start_job will not suppress the first
message line in the output file? If so, is there some way
of accomplishing this objective?
Thanks for any help.
- jps
The message:
'Job '<job name>' : Step <step number>, '<step name>' : Began Executing
<date time>'
cannot be suppressed.
Any reason you would like to suppress it?
--
Michiel Wories, SQL Server PM
This posting is provided "AS IS" with no warranties, and confers no rights.
---
"jps" <jyoti.s...@hp.com> wrote in message
news:148c101c2277c$dd9ae8a0$2ae2...@hosting.microsoft.com...
--
Keith, SQL Server MVP
"jps" <jyoti.s...@hp.com> wrote in message
news:148c101c2277c$dd9ae8a0$2ae2...@hosting.microsoft.com...
We explored the use of isql to achieve this objective, but
it appears that this command-line utility cannot handle
the ... FOR XML EXPLICIT construct.
- jps
>.
>
bcp "select * from Northwind.dbo.Customers as Customer for xml auto"
queryout c:\customer.xml -T -c
If your other program can cope with an XML fragment then you're ok,
otherwise you can merge the root tags using the dos copy command or
whatever e.g.
copy /Y /B toproot.txt+customer.xml+endroot.txt customer2.xml
del /Q customer.xml
HTH
Jasper Smith
"jps" <jyoti.s...@hp.com> wrote in message
news:16ac301c2278a$f7195d80$9be62ecf@tkmsftngxa03...
--
Michiel Wories, SQL Server PM
This posting is provided "AS IS" with no warranties, and confers no rights.
---
"jps" <jyoti.s...@hp.com> wrote in message
news:16ac301c2278a$f7195d80$9be62ecf@tkmsftngxa03...
I haven't tried osql yet, but will do so since I now
understand that it is a (more advanced) replacement for
isql that may well handle the recent Transact-SQL
enhancements. The stored procedure that I ran using isql
generated an error when that procedure included a
SELECT ... FOR XML EXPLICIT query. However, when I
commented out that statement out it ran OK. More details
later.
- jps
>.
>
Below is an extract from BOL which explicitly states that
isql cannot retrieve results as XML documents. So the
error we got with isql trying to execute a stored
procedure that contained a SELECT ... FOR XML EXPLICIT
query was predictable. Will try osql now.
- jps
Extract from Books-On-Line:
-----------------------------------------------------------
The osql utility uses the ODBC database application
programming interface (API). It is a replacement for the
isql command prompt utility based on the DB-Library API.
Both utilities are provided with Microsoft SQL ServerT
2000. The DB-Library API remains at a SQL Server 6.5
level; therefore, applications that depend on DB-Library,
such as isql, do not support some SQL Server 2000
features. For example, isql cannot access columns defined
with the ntext data type and truncates any char, varchar,
nchar, or nvarchar columns longer than 255 bytes. It also
cannot retrieve results as XML documents. Except for these
limitations in isql, both osql and isql support the same
features.
-----------------------------------------------------------
>.
>
--
Michiel Wories, SQL Server PM
This posting is provided "AS IS" with no warranties, and confers no rights.
---
"jps" <jyoti.s...@hp.com> wrote in message
news:16ddf01c22841$4a117ac0$9ae62ecf@tkmsftngxa02...