Wednesday, March 28, 2012
Outlook
Can you point me to where I can look for more info to complete this task.
There is a proprietary app running with SQL 2000 as backend. Everynight the
app put DB in single user mode and runs DBCC itself to check data. That
runs well except few times it failed to get exclusive login in order to
clear single user mode. It causes the app fails to open. I think I may
want to run a script at my computer querying the DB and notify someone by
using Outlook on my computer. Is there any info that can tell me how to
open Outlook from in inside sql script?
Thanks,Hi,
try to use xp_sendmail. but you don't need the database in
single user to run dbcc checkdb, you only need single user
mode if you use the repair option.
CMLC
>--Original Message--
>Folks,
>Can you point me to where I can look for more info to
complete this task.
>There is a proprietary app running with SQL 2000 as
backend. Everynight the
>app put DB in single user mode and runs DBCC itself to
check data. That
>runs well except few times it failed to get exclusive
login in order to
>clear single user mode. It causes the app fails to
open. I think I may
>want to run a script at my computer querying the DB and
notify someone by
>using Outlook on my computer. Is there any info that can
tell me how to
>open Outlook from in inside sql script?
>Thanks,
>
>.
>|||hi,
to use xp_sendmail we must have SQL mail configured on the SQL box. This is
not my case because I can't touch the box. What I wanted is to use Outlook
on my pc to send email out. Is it possible?
> you don't need the database in single user to run dbcc checkdb, you only
> need single user mode if you use the >repair option
the app is proprietary so ... no touching. It seems that it would repair
data if possible.
"CMLC" <anonymous@.discussions.microsoft.com> wrote in message
news:196d01c4a188$bc87d820$a401280a@.phx.gbl...
> Hi,
> try to use xp_sendmail. but you don't need the database in
> single user to run dbcc checkdb, you only need single user
> mode if you use the repair option.
> CMLC
>
>>--Original Message--
>>Folks,
>>Can you point me to where I can look for more info to
> complete this task.
>>There is a proprietary app running with SQL 2000 as
> backend. Everynight the
>>app put DB in single user mode and runs DBCC itself to
> check data. That
>>runs well except few times it failed to get exclusive
> login in order to
>>clear single user mode. It causes the app fails to
> open. I think I may
>>want to run a script at my computer querying the DB and
> notify someone by
>>using Outlook on my computer. Is there any info that can
> tell me how to
>>open Outlook from in inside sql script?
>>Thanks,
>>
>>.|||Hi,
Thanks for your post.
From your descriptions, I understood that you would like to notify the
logon customer by email but you cannot configure your SQL Profile. Correct
me if I was wrong.
Based on my scope, You can use other methods to send Simple Mail Transfer
Protocol (SMTP) e-mail directly from SQL Server. For example, you can use
Collaboration Data Objects for NT Server (CDONTS) or Collaboration Data
Objects for Windows 2000 (CDOSYS) in combination with the sp_OA SQL Server
OLE Automation stored procedures. See the following documents for more
detailed information
HOW TO: Send E-Mail Without Using SQL Mail in SQL Server
http://support.microsoft.com/?kbid=312839
Secondly, http://www.sqldev.net/ provides a SMTP based SQL Mail solution
for sending MIME based email over SMTP, implemented as an Extended Stored
Procedure.
XPSMTP.DLL - SQL Server SMTP Mail XP
http://www.sqldev.net/xp/xpsmtp.htm
Thank you for your patience and corperation. If you have any questions or
concerns, don't hesitate to let me know. We are here to be of assistance!
Sincerely yours,
Mingqing Cheng
Online Partner Support Specialist
Partner Support Group
Microsoft Global Technical Support Center
---
Introduction to Yukon! - http://www.microsoft.com/sql/yukon
This posting is provided "as is" with no warranties and confers no rights.
Please reply to newsgroups only, many thanks!
This document contains references to a third party World Wide Web site.
Microsoft is providing this information as a convenience to you. Microsoft
does not control these sites and has not tested any software or information
found on these sites; therefore, Microsoft cannot make any representations
regarding the quality, safety, or suitability of any software or
information found there. There are inherent dangers in the use of any
software found on the Internet, and Microsoft cautions you to make sure
that you completely understand the risk before retrieving any software from
the Internet.|||Thank you. It's what I wanted. I was thinking of a much more complicated
Outlook approach.
""Mingqing Cheng [MSFT]"" <v-mingqc@.online.microsoft.com> wrote in message
news:$y5iBpeoEHA.740@.cpmsftngxa06.phx.gbl...
> Hi,
> Thanks for your post.
> From your descriptions, I understood that you would like to notify the
> logon customer by email but you cannot configure your SQL Profile. Correct
> me if I was wrong.
> Based on my scope, You can use other methods to send Simple Mail Transfer
> Protocol (SMTP) e-mail directly from SQL Server. For example, you can use
> Collaboration Data Objects for NT Server (CDONTS) or Collaboration Data
> Objects for Windows 2000 (CDOSYS) in combination with the sp_OA SQL Server
> OLE Automation stored procedures. See the following documents for more
> detailed information
> HOW TO: Send E-Mail Without Using SQL Mail in SQL Server
> http://support.microsoft.com/?kbid=312839
> Secondly, http://www.sqldev.net/ provides a SMTP based SQL Mail solution
> for sending MIME based email over SMTP, implemented as an Extended Stored
> Procedure.
> XPSMTP.DLL - SQL Server SMTP Mail XP
> http://www.sqldev.net/xp/xpsmtp.htm
> Thank you for your patience and corperation. If you have any questions or
> concerns, don't hesitate to let me know. We are here to be of assistance!
>
> Sincerely yours,
> Mingqing Cheng
> Online Partner Support Specialist
> Partner Support Group
> Microsoft Global Technical Support Center
> ---
> Introduction to Yukon! - http://www.microsoft.com/sql/yukon
> This posting is provided "as is" with no warranties and confers no rights.
> Please reply to newsgroups only, many thanks!
> This document contains references to a third party World Wide Web site.
> Microsoft is providing this information as a convenience to you. Microsoft
> does not control these sites and has not tested any software or
> information
> found on these sites; therefore, Microsoft cannot make any representations
> regarding the quality, safety, or suitability of any software or
> information found there. There are inherent dangers in the use of any
> software found on the Internet, and Microsoft cautions you to make sure
> that you completely understand the risk before retrieving any software
> from
> the Internet.
>|||It works great for me. However is there any pros or cons of sending mail
out using CDOSYS such as security?
""Mingqing Cheng [MSFT]"" <v-mingqc@.online.microsoft.com> wrote in message
news:$y5iBpeoEHA.740@.cpmsftngxa06.phx.gbl...
> Hi,
> Thanks for your post.
> From your descriptions, I understood that you would like to notify the
> logon customer by email but you cannot configure your SQL Profile. Correct
> me if I was wrong.
> Based on my scope, You can use other methods to send Simple Mail Transfer
> Protocol (SMTP) e-mail directly from SQL Server. For example, you can use
> Collaboration Data Objects for NT Server (CDONTS) or Collaboration Data
> Objects for Windows 2000 (CDOSYS) in combination with the sp_OA SQL Server
> OLE Automation stored procedures. See the following documents for more
> detailed information
> HOW TO: Send E-Mail Without Using SQL Mail in SQL Server
> http://support.microsoft.com/?kbid=312839
> Secondly, http://www.sqldev.net/ provides a SMTP based SQL Mail solution
> for sending MIME based email over SMTP, implemented as an Extended Stored
> Procedure.
> XPSMTP.DLL - SQL Server SMTP Mail XP
> http://www.sqldev.net/xp/xpsmtp.htm
> Thank you for your patience and corperation. If you have any questions or
> concerns, don't hesitate to let me know. We are here to be of assistance!
>
> Sincerely yours,
> Mingqing Cheng
> Online Partner Support Specialist
> Partner Support Group
> Microsoft Global Technical Support Center
> ---
> Introduction to Yukon! - http://www.microsoft.com/sql/yukon
> This posting is provided "as is" with no warranties and confers no rights.
> Please reply to newsgroups only, many thanks!
> This document contains references to a third party World Wide Web site.
> Microsoft is providing this information as a convenience to you. Microsoft
> does not control these sites and has not tested any software or
> information
> found on these sites; therefore, Microsoft cannot make any representations
> regarding the quality, safety, or suitability of any software or
> information found there. There are inherent dangers in the use of any
> software found on the Internet, and Microsoft cautions you to make sure
> that you completely understand the risk before retrieving any software
> from
> the Internet.
>|||Hi,
It's great to hear that my suggestion is suitable for you.
Collaboration Data Objects (CDO) for Microsoft? Windows? 2000 (Cdosys.dll),
which implements the 2.0 version of the Collaboration Data Objects API
specification, is a Component Object Model (COM) component designed to
simplify writing programs that create or manipulate Internet messages. You
could ask this exchange newsgroup, where I think will be more professional
answers there.
IMO, CDOSYS requires relatively high level of development instead of
xp_sendmail do. I would like to suggest upgrading to the lastest updates,
Windows 2000 SP4 and Office 2000 SP3 (if you had that Office installed).
See the documents below for detailed information about why these updates
are important
OL2000: Information About the CDO E-mail Security Update
http://support.microsoft.com/default.aspx?scid=kb;en-us;268279
OFF2000: How to Update an Administrative Installation with the Outlook CDO
Security Update
http://support.microsoft.com/default.aspx?scid=kb;en-us;268719
Thank you for your patience and corperation. If you have any questions or
concerns, don't hesitate to let me know. We are here to be of assistance!
Sincerely yours,
Mingqing Cheng
Online Partner Support Specialist
Partner Support Group
Microsoft Global Technical Support Center
---
Introduction to Yukon! - http://www.microsoft.com/sql/yukon
This posting is provided "as is" with no warranties and confers no rights.
Please reply to newsgroups only, many thanks!sql
Outlook
Can you point me to where I can look for more info to complete this task.
There is a proprietary app running with SQL 2000 as backend. Everynight the
app put DB in single user mode and runs DBCC itself to check data. That
runs well except few times it failed to get exclusive login in order to
clear single user mode. It causes the app fails to open. I think I may
want to run a script at my computer querying the DB and notify someone by
using Outlook on my computer. Is there any info that can tell me how to
open Outlook from in inside sql script?
Thanks,
Hi,
Thanks for your post.
From your descriptions, I understood that you would like to notify the
logon customer by email but you cannot configure your SQL Profile. Correct
me if I was wrong.
Based on my scope, You can use other methods to send Simple Mail Transfer
Protocol (SMTP) e-mail directly from SQL Server. For example, you can use
Collaboration Data Objects for NT Server (CDONTS) or Collaboration Data
Objects for Windows 2000 (CDOSYS) in combination with the sp_OA SQL Server
OLE Automation stored procedures. See the following documents for more
detailed information
HOW TO: Send E-Mail Without Using SQL Mail in SQL Server
http://support.microsoft.com/?kbid=312839
Secondly, http://www.sqldev.net/ provides a SMTP based SQL Mail solution
for sending MIME based email over SMTP, implemented as an Extended Stored
Procedure.
XPSMTP.DLL - SQL Server SMTP Mail XP
http://www.sqldev.net/xp/xpsmtp.htm
Thank you for your patience and corperation. If you have any questions or
concerns, don't hesitate to let me know. We are here to be of assistance!
Sincerely yours,
Mingqing Cheng
Online Partner Support Specialist
Partner Support Group
Microsoft Global Technical Support Center
Introduction to Yukon! - http://www.microsoft.com/sql/yukon
This posting is provided "as is" with no warranties and confers no rights.
Please reply to newsgroups only, many thanks!
This document contains references to a third party World Wide Web site.
Microsoft is providing this information as a convenience to you. Microsoft
does not control these sites and has not tested any software or information
found on these sites; therefore, Microsoft cannot make any representations
regarding the quality, safety, or suitability of any software or
information found there. There are inherent dangers in the use of any
software found on the Internet, and Microsoft cautions you to make sure
that you completely understand the risk before retrieving any software from
the Internet.
|||Thank you. It's what I wanted. I was thinking of a much more complicated
Outlook approach.
""Mingqing Cheng [MSFT]"" <v-mingqc@.online.microsoft.com> wrote in message
news:$y5iBpeoEHA.740@.cpmsftngxa06.phx.gbl...
> Hi,
> Thanks for your post.
> From your descriptions, I understood that you would like to notify the
> logon customer by email but you cannot configure your SQL Profile. Correct
> me if I was wrong.
> Based on my scope, You can use other methods to send Simple Mail Transfer
> Protocol (SMTP) e-mail directly from SQL Server. For example, you can use
> Collaboration Data Objects for NT Server (CDONTS) or Collaboration Data
> Objects for Windows 2000 (CDOSYS) in combination with the sp_OA SQL Server
> OLE Automation stored procedures. See the following documents for more
> detailed information
> HOW TO: Send E-Mail Without Using SQL Mail in SQL Server
> http://support.microsoft.com/?kbid=312839
> Secondly, http://www.sqldev.net/ provides a SMTP based SQL Mail solution
> for sending MIME based email over SMTP, implemented as an Extended Stored
> Procedure.
> XPSMTP.DLL - SQL Server SMTP Mail XP
> http://www.sqldev.net/xp/xpsmtp.htm
> Thank you for your patience and corperation. If you have any questions or
> concerns, don't hesitate to let me know. We are here to be of assistance!
>
> Sincerely yours,
> Mingqing Cheng
> Online Partner Support Specialist
> Partner Support Group
> Microsoft Global Technical Support Center
> Introduction to Yukon! - http://www.microsoft.com/sql/yukon
> This posting is provided "as is" with no warranties and confers no rights.
> Please reply to newsgroups only, many thanks!
> This document contains references to a third party World Wide Web site.
> Microsoft is providing this information as a convenience to you. Microsoft
> does not control these sites and has not tested any software or
> information
> found on these sites; therefore, Microsoft cannot make any representations
> regarding the quality, safety, or suitability of any software or
> information found there. There are inherent dangers in the use of any
> software found on the Internet, and Microsoft cautions you to make sure
> that you completely understand the risk before retrieving any software
> from
> the Internet.
>
|||It works great for me. However is there any pros or cons of sending mail
out using CDOSYS such as security?
""Mingqing Cheng [MSFT]"" <v-mingqc@.online.microsoft.com> wrote in message
news:$y5iBpeoEHA.740@.cpmsftngxa06.phx.gbl...
> Hi,
> Thanks for your post.
> From your descriptions, I understood that you would like to notify the
> logon customer by email but you cannot configure your SQL Profile. Correct
> me if I was wrong.
> Based on my scope, You can use other methods to send Simple Mail Transfer
> Protocol (SMTP) e-mail directly from SQL Server. For example, you can use
> Collaboration Data Objects for NT Server (CDONTS) or Collaboration Data
> Objects for Windows 2000 (CDOSYS) in combination with the sp_OA SQL Server
> OLE Automation stored procedures. See the following documents for more
> detailed information
> HOW TO: Send E-Mail Without Using SQL Mail in SQL Server
> http://support.microsoft.com/?kbid=312839
> Secondly, http://www.sqldev.net/ provides a SMTP based SQL Mail solution
> for sending MIME based email over SMTP, implemented as an Extended Stored
> Procedure.
> XPSMTP.DLL - SQL Server SMTP Mail XP
> http://www.sqldev.net/xp/xpsmtp.htm
> Thank you for your patience and corperation. If you have any questions or
> concerns, don't hesitate to let me know. We are here to be of assistance!
>
> Sincerely yours,
> Mingqing Cheng
> Online Partner Support Specialist
> Partner Support Group
> Microsoft Global Technical Support Center
> Introduction to Yukon! - http://www.microsoft.com/sql/yukon
> This posting is provided "as is" with no warranties and confers no rights.
> Please reply to newsgroups only, many thanks!
> This document contains references to a third party World Wide Web site.
> Microsoft is providing this information as a convenience to you. Microsoft
> does not control these sites and has not tested any software or
> information
> found on these sites; therefore, Microsoft cannot make any representations
> regarding the quality, safety, or suitability of any software or
> information found there. There are inherent dangers in the use of any
> software found on the Internet, and Microsoft cautions you to make sure
> that you completely understand the risk before retrieving any software
> from
> the Internet.
>
|||Hi,
It's great to hear that my suggestion is suitable for you.
Collaboration Data Objects (CDO) for Microsoft? Windows? 2000 (Cdosys.dll),
which implements the 2.0 version of the Collaboration Data Objects API
specification, is a Component Object Model (COM) component designed to
simplify writing programs that create or manipulate Internet messages. You
could ask this exchange newsgroup, where I think will be more professional
answers there.
IMO, CDOSYS requires relatively high level of development instead of
xp_sendmail do. I would like to suggest upgrading to the lastest updates,
Windows 2000 SP4 and Office 2000 SP3 (if you had that Office installed).
See the documents below for detailed information about why these updates
are important
OL2000: Information About the CDO E-mail Security Update
http://support.microsoft.com/default...b;en-us;268279
OFF2000: How to Update an Administrative Installation with the Outlook CDO
Security Update
http://support.microsoft.com/default...b;en-us;268719
Thank you for your patience and corperation. If you have any questions or
concerns, don't hesitate to let me know. We are here to be of assistance!
Sincerely yours,
Mingqing Cheng
Online Partner Support Specialist
Partner Support Group
Microsoft Global Technical Support Center
Introduction to Yukon! - http://www.microsoft.com/sql/yukon
This posting is provided "as is" with no warranties and confers no rights.
Please reply to newsgroups only, many thanks!
Wednesday, March 21, 2012
Out of memory Exception when Running a package with XML Task
Hi..
I'm running a package that has a XML Task in the control flow. This task tranforms a XML file with a XSLT.
The file is about 2 megs on a daily basis, but at the end of the month there is a full dump of data that makes the file to be around 400 megs. There is where my problem is.
I run this on my 2 GB memory workstation and when the memory gauge on the task manager reaches about 1.5gb the package fails with an "Out of memory exception".
I also run this package on a 8GB Ram server, and same applies.
Is there any way of making this package utilize all the available memory, I even increased the virtual memory to see if that helped my issue, but nothing.
Thanks
Are you running on a 32-bit or 64-bit OS? 32-bit servers are generally limited to about 2 gb of addressable memory, unless you have made some changes to the server configuration.|||I'm running 32-bit... I wasn't aware of that!! I hope my admins knew that and made whatever change (I'm been highly opomistic, givin them the benefit of the doubt).
**UPDATE**
Yes... The server has the "/PAE" switch in the boot.ini, so its configured to use the 8 gigs of memory available to it.
|||Are other things running on the server - for example, the SQL Server relational engine? How much memory is allocated to it?|||I'm looking at the Performance Tab in Task Manager and there is
Total Physical Memory: 8.32 Gigs
Available Physical Mem: 7.12 Gigs
From that 1 gig of memory taken is about 600 Megs devoted to System Cache and the rest is commited to running programs like SQL Server.
The only SQL server 2005 services that are running are
SSIS (of course)
Full Text Search
SQL Server
SQL Server Agent
Again... Thanks for all your help
|||This is a good work around.
I used a Script Task (I find myself using it more and more as I find limitations in SSIS) and with 3 simple lines of code I resolved the issue.
Code Snippet
Dim xslt As New XslTransform()xslt.Load("C:\Temp\Template.xslt")
xslt.Transform("C:\Temp\XMLSource.xml", "C:\Temp\XMLSource_Revised.xml")
This code performs the task in 5 mins -/+ consumming about 900 megs of memory space, for a 500 meg file.
Out of memory Exception when Running a package with XML Task
Hi..
I'm running a package that has a XML Task in the control flow. This task tranforms a XML file with a XSLT.
The file is about 2 megs on a daily basis, but at the end of the month there is a full dump of data that makes the file to be around 400 megs. There is where my problem is.
I run this on my 2 GB memory workstation and when the memory gauge on the task manager reaches about 1.5gb the package fails with an "Out of memory exception".
I also run this package on a 8GB Ram server, and same applies.
Is there any way of making this package utilize all the available memory, I even increased the virtual memory to see if that helped my issue, but nothing.
Thanks
Are you running on a 32-bit or 64-bit OS? 32-bit servers are generally limited to about 2 gb of addressable memory, unless you have made some changes to the server configuration.|||I'm running 32-bit... I wasn't aware of that!! I hope my admins knew that and made whatever change (I'm been highly opomistic, givin them the benefit of the doubt).
**UPDATE**
Yes... The server has the "/PAE" switch in the boot.ini, so its configured to use the 8 gigs of memory available to it.
|||Are other things running on the server - for example, the SQL Server relational engine? How much memory is allocated to it?|||I'm looking at the Performance Tab in Task Manager and there is
Total Physical Memory: 8.32 Gigs
Available Physical Mem: 7.12 Gigs
From that 1 gig of memory taken is about 600 Megs devoted to System Cache and the rest is commited to running programs like SQL Server.
The only SQL server 2005 services that are running are
SSIS (of course)
Full Text Search
SQL Server
SQL Server Agent
Again... Thanks for all your help
|||This is a good work around.
I used a Script Task (I find myself using it more and more as I find limitations in SSIS) and with 3 simple lines of code I resolved the issue.
Code Snippet
Dim xslt As New XslTransform()xslt.Load("C:\Temp\Template.xslt")
xslt.Transform("C:\Temp\XMLSource.xml", "C:\Temp\XMLSource_Revised.xml")
This code performs the task in 5 mins -/+ consumming about 900 megs of memory space, for a 500 meg file.
Wednesday, March 7, 2012
OSQL Batch File Problem
is running SQL Server 2000 Enterprise.
The batch file contains the line:
OSQL -i myscript.sql -Umyuser -Pmypassword -Slocalhost -o mytrans.log
the 'myscript.sql' file updates a table with another table of the exact
number of rows.
When the scheduled task runs, the 'mytrans.log' file shows 0 rows were
affected.
If I run this myself from the command line, 22,000 rows are affected which
is correct.
I am guessing there is some sort of permission/authentication issue here. I
am sending the right username/password for SQL and for windows to run the
task.
Any idea what I could do to fix this?
Thanks,
J. BaezGo to schedule tasks -- Tasks tab--See the user in RUN AS: . The user
displayed there should be having write access to the folder you are writing
the log file.
After that just right click and run the task and see.
Thanks
hari
SQL Server MVP
"J. Baez" wrote:
> I have a scheduled task that runs a batch file in windows 2003 server which
> is running SQL Server 2000 Enterprise.
> The batch file contains the line:
> OSQL -i myscript.sql -Umyuser -Pmypassword -Slocalhost -o mytrans.log
> the 'myscript.sql' file updates a table with another table of the exact
> number of rows.
> When the scheduled task runs, the 'mytrans.log' file shows 0 rows were
> affected.
> If I run this myself from the command line, 22,000 rows are affected which
> is correct.
> I am guessing there is some sort of permission/authentication issue here. I
> am sending the right username/password for SQL and for windows to run the
> task.
> Any idea what I could do to fix this?
> Thanks,
> J. Baez|||That user already has full control of that directory. So it still not
working. Any other ideas?
"Hari Prasad" wrote:
> Go to schedule tasks -- Tasks tab--See the user in RUN AS: . The user
> displayed there should be having write access to the folder you are writing
> the log file.
> After that just right click and run the task and see.
> Thanks
> hari
> SQL Server MVP
> "J. Baez" wrote:
> > I have a scheduled task that runs a batch file in windows 2003 server which
> > is running SQL Server 2000 Enterprise.
> >
> > The batch file contains the line:
> >
> > OSQL -i myscript.sql -Umyuser -Pmypassword -Slocalhost -o mytrans.log
> >
> > the 'myscript.sql' file updates a table with another table of the exact
> > number of rows.
> >
> > When the scheduled task runs, the 'mytrans.log' file shows 0 rows were
> > affected.
> >
> > If I run this myself from the command line, 22,000 rows are affected which
> > is correct.
> >
> > I am guessing there is some sort of permission/authentication issue here. I
> > am sending the right username/password for SQL and for windows to run the
> > task.
> >
> > Any idea what I could do to fix this?
> >
> > Thanks,
> >
> > J. Baez
OSQL Batch File Problem
is running SQL Server 2000 Enterprise.
The batch file contains the line:
OSQL -i myscript.sql -Umyuser -Pmypassword -Slocalhost -o mytrans.log
the 'myscript.sql' file updates a table with another table of the exact
number of rows.
When the scheduled task runs, the 'mytrans.log' file shows 0 rows were
affected.
If I run this myself from the command line, 22,000 rows are affected which
is correct.
I am guessing there is some sort of permission/authentication issue here. I
am sending the right username/password for SQL and for windows to run the
task.
Any idea what I could do to fix this?
Thanks,
J. BaezTry fully using fully qualified path for the input file -
C:\SomeFolder\mysqlscript.sql
or whatever the path is.
-Sue
.
On Tue, 22 Aug 2006 05:26:01 -0700, J. Baez
<JBaez@.discussions.microsoft.com> wrote:
>I have a scheduled task that runs a batch file in windows 2003 server which
>is running SQL Server 2000 Enterprise.
>The batch file contains the line:
>OSQL -i myscript.sql -Umyuser -Pmypassword -Slocalhost -o mytrans.log
>the 'myscript.sql' file updates a table with another table of the exact
>number of rows.
>When the scheduled task runs, the 'mytrans.log' file shows 0 rows were
>affected.
>If I run this myself from the command line, 22,000 rows are affected which
>is correct.
>I am guessing there is some sort of permission/authentication issue here.
I
>am sending the right username/password for SQL and for windows to run the
>task.
>Any idea what I could do to fix this?
>Thanks,
>J. Baez|||It is really, really helpful if you post ONLY one copy of your request.
Posting in multiple locations WITHOUT crossposting loses you the benefit of
our 'bouncing' ideas off of each other.
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
"J. Baez" <JBaez@.discussions.microsoft.com> wrote in message
news:90E8F840-025C-4FFE-8926-55FC25F94567@.microsoft.com...
>I have a scheduled task that runs a batch file in windows 2003 server which
> is running SQL Server 2000 Enterprise.
> The batch file contains the line:
> OSQL -i myscript.sql -Umyuser -Pmypassword -Slocalhost -o mytrans.log
> the 'myscript.sql' file updates a table with another table of the exact
> number of rows.
> When the scheduled task runs, the 'mytrans.log' file shows 0 rows were
> affected.
> If I run this myself from the command line, 22,000 rows are affected which
> is correct.
> I am guessing there is some sort of permission/authentication issue here.
> I
> am sending the right username/password for SQL and for windows to run the
> task.
> Any idea what I could do to fix this?
> Thanks,
> J. Baez
>|||Yeah...I noticed that after I replied. I think there are all
different answers, directions trying to help out with this
one on at least a few different groups. And no one knows who
is suggesting what.
It also makes it hard for others to find the answer when
they search things in the future. One post has the answer,
others don't, you only find the one without the solution,
etc.
-Sue
On Tue, 22 Aug 2006 13:19:49 -0700, "Arnie Rowland"
<arnie@.1568.com> wrote:
>It is really, really helpful if you post ONLY one copy of your request.
>Posting in multiple locations WITHOUT crossposting loses you the benefit of
>our 'bouncing' ideas off of each other.
OSQL Batch File Problem
is running SQL Server 2000 Enterprise.
The batch file contains the line:
OSQL -i myscript.sql -Umyuser -Pmypassword -Slocalhost -o mytrans.log
the 'myscript.sql' file updates a table with another table of the exact
number of rows.
When the scheduled task runs, the 'mytrans.log' file shows 0 rows were
affected.
If I run this myself from the command line, 22,000 rows are affected which
is correct.
I am guessing there is some sort of permission/authentication issue here. I
am sending the right username/password for SQL and for windows to run the
task.
Any idea what I could do to fix this?
Thanks,
J. BaezGo to schedule tasks -- Tasks tab--See the user in RUN AS: . The user
displayed there should be having write access to the folder you are writing
the log file.
After that just right click and run the task and see.
Thanks
hari
SQL Server MVP
"J. Baez" wrote:
> I have a scheduled task that runs a batch file in windows 2003 server whic
h
> is running SQL Server 2000 Enterprise.
> The batch file contains the line:
> OSQL -i myscript.sql -Umyuser -Pmypassword -Slocalhost -o mytrans.log
> the 'myscript.sql' file updates a table with another table of the exact
> number of rows.
> When the scheduled task runs, the 'mytrans.log' file shows 0 rows were
> affected.
> If I run this myself from the command line, 22,000 rows are affected which
> is correct.
> I am guessing there is some sort of permission/authentication issue here.
I
> am sending the right username/password for SQL and for windows to run the
> task.
> Any idea what I could do to fix this?
> Thanks,
> J. Baez|||That user already has full control of that directory. So it still not
working. Any other ideas?
"Hari Prasad" wrote:
[vbcol=seagreen]
> Go to schedule tasks -- Tasks tab--See the user in RUN AS: . The user
> displayed there should be having write access to the folder you are writin
g
> the log file.
> After that just right click and run the task and see.
> Thanks
> hari
> SQL Server MVP
> "J. Baez" wrote:
>
Monday, February 20, 2012
Orphaned Sessions
I have a SQL Agent task that fails, however the session carries on
regradless and compeltes the task successfully. The task is a call to a
stored procedure, and the Agent just gives an error of unknown token.
Running SQL 2000 sp3a on Windows nt4 server.
Can anyone shed any light on this?Hi
Have you checked the log files for the agent and SQL Server?
Does your stored procedure have error checking?
John
"Julian" <Julian@.discussions.microsoft.com> wrote in message
news:90531DDC-DAF8-4A74-9BEB-3FF5B01F7081@.microsoft.com...
> Hi,
> I have a SQL Agent task that fails, however the session carries on
> regradless and compeltes the task successfully. The task is a call to a
> stored procedure, and the Agent just gives an error of unknown token.
> Running SQL 2000 sp3a on Windows nt4 server.
> Can anyone shed any light on this?|||Hi,
Yes checked both log files and nothing.
Yes the SP does have error handling.
Julian
"John Bell" wrote:
> Hi
> Have you checked the log files for the agent and SQL Server?
> Does your stored procedure have error checking?
> John
> "Julian" <Julian@.discussions.microsoft.com> wrote in message
> news:90531DDC-DAF8-4A74-9BEB-3FF5B01F7081@.microsoft.com...
>
>|||Hi
Can you post the code and which statement it is failing on?
John
*** Sent via Developersdex http://www.codecomments.com ***
Don't just participate in USENET...get rewarded for it!
Orphaned Sessions
I have a SQL Agent task that fails, however the session carries on
regradless and compeltes the task successfully. The task is a call to a
stored procedure, and the Agent just gives an error of unknown token.
Running SQL 2000 sp3a on Windows nt4 server.
Can anyone shed any light on this?
Hi
Have you checked the log files for the agent and SQL Server?
Does your stored procedure have error checking?
John
"Julian" <Julian@.discussions.microsoft.com> wrote in message
news:90531DDC-DAF8-4A74-9BEB-3FF5B01F7081@.microsoft.com...
> Hi,
> I have a SQL Agent task that fails, however the session carries on
> regradless and compeltes the task successfully. The task is a call to a
> stored procedure, and the Agent just gives an error of unknown token.
> Running SQL 2000 sp3a on Windows nt4 server.
> Can anyone shed any light on this?
|||Hi,
Yes checked both log files and nothing.
Yes the SP does have error handling.
Julian
"John Bell" wrote:
> Hi
> Have you checked the log files for the agent and SQL Server?
> Does your stored procedure have error checking?
> John
> "Julian" <Julian@.discussions.microsoft.com> wrote in message
> news:90531DDC-DAF8-4A74-9BEB-3FF5B01F7081@.microsoft.com...
>
>
|||Hi
Can you post the code and which statement it is failing on?
John
*** Sent via Developersdex http://www.codecomments.com ***
Don't just participate in USENET...get rewarded for it!
Orphaned Sessions
I have a SQL Agent task that fails, however the session carries on
regradless and compeltes the task successfully. The task is a call to a
stored procedure, and the Agent just gives an error of unknown token.
Running SQL 2000 sp3a on Windows nt4 server.
Can anyone shed any light on this?Hi
Have you checked the log files for the agent and SQL Server?
Does your stored procedure have error checking?
John
"Julian" <Julian@.discussions.microsoft.com> wrote in message
news:90531DDC-DAF8-4A74-9BEB-3FF5B01F7081@.microsoft.com...
> Hi,
> I have a SQL Agent task that fails, however the session carries on
> regradless and compeltes the task successfully. The task is a call to a
> stored procedure, and the Agent just gives an error of unknown token.
> Running SQL 2000 sp3a on Windows nt4 server.
> Can anyone shed any light on this?