.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan
Asad Ali
Post New Web Links

Error Log In SQL COMMAND.

Posted By:      Posted Date: September 29, 2010    Points: 0   Category :Sql Server
 

I am running a .bat command using "sqlcmd". I need to log a error or trace an error if it fails. How can we pass alog error o/p file using this.

SQLCMD.EXE -S Server -E -d database -Q "EXEC .sp" ...............?




View Complete Post


More Related Resource Links

command object error

  

Could someone please tell me what is wrong with my syntax here?  I'd be much appreciative.

 

objCmd = New SQLCommand("SELECT CASE WHEN objDR('Item') = 'Enter Bill of Lading' then enterbol " _  

& "WHEN objDR('Item') = 'Bill of Lading History' THEN bolhistory " _  

& "WHEN objDR('Item') = 'Request Transfer' or objDR('Item') = 'View Transfer in Progress' THEN transfers " _  

& "END  from plantGroups where plantgroupid=@plantgroupid", objConn)


Using a Variable in SSIS - Error - "Command text was not set for the command object.".

  
Hi All, i am using a OLE DB Source in my dataflow component and want to select rows from the source based on the Name I enter during execution time. I have created two variables, enterName - String packageLevel (will store the name I enter) myVar - String packageLevel. (to store the query) I am assigning this query to the myVar variable, "Select * from db.Users where (UsrName =  " + @[User::enterName] + " )" Now in the OLE Db source, I have selected as Sql Command from Variable, and I am getting the variable, enterName,. I select that and when I click on OK am getting this error.   Error at Data Flow Task [OLE DB Source [1]]: An OLE DB error has occurred. Error code: 0x80040E0C.An OLE DB record is available.  Source: "Microsoft SQL Native Client"  Hresult: 0x80040E0C  Description: "Command text was not set for the command object.". Can Someone guide me whr am going wrong? myVar variable, i have set the ExecuteAsExpression  Property to true too. Please let me know where am going wrong? Thanks in advance.

BCP out command error

  
I am using BCP out command to export data to text file from SQL Server database using code below  select @sql = 'bcp <tableName> out C:\bcp\image.txt -c -t$$ -C RAW -T -S'+ @@servernameexec master..xp_cmdshell @sql, no_output  I am getting the following error sporadically  SQLState = 08001, NativeError = 0Error = [Microsoft][SQL Server Native Client 10.0]Unable to complete login process due to delay in opening server connection Please help on this, how to overcome this

Error on install : The INSTANCESHAREDWOWDIR command line value was not specified.

  
Hi,I'm trying to upgrade my dev pc for SQL Server 2008. I've removed all previous installations of sql server 2005, then installed Business Intelligence Studio & Management Tools.During setup (when selecting features), I received the following error : "The INSTANCESHAREDWOWDIR command line value was not specified. This value must be specified when the INSTANCESHAREDDIR value is specified."I plan to install sql server 2008 on another drive (D:\Microsoft Sql Server\).I'll try to set manually parameters (D:\Microsoft Sql Server\...) in the command-line arguments. FailAny hint from the team ?

SSIS Package returns the error - The command execution generated errors.

  
SSIS Package returns the error - 'The command execution generated errors'. Please let us know the cause for this error if anyone encountered this error before. Require a solution for this.   Thanks

A severe error occurred on the current command. The results, if any, should be discarded

  
I m using MOSS 2007 and sql server 2008n. when i expand the database from 100 GB to 500 GB, i get the following error message:- A severe error occurred on the current command.  The results, if any, should be discarded. Any idea about this error in sharepoint. I have found many articles but all are related to sql server only. There are some hot fixes available for same problem but don't know, which one is right for this problem. Any help would be appreciated. Cheers, Hemendra-MCTS "Yesterday is just a memory,Tomorrow we may never see"

SSIS Generic Error: The command execution has generated errors, more information?

  
How do I get more information from this error? I am just pulling from a csv file, looking up a couple values, and on match, updating a database with a stored procedure. I have made sure all datatypes match, and that there are no special characters in any of the records. I am importing over 3000 records, and only 4 fail, with this generic error, and I have scrutinized the data to the utmost. How do I get more information on this error? The lineageID is 0, what does that mean? In know it refers to a column, but 0 certainly doesnt relate to any columns. Thanks

A severe error occurred on the current command. The results, if any, should be discarded.

  
I am running this basic query on my database, this table has ~ 130k rows with around 10 columns.  I am running it in my management studio.  I restart my MSSQLSERVER and it worked again but I am afraid it will come back up, how can I debug this issue? SELECT * FROM Table1 Msg 0, Level 11, State 0, Line 0 A severe error occurred on the current command. The results, if any, should be discarded.  

A severe error occurred on the current command. The results, if any, should be discarded

  

Hi ppl,

I m using MOSS 2007 and sql server 2008 SP2. I increased  the database from 100 GB to 500 GB, after increased teh database size, i am getting following error message:-
A severe error occurred on the current command.  The results, if any, should be discarded.

I am having this issue with only with particular content database. I have checked some stored procedure and tables and i have found this error with 

"SP_GetCurrent" stored procedure and "dbo.EventCache" table.

Any idea about this error. There are some hot fixes available for same problem but when i am trying to install below hotfix on database server it is saying..

http://support.microsoft.com/kb/971490/en-us

"You have already install updated version". but i have not install any hotfix on server

Any idea about this error.


Cheers, Hemendra-MCTS "Yesterday is just a memory,Tomorrow we may never see"

ORDER BY clause causes 'A severe error occurred on the current command. The results, if any, shoul

  

Hello,

I'm trying to execute the following:

SELECT STATE_CODE5
  FROM qaeda.R727702b.NF29005
  WHERE STATE_CODE5 IN ('IL','NV','VA','NH','HI')
  InTERSECT
  SELECT STATE_CODE8
  FROM qaeda.r727702b.NF29008
  WHERE STATE_NAME8 = 'HAWAII'
 ORDER BY STATE_CODE5;

In both 2005 and 2008 versions of the SQL Server the query parses ok, but on execute I get the following error:

Msg 0, Level 11, State 0, Line 0
A severe error occurred on the current command.  The results, if any, should be discarded.

If I remove the the 'ORDER BY' clause, I am able to execute the query with no problem. 

I've searched the forum and I know this error comes up often in various circumstances, however I didn't see anything similar to this.  Please advise, maybe I'm writing the query incorrectly?  Thanks

 

 


Datagrid error Select Command

  

I am getting with this code so I assume what I am doing won't work

Here is the Code from the datagrid

SelectCommand="SELECT * FROM [location]WHERE LocationID = <%# getUserLocations.ToString() %> ORDER BY LocationName"></asp:SqlDataSource>

It is obvious what I am trying to do. Apprciate any suggestions

 

 


Memory error: Allocation failure : Not enough storage is available to process this command. .

  

Hi,

I get the error message above. Cube has 3 measure groups, 1 main fact and 2 many to many facts. Main fact has 450k rows, other two have 165 rows and 2200k rows. It also has 4 dimensions. Dimensions have max 10000 rows.

I get the errors when I add a "calculated" fact to the the main fact group, which is a distinct count on a key. When I remove that fact, the error is gone.

I am using sql 2005 enterprise with the latest sp's and patche on a windows 2003 server with 4GB 32 bit. Any ideas ?

Constantijn


Error Message "Not enough server storage is available to process this command" thrown when using Dia

  

I've been trying to make a library that uses the System.Diagnostics.PerformanceCounters to monitor perfmon on a variety of machines in C#. While the system seems to run fine, I've noticed after three weeks or so of polling that I just started receiving the error:

"Not enough server storage is available to process this command" on Windows Server 2003 machines

which the stack trace identifies as being from:

at System.Diagnostics.PerformanceMonitor.GetData(String item)
   at System.Diagnostics.PerformanceCounterLib.GetPerformanceData(String item)
   at System.Diagnostics.PerformanceCounterLib.get_CategoryTable()
   at System.Diagnostics.PerformanceCounterLib.GetCategories()
   at System.Diagnostics.PerformanceCounterLib.GetCategories(String machineName)
   at System.Diagnostics.PerformanceCounterCategory.GetCategories(String machineName)

 

The same error occurs when I try hitting System.Diagnostics.Process.GetProcesses().

 

I can "fix" the issue by restarting the Remote Registry, but it's not really a long term solution since I won't be able to do this going forward on all of the machines.

 

I've noticed that on the machines that fail, around the time the failure occurs, I start to see warnings in the

Error when attempting to Update Farm Credentials using stsadm command

  

 

When executing the following command

 

stsadm -o updatefarmcredentials -userlogin [login name] -password [password]

 

I get the following error

 

Error updating the administration application pool credentials.

 

Need help in updating my farm credentials and the only tool available generates a vague, non descript error.  Any help/suggestions would be appreciated.

 

As a result of not being able to update the credentials I get the error message that the service is unavailable when launching the SharePoint Configuration Database.


Syntax error adding a parameter to xp_cmdshell command

  

Hi,

I am trying to add a parameter to a bcp query that will be run in xp_cmdshell but am getting a syntax error at the '+' character.  Been staring at it for two hours and have concluded that  some outside help is needed. 

The command is:

EXEC xp_cmdshell 'bcp "SELECT * FROM [CensusData].[dbo].[Main] where zBarCode = ' + @zBarCode + '"  queryout "C:\temp_housing_data.txt" -T -c -t -S "MyServerName"'

The syntax is on the first '+' character and it simply says "Incorrect syntax near '+'"

Please help.


An error occurred while executing the command definition. See the inner exception for details.

  

Hello,

In my mvc asp.net application, I am getting error in edit function : in given code

public ActionResult Edit(int id)
{

     
var res = (from r in objeEntities.DocumentationsSet.Include("DocStatus")
               
where r.textid == id select r)
               
.First();
}

I am getting this exception:

  • Source : System.Data.Entity

    Stack Trace : at System.Data.EntityClient.EntityCommandDefinition.ExecuteStoreCommands(EntityCommand entityCommand, CommandBehavior behavior) at System.Data.Objects.Internal.ObjectQueryExecutionPlan.Ex

Error: Office 2003 SP3 "Command text was not set for the command object"

  

Hi

 

I have a customer who is using Office 2003 pivot tables against AS2000 cubes. Last week they upgraded to SP3 of Office and now we are getting "Command text was not set for the command object" when trying to refresh / manipulate the pivot tables. Applies to existing pivot tables as well as new ones we create. I found a few references to interesting experiences with SP3, but none that mention this error. We know the cubes are OK because we can use pivot tables against them from another (server) machine that escaped the upgrade. Currently trying to prove or disprove that it was the upgrade specifically that caused the problem.

 

Has anyone else bumped into something like this? Found a way around it?

 

Thanks in advance


Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend