Showing posts with label dst. Show all posts
Showing posts with label dst. Show all posts

Friday, March 9, 2012

DTS / Stored Proceedure

How can you run a DST package from a stored proceedure.
I am using sql server 2000
i cant find the syntax anywhere
it is a DTS that takes a file and imports it into a table in the dbi was looking around and someone said to try to run this at the sql prompt

EXEC xp_cmdshell 'dtsrun /S /U /P /N
exportEmail'

where exportEmail is the dts
when i do this though it says xp_cmdshell is a stored procedure that cant be found
is this something i have to make or is it something that should be there

http://www.dbforums.com/t688385.html|||i tried this method

http://p2p.wrox.com/topic.asp?TOPIC_ID=9741

and then it came back with "you dont have permission for xp_cmdShell" in short
where is this function located and where can i change permissions|||xp_cmdshell is found in the Master database. Seexp_cmdshell for more information.

Terri|||i set the permissions and i used the command


CREATE PROCEDURE MassImport AS
exec master..xp_cmdshell 'dtsrun /S /N /E'
GO

and i got the error

".Net SqlClient Data ProviderA severe error occurred on the current command. The results, if any, should be discarded. xpsql.cpp: Error 997 from GetProxyAccount on link 472"

Is my stored proceedure correct
did I miss something does it not like the permissions
i am going to try to dig deeper into the link you gave me. But if someone knows a quick fix please tell me|||The problem I see with the stored procedure is that you did not supply the package name (exportEmail) with the /N switch, and you used the /S switch to indicate which server you were running against but did not supply the server name.

Note that you can run DTSRUN /? from the command prompt to see an explanation of each of the switches.

Terri|||Looking at the help in the command prompt this should be correct
my package name is "Mass Import" and this is a local sql server
Does this require no spaces in the package name or do i need quotes somewhere in the statement

here is my new stored procedure
and i get the same error message

exec master..xp_cmdshell 'dtsrun /S(local) /N(Mass Import) /E'

when i looked at the help /s and /n are both optional and /e is needed
/e seems to be the only one required.

i also tried it at a command prompt and this is the error i got.


H:\>dtsrun /S(local) /N(Mass Import) /E
DTSRun: Loading...

Error: -2147217900 (80040E14); Provider Error: 14262 (37B6)
Error string: The specified DTS Package ('Name = '(Mass Import) '; ID.Versio
nID = {[not specified]}.{[not specified]}') does not exist.
Error source: Microsoft OLE DB Provider for SQL Server
Help file:
Help context: 0

|||Did you try enclosing your package name in double quotes?

H:\>dtsrun /S "(local)" /N "Mass Import" /E

Terri|||gives me the same error


H:\>dtsrun /S "(local)" /N "Mass Import" /E
DTSRun: Loading...

Error: -2147217900 (80040E14); Provider Error: 14262 (37B6)
Error string: The specified DTS Package ('Name = '"Mass Import" '; ID.Versio
nID = {[not specified]}.{[not specified]}') does not exist.
Error source: Microsoft OLE DB Provider for SQL Server
Help file:
Help context: 0

|||I've tried that exact syntax and it works for me. So I would guess that either the Server is wrong or the Package Name is wrong.

You might try the dtsrunui.exe tool. This will enable you to visually set up your dtsrun statement.

From the command prompt, run this tool, select your Server from the drop-down (or type it in if it does not appear), choose the Authentication method, then choose the Package Name from the dropdown. When you have all of this set, click on the "Advanced..." button, and on this popup, click the "Generate..." button towards the bottom. This will drop in the generated dtsrun command in the box to the left. You should be able to use this generated command to run your package (by copying and pasting it into your stored procedure).

Terri|||that tool is cool thank you :)

here is the new command it made me run


DTSRun /S "(local)" /N "Mass Import" /G "{73D07FB3-E2D4-4A92-B69F-20C746F00DC1}" /W "0" /E
|||alright now my stored proceedure runs correctly in the command prompt and in the sql query analyzer
but for some reason it isnt working in my code

here is my code


Dim cmdMassImport As New SqlCommand("MassImport", C.ndConnection)
cmdMassImport.CommandType = CommandType.StoredProcedure

C.ndConnection.Open()
cmdMassImport.ExecuteNonQuery()
C.ndConnection.Close()

Here is the error


A severe error occurred on the current command. The results, if any, should be discarded. xpsql.cpp: Error 997 from GetProxyAccount on line 472

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: A severe error occurred on the current command. The results, if any, should be discarded. xpsql.cpp: Error 997 from GetProxyAccount on line 472

Source Error:

Line 5760:
Line 5761: C.ndConnection.Open()
Line 5762: cmdMassImport.ExecuteNonQuery() <-- Says error is occuring here
Line 5763: C.ndConnection.Close()
Line 5764: End Sub

Source File: e:\Inetpub\wwwroot\Objectmanipulation\panelMaker.aspx.vb Line: 5762

Stack Trace:

[SqlException: A severe error occurred on the current command. The results, if any, should be discarded.
xpsql.cpp: Error 997 from GetProxyAccount on line 472
]
System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream)
System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
Objectmanipulation.panelMaker.btn_Click(Object sender, EventArgs e) in e:\Inetpub\wwwroot\Objectmanipulation\panelMaker.aspx.vb:5762
System.Web.UI.WebControls.Button.OnClick(EventArgs e)
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
System.Web.UI.Page.ProcessRequestMain()

Am I missing something stupid that I need to initialize to make the stored proceedure work?
or is there something deep that needs to be fixed|||Please??
does this seem to be a code thing
i cant seem to see that i missed anything with the stored proceedure call|||Ack, sorry, I didn't mean to leave you hanging. :-(

I have to try this out myself and get back to you -- I'll try not to make it later than tonight.

And if anyone has a suggestion -- please chime in!

Terri|||After playing around with this for a while and looking at Google, it's a permissions problem with xp_cmdshell. I am not going to be able to talk you through it because I don't thoroughly understand it -- the DBA at my place of employment set this up for me when I needed it.

Terri

Tuesday, February 14, 2012

DST Problem

After installing the Microsoft DST patch on the server running RS2000 we are
getting the following error when trying to run reports:
Specified argument was out of the range of valid values. Parameter name: date
If I uncheck the observe DST on the date/time control panel app then all is
OK.
Right now I have it off and adjusted the time manually.
Any suggestions on how to resolve this.On Mar 12, 8:51 am, Kyle <K...@.discussions.microsoft.com> wrote:
> After installing the Microsoft DST patch on the server running RS2000 we are
> getting the following error when trying to run reports:Specifiedargumentwasoutof therangeofvalidvalues.Parametername:date
> If I uncheck the observe DST on thedate/time control panel app then all is
> OK.
> Right now I have it off and adjusted the time manually.
> Any suggestions on how to resolve this.
I too have found the same issue and your workaround works for me as
well. If I come up with a resolution, I will post back. What SP are
you running? I we are on SP1.|||We are running:
Windows 2000 SP4
Reporting Services 2000 SP1
SQL Server 2000 (Not sure of the service pack)
"msprygada@.gmail.com" wrote:
> On Mar 12, 8:51 am, Kyle <K...@.discussions.microsoft.com> wrote:
> > After installing the Microsoft DST patch on the server running RS2000 we are
> > getting the following error when trying to run reports:Specifiedargumentwasoutof therangeofvalidvalues.Parametername:date
> >
> > If I uncheck the observe DST on thedate/time control panel app then all is
> > OK.
> >
> > Right now I have it off and adjusted the time manually.
> > Any suggestions on how to resolve this.
> I too have found the same issue and your workaround works for me as
> well. If I come up with a resolution, I will post back. What SP are
> you running? I we are on SP1.
>|||On Mar 12, 10:05 am, mspryg...@.gmail.com wrote:
> On Mar 12, 8:51 am, Kyle <K...@.discussions.microsoft.com> wrote:
> > After installing the Microsoft DST patch on the server running RS2000 we are
> > getting the following error when trying to run reports:Specifiedargumentwasoutof therangeofvalidvalues.Parametername:date
> > If I uncheck the observe DST on thedate/time control panel app then all is
> > OK.
> > Right now I have it off and adjusted the time manually.
> > Any suggestions on how to resolve this.
> I too have found the same issue and your workaround works for me as
> well. If I come up with a resolution, I will post back. What SP are
> you running? I we are on SP1.
Our sys admin had me look at this
http://support.microsoft.com/?kbid=931975&SD=tech
but he updated the server with the update and we do not have SQL
Notification Services. So this was of no help to me but maybe it can
help you.|||On Mar 12, 10:46 am, Kyle <K...@.discussions.microsoft.com> wrote:
> We are running:
> Windows 2000 SP4
> Reporting Services 2000 SP1
> SQL Server 2000 (Not sure of the service pack)
>
Windows 200 SP4, RS 200 SP1 (I think SP2 is out), and SQL Server SP3
To get version, type select @.@.version in QA (version info below)
SQL Server 2000 version and level @.@.VERSION ProductLevel
SQL Server 2000 Original Release 8.00.194 RTM
Database Components SP1 or 8.00.384 SP1
Desktop Engine SP1
Database Components SP2 or 8.00.534 SP2
Desktop Engine SP2
Database Components SP3 or SP3a, or 8.00.760 SP3
Desktop Engine SP3 or SP3a|||On Mar 12, 10:57 am, mspryg...@.gmail.com wrote:
> On Mar 12, 10:46 am, Kyle <K...@.discussions.microsoft.com> wrote:
> > We are running:
> > Windows 2000 SP4
> > Reporting Services 2000 SP1
> > SQL Server 2000 (Not sure of the service pack)
> Windows 200 SP4, RS 200 SP1 (I think SP2 isout), and SQL Server SP3
> To get version, type select @.@.version in QA (version info below)
> SQL Server 2000 version and level @.@.VERSION ProductLevel
> SQL Server 2000 Original Release 8.00.194 RTM
> Database Components SP1 or 8.00.384 SP1
> Desktop Engine SP1
> Database Components SP2 or 8.00.534 SP2
> Desktop Engine SP2
> Database Components SP3 or SP3a, or 8.00.760 SP3
> Desktop Engine SP3 or SP3a
Man, need to slow down when I type:
Windows 2000 SP4, RS 2000 SP1 (I think SP2 is out), and SQL Server
2000 SP3|||We are having the same issue as the one noted and we are using the same work
around at the moment.
SQL Server 2000 Version: 8.00.2039
SQL Server Reporting Services Version: 8.00.1042
This is a huge problem for us.
"msprygada@.gmail.com" wrote:
> On Mar 12, 8:51 am, Kyle <K...@.discussions.microsoft.com> wrote:
> > After installing the Microsoft DST patch on the server running RS2000 we are
> > getting the following error when trying to run reports:Specifiedargumentwasoutof therangeofvalidvalues.Parametername:date
> >
> > If I uncheck the observe DST on thedate/time control panel app then all is
> > OK.
> >
> > Right now I have it off and adjusted the time manually.
> > Any suggestions on how to resolve this.
> I too have found the same issue and your workaround works for me as
> well. If I come up with a resolution, I will post back. What SP are
> you running? I we are on SP1.
>|||We are also having the same problem, but the workaround is working for us
right now.
Regards,
Steve
"Kyle" wrote:
> After installing the Microsoft DST patch on the server running RS2000 we are
> getting the following error when trying to run reports:
> Specified argument was out of the range of valid values. Parameter name: date
> If I uncheck the observe DST on the date/time control panel app then all is
> OK.
> Right now I have it off and adjusted the time manually.
> Any suggestions on how to resolve this.
>|||We have the same issue.
I also temporaily turned off the Windows Time service so it wouldn't re-sync
with our domain controller.
Thanks,
MB
"Kyle" <Kyle@.discussions.microsoft.com> wrote in message
news:660D17F1-EE9C-4EBE-99FA-99E9688C885D@.microsoft.com...
> After installing the Microsoft DST patch on the server running RS2000 we
> are
> getting the following error when trying to run reports:
> Specified argument was out of the range of valid values. Parameter name:
> date
> If I uncheck the observe DST on the date/time control panel app then all
> is
> OK.
> Right now I have it off and adjusted the time manually.
> Any suggestions on how to resolve this.
>|||Same problem here as well. It does not seem to be an issue with RS
2005, only RS 2000.|||I'm also seeing the same problem with our SQL 2000 RS Server.
Microsoft! We need a patch for this....(can you have it ready sometime
last week?)|||This was posted on over on MSDN in response to the same problem:
You need to apply a patch that replaces two dll's on your web server that
deal with time services. I don't have the KB article but it shouldn't be hard
to find at the MS website. FYI, if you have a Win 2000 server and don't have
an extended service contract with M$ they'll charge you $4000 for the patch
(I'm told). We have the extended service contract... We had the same problem
and this is how we fixed it.
I have yet to find the KB article he is talking about. Thought maybe more
people searching would help wade throught the 1000's of DST articles.
"Kyle" wrote:
> After installing the Microsoft DST patch on the server running RS2000 we are
> getting the following error when trying to run reports:
> Specified argument was out of the range of valid values. Parameter name: date
> If I uncheck the observe DST on the date/time control panel app then all is
> OK.
> Right now I have it off and adjusted the time manually.
> Any suggestions on how to resolve this.
>|||I saw that too. I believe that person was referring to the DST patch itself.
(He mentions the $4000 charge; and that was for the DST patch).
I do not believe there is a RS patch, and according to KB931975 there is no
need for one. Conversely, they do mention a patch for SQL Notification
Services in that article.
http://support.microsoft.com/kb/931975
Now is the time when searching the MSDN blogs could prove useful. Maybe
we'll find a SQL RS developer who will acknowledge this oversight.
-Rob
"Kyle" wrote:
> This was posted on over on MSDN in response to the same problem:
> You need to apply a patch that replaces two dll's on your web server that
> deal with time services. I don't have the KB article but it shouldn't be hard
> to find at the MS website. FYI, if you have a Win 2000 server and don't have
> an extended service contract with M$ they'll charge you $4000 for the patch
> (I'm told). We have the extended service contract... We had the same problem
> and this is how we fixed it.
> I have yet to find the KB article he is talking about. Thought maybe more
> people searching would help wade throught the 1000's of DST articles.
>
> "Kyle" wrote:
> > After installing the Microsoft DST patch on the server running RS2000 we are
> > getting the following error when trying to run reports:
> > Specified argument was out of the range of valid values. Parameter name: date
> >
> > If I uncheck the observe DST on the date/time control panel app then all is
> > OK.
> >
> > Right now I have it off and adjusted the time manually.
> > Any suggestions on how to resolve this.
> >|||Poster on MSDN came up with this:
http://support.microsoft.com/default.aspx/kb/932590
Win2000 is not listed so I forwarded it to our server guys to see if we have
an extended contract on the server in question.
Hope this helps...
"Kyle" wrote:
> This was posted on over on MSDN in response to the same problem:
> You need to apply a patch that replaces two dll's on your web server that
> deal with time services. I don't have the KB article but it shouldn't be hard
> to find at the MS website. FYI, if you have a Win 2000 server and don't have
> an extended service contract with M$ they'll charge you $4000 for the patch
> (I'm told). We have the extended service contract... We had the same problem
> and this is how we fixed it.
> I have yet to find the KB article he is talking about. Thought maybe more
> people searching would help wade throught the 1000's of DST articles.
>
> "Kyle" wrote:
> > After installing the Microsoft DST patch on the server running RS2000 we are
> > getting the following error when trying to run reports:
> > Specified argument was out of the range of valid values. Parameter name: date
> >
> > If I uncheck the observe DST on the date/time control panel app then all is
> > OK.
> >
> > Right now I have it off and adjusted the time manually.
> > Any suggestions on how to resolve this.
> >|||Has there been any word on a patch?
We're in the same boat, but we don't have the luxury of using the workaround
(in our infinite wisdom, we decided to install WRS on a domain controller),
and the only option open right now is migrating it to a new box where
hopefully we can get the workaround working.|||If you have not rebooted your servers after applying the DST patch...you need
to.
"Jacques C" wrote:
> Has there been any word on a patch?
> We're in the same boat, but we don't have the luxury of using the workaround
> (in our infinite wisdom, we decided to install WRS on a domain controller),
> and the only option open right now is migrating it to a new box where
> hopefully we can get the workaround working.|||We had the exact same error as described above. After we restarted our
server, the issue was resolved.
SQL 2000 SP4
WINDOWS 2000
REPORTING SERVICES 2000 SP2
"Jacques C" wrote:
> Has there been any word on a patch?
> We're in the same boat, but we don't have the luxury of using the workaround
> (in our infinite wisdom, we decided to install WRS on a domain controller),
> and the only option open right now is migrating it to a new box where
> hopefully we can get the workaround working.

DST and Notification Services

I need some clarification on Daylight Saving Time changes for SQL
Server 2005.
I read MicroSoft Article 931815.
Per the doc, I have determined that I have Notification Services
installed (determined via registry).
However, I do not seem to have any Notification Services to stop (step
1) and not sure what name to use for NSMainDatabase (running the osql
script in step 5).
>From the SQL Server Management Studio, I can determine that I have
version 9.0.242.0 of Notification Services, but it tells me that NO
instances are registered on this machine.
So, please advise if you have any input. I am about 80% confident that
I don't need to do this fix.
Thanks,
RogerIf you do not have an instance of Notification Services deployed, then you
do not have to worry about patching. The binary files of Notification
Services are not affected. You have to apply the update only when you create
an instance. If there are no services running and no NS* databases, then
really nothing to do. Also, for instances deployed after SQL Server 2005 SP2
is installed you do not have to do anything, as instances created with SP2
will have the correct DST info.
HTH,
Plamen Ratchev
http://www.SQLStudio.com|||On Mar 6, 2:59 pm, "Plamen Ratchev" <Pla...@.SQLStudio.com> wrote:
> If you do not have an instance of Notification Services deployed, then you
> do not have to worry about patching. The binary files of Notification
> Services are not affected. You have to apply the update only when you crea
te
> an instance. If there are no services running and no NS* databases, then
> really nothing to do. Also, for instances deployed after SQL Server 2005 S
P2
> is installed you do not have to do anything, as instances created with SP2
> will have the correct DST info.
> HTH,
> Plamen Ratchevhttp://www.SQLStudio.com
I thank you for your comments. Much appreciated.

DST and Notification Services

I need some clarification on Daylight Saving Time changes for SQL
Server 2005.
I read MicroSoft Article 931815.
Per the doc, I have determined that I have Notification Services
installed (determined via registry).
However, I do not seem to have any Notification Services to stop (step
1) and not sure what name to use for NSMainDatabase (running the osql
script in step 5).
>From the SQL Server Management Studio, I can determine that I have
version 9.0.242.0 of Notification Services, but it tells me that NO
instances are registered on this machine.
So, please advise if you have any input. I am about 80% confident that
I don't need to do this fix.
Thanks,
RogerIf you do not have an instance of Notification Services deployed, then you
do not have to worry about patching. The binary files of Notification
Services are not affected. You have to apply the update only when you create
an instance. If there are no services running and no NS* databases, then
really nothing to do. Also, for instances deployed after SQL Server 2005 SP2
is installed you do not have to do anything, as instances created with SP2
will have the correct DST info.
HTH,
Plamen Ratchev
http://www.SQLStudio.com|||On Mar 6, 2:59 pm, "Plamen Ratchev" <Pla...@.SQLStudio.com> wrote:
> If you do not have an instance of Notification Services deployed, then you
> do not have to worry about patching. The binary files of Notification
> Services are not affected. You have to apply the update only when you create
> an instance. If there are no services running and no NS* databases, then
> really nothing to do. Also, for instances deployed after SQL Server 2005 SP2
> is installed you do not have to do anything, as instances created with SP2
> will have the correct DST info.
> HTH,
> Plamen Ratchevhttp://www.SQLStudio.com
I thank you for your comments. Much appreciated.