Showing posts with label message. Show all posts
Showing posts with label message. Show all posts

Monday, March 26, 2012

Executing BCP statement throws out the error

Hi

When I execute a simple BCP statement as shown below. It throws out an error message as pasted below. Any help on this is highly appreciated.

Use master
Exec xp_cmdshell 'bcp "select * from Mydb..Records" queryout "D:\Book1.xls" -U [sa] -P [pwd] -c'

SQLState = S1010, NativeError = 0
Error = [Microsoft][ODBC SQL Server Driver]Function sequence error
NULL

Thanks!

No replies to this question? We are using sp_oamethod and when calling the bcp.exe, getting the same error message.|||

can you provide some sample data and DDL?

|||There seemed to be a limit in the temp table for the bcp into a file. If the table contained 20 or less rows, it worked correctly. If the table had 21 + rows, then the bcp failed (the temp table was created and populated during the execution of a proc that then would bcp the data to a file). We ended up replacing the select statement with the temp table name and using "out" instead of "queryout". That fixed the problem. We can not explain what the reason was though.|||

I had the same problem, only instead of Excel files I was using XML files.

Anyway, it looks like it is an internal SQL Server error, and after restarting SQL Server, everything was back to normal.

Executing BCP statement throws out the error

Hi

When I execute a simple BCP statement as shown below. It throws out an error message as pasted below. Any help on this is highly appreciated.

Use master
Exec xp_cmdshell 'bcp "select * from Mydb..Records" queryout "D:\Book1.xls" -U [sa] -P [pwd] -c'

SQLState = S1010, NativeError = 0
Error = [Microsoft][ODBC SQL Server Driver]Function sequence error
NULL

Thanks!

No replies to this question? We are using sp_oamethod and when calling the bcp.exe, getting the same error message.|||

can you provide some sample data and DDL?

|||There seemed to be a limit in the temp table for the bcp into a file. If the table contained 20 or less rows, it worked correctly. If the table had 21 + rows, then the bcp failed (the temp table was created and populated during the execution of a proc that then would bcp the data to a file). We ended up replacing the select statement with the temp table name and using "out" instead of "queryout". That fixed the problem. We can not explain what the reason was though.|||

I had the same problem, only instead of Excel files I was using XML files.

Anyway, it looks like it is an internal SQL Server error, and after restarting SQL Server, everything was back to normal.

Executing BCP statement throws out the error

Hi

When I execute a simple BCP statement as shown below. It throws out an error message as pasted below. Any help on this is highly appreciated.

Use master
Exec xp_cmdshell 'bcp "select * from Mydb..Records" queryout "D:\Book1.xls" -U [sa] -P [pwd] -c'

SQLState = S1010, NativeError = 0
Error = [Microsoft][ODBC SQL Server Driver]Function sequence error
NULL

Thanks!

No replies to this question? We are using sp_oamethod and when calling the bcp.exe, getting the same error message.|||

can you provide some sample data and DDL?

|||There seemed to be a limit in the temp table for the bcp into a file. If the table contained 20 or less rows, it worked correctly. If the table had 21 + rows, then the bcp failed (the temp table was created and populated during the execution of a proc that then would bcp the data to a file). We ended up replacing the select statement with the temp table name and using "out" instead of "queryout". That fixed the problem. We can not explain what the reason was though.|||

I had the same problem, only instead of Excel files I was using XML files.

Anyway, it looks like it is an internal SQL Server error, and after restarting SQL Server, everything was back to normal.

sql

Wednesday, March 21, 2012

Executing a batch script from "Execute Process" Task

Hello,

I have an "execute process" task which executes a perl script. When I run the task, it shows a prompt with the message "the publisher can not be verified". It gives the option to continue the task or to cancel.

The problem for me is that I want to schedule this package to run automatically, and I don't want the automated process to show this dialog. I need to override the security setting and have SSIS execute my batch scripts without prompting. Assuming I don't want to rewrite the Perl code into a script task, is there a way to do acomplish this?

Thanks!

Arkadiy

Normally, Digitally Signing whatever is being called into question could resolve this type of error, but I have not seen this error occur in SSIS as of yet (usually see this in IE).

Here's some stuff you can try:

Try testing after lowering the internet security (on the test system) to a lower setting (for example low - or "custom level" and play around with the settings here). Be sure to set this back when you are done testing.

You could look into digitally signing the perl script. I'm not sure if this pertains to that or not:

http://www.cpan.org/authors/id/R/RO/ROODE/perlsign-0.04

"This program invokes GPG to digitally sign Perl source files. The GPG signature becomes embedded into the source file as POD paragraphs. The functionality of the program or module isn't affected. This may be useful to prove authorship of a program, or to prove that changes have or have not been made to a source file."

You could read this to see if it gives you any insight:

http://www.microsoft.com/technet/Security/bestprac/mblcode.mspx

Anyway, if this is not relavent, can you provide more details as to how you are executing the perl script? Like where the perl script is stored, etc.

|||

Thanks,

I found another way of solving this without changing the security settings. The trick is to invoke executable or dll (such as perl.exe) and not a batch script. So in the "execute process" task, the executable became perl.exe and everything else became command line argument. Then it works fine.

Thanks again for your help anyway!

Arkadiy

Monday, March 12, 2012

Execute SSIS package on vb.net

Hi All,

I would like to write a small application for execute a SSIS package manually, but i got a error message as following:

Coding:
Dim oPkg As DTS.Package2
oPkg = New DTS.Package2

'Error Message Here
oPkg.LoadFromSQLServer("SQL2005", "sa", "abc", DTS.DTSSQLServerStorageFlags.DTSSQLStgFlag_Default, Nothing, Nothing, Nothing, "AccessImport")

oPkg.Execute()
oPkg.UnInitialize()

oPkg = Nothing

Error Message:
The specified DTS Package ('Name='AccessImport';ID.VersionID = {[not specified]}.{[not specified]}') does not exist.

So what is the problem here?
Thank a lot.

Laputa

You're using the DTS2000 object model.

You need the Microsoft.SqlServer.Dts.Runtime .Net namespace!

ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/dtsref9mref/html/N_Microsoft_SqlServer_Dts_Runtime.htm

-Jamie

|||Thx you help a lot of me !!|||I can't found the namespace Microsoft.SqlServer.Dts.Runtime

Execute SSIS Package in C# (ErrorMessage ?)

Hi all

I am executing a SSIS Package in C# (2005).
Does anybody know how to find out, in case of an error, the
error message?

I am doing the follwoing:
Microsoft.SqlServer.Dts.Runtime.Package local_Package = new Microsoft.SqlServer.Dts.Runtime.Package();
Microsoft.SqlServer.Dts.Runtime.DTSExecResult local_DTSExecResult = new Microsoft.SqlServer.Dts.Runtime.DTSExecResult();
Microsoft.SqlServer.Dts.Runtime.Application local_Application = new Microsoft.SqlServer.Dts.Runtime.Application();

local_Package = local_Application.LoadPackage("c:\temp\ssis_package.dtsx", null);
local_DTSExecResult = local_Package.Execute();

if (local_DTSExecResult == Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Failure)
{
Display MessageBox of the error message ...
}

Thanks for any comment.

Best regards
Frank Uray

Try reading the SSIS system variable like

local_Package.Variables["ErrorDescription"].value.ToString()

inside the IF condition.

Thanks,
Loonysan

|||

Hi all

I have found out the solution ... :-)

if (local_DTSExecResult == Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Failure)
{
foreach (Microsoft.SqlServer.Dts.Runtime.DtsError local_DtsError in local_Package.Errors)
{MessageBox.Show(local_DtsError.Description);}
}

Best regards
Frank Uray

Friday, March 9, 2012

Execute SQL Task Error

Hi:

I am getting the following error message while trying to run a Execute SQL task with Variables in BIDS. My connection type is ADO.NET . My Variables defined are

Varout and Varin. Both are String type Variables. @.varout has a value set to "Category" and @.varin has a value set to "Test Category". I am using the expression

" Select * into " + @.[User::VarOut] + " FROM " + @.[User::Varin]

The expression eveluates correctly. The error I get when i run the package is:

Package Validation Error. Failed to lock Variable "Select * into TestCategory from category" for read access with error 0XC0010001. The Variable cannot be found. This occurs when an attempt is made to retrieve a variable from the variables collection on a container during the execution of package and the variable is not there. The Variable name may have changed or the Variable is not being created.

Can anyone please tell me what I am doing wrong or where do I need to look at?.

Thank you

AK

Can anyone please please give me a solution. This is really urgent. I found a KB describing a issue related to Script task but not sure if it is applicable to this issue. It involves applying a hot fix. Anyone from MS please comment.|||this link might help: http://msdn2.microsoft.com/en-us/library/ms141003.aspx|||

Thanks Duane. That Article helped. I was selecting the SQLSourcetype as Variable and that was throwing errors. I changed it and my package runs like a charm!!!.

Thanks again.

Sunday, February 26, 2012

Execute permission denied on stored procedure

Hi,
A user of a VB.Net windows application gets this error message when
trying to add data. She is able to add data to other tables by
executing other stored procedures except in this 1 screen. I've checked
the database user/role that she is using and both have execute
permission for that stored procedure in error. Please help! I'm lost as
how to debug this problem.
Appreciate your inputs.
Thanks!Check to see if the use or role has DENY permissions. When both GRANT and
DENY permissions are present, DENY takes precedence. Execute sp_helprotect
'ProcName' to list all proc permissions.
--
Hope this helps.
Dan Guzman
SQL Server MVP
"hillcountry74" <shruthibg@.yahoo.com> wrote in message
news:1154708924.877916.202230@.m73g2000cwd.googlegroups.com...
> Hi,
> A user of a VB.Net windows application gets this error message when
> trying to add data. She is able to add data to other tables by
> executing other stored procedures except in this 1 screen. I've checked
> the database user/role that she is using and both have execute
> permission for that stored procedure in error. Please help! I'm lost as
> how to debug this problem.
> Appreciate your inputs.
> Thanks!
>

Execute permission denied on stored procedure

Hi,
A user of a VB.Net windows application gets this error message when
trying to add data. She is able to add data to other tables by
executing other stored procedures except in this 1 screen. I've checked
the database user/role that she is using and both have execute
permission for that stored procedure in error. Please help! I'm lost as
how to debug this problem.
Appreciate your inputs.
Thanks!Check to see if the use or role has DENY permissions. When both GRANT and
DENY permissions are present, DENY takes precedence. Execute sp_helprotect
'ProcName' to list all proc permissions.
Hope this helps.
Dan Guzman
SQL Server MVP
"hillcountry74" <shruthibg@.yahoo.com> wrote in message
news:1154708924.877916.202230@.m73g2000cwd.googlegroups.com...
> Hi,
> A user of a VB.Net windows application gets this error message when
> trying to add data. She is able to add data to other tables by
> executing other stored procedures except in this 1 screen. I've checked
> the database user/role that she is using and both have execute
> permission for that stored procedure in error. Please help! I'm lost as
> how to debug this problem.
> Appreciate your inputs.
> Thanks!
>

Friday, February 24, 2012

EXECUTE permission denied on object 'xp_sqlagent_notify'

get the message EXECUTE permission denied on object 'xp_sqlagent_notify' when trying to create subscription on the report in R
From http://www.developmentnow.com/g/115_2004_7_0_12_0/sql-server-reporting-services.ht
Posted via DevelopmentNow.com Group
http://www.developmentnow.comCheck for 'admin' permission and moreover hope you have started the sql agent
in the sql server without that subscription doesn't work.
Amarnath
"Lada" wrote:
> get the message EXECUTE permission denied on object 'xp_sqlagent_notify' when trying to create subscription on the report in RS
> From http://www.developmentnow.com/g/115_2004_7_0_12_0/sql-server-reporting-services.htm
> Posted via DevelopmentNow.com Groups
> http://www.developmentnow.com
>