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

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

bcp queryout using $PARTITION fails with Native Client error: Invalid Object $PARTITION

Posted By:      Posted Date: October 05, 2010    Points: 0   Category :Sql Server

Using bcp queryout, in-line queries of the following form fail with the invalid object error on the $PARTITION keyword:

bcp "SELECT S.* FROM Support_Prod.ADSK.Session S INNER JOIN ##Session #S ON (S.SessionId = #S.SessionId AND S.LastInquiryId = #S.LastInquiryId AND $PARTITION.AdskInqPF(S.LastInquiryId) = $PARTITION.AdskInqPF(#S.LastInquiryId))" queryout I:\Data2\AdskBCPout\ADSK.Session.dat -fI:\Data2\AdskBCPout\ADSK.Session.format.xml -q -t\t -r\n -SINTDEVSQL1\DEV1 -T

Here, AdskInqPF is a well-formed partition function used to partition Support_Prod.ADSK.Session.  ##Session is a table of semi-joins derived from the former, but is not partitioned.  LastInquiryID is the partitioning key on the Session entity.

The resulting error is:

SQLState = S0002, NativeError = 208
Error = [Microsoft][SQL Server Native Client 10.0][SQL Server]Invalid object name '$partition.AdskInqPF'.
SQLState = S0002, NativeError = 208
Error = [Microsoft][SQL Server Native Client 10.0][SQL Server]Invalid object name '$partition.AdskInqPF'.
SQLState = 37000, NativeError = 8180
Error = [Microsoft][SQL Server Native Client 10.0][SQL Server]Statement(s) could not be prepared.

The platform is SQL Server 2008 SP1 and the bcp is

BCP - Bulk Copy Program for Microsoft SQL Server.
Copyright (C) Microsoft Corporation. A

View Complete Post

More Related Resource Links

Install SQL Server2005 Error:[Native Client]Encryption not supported on the client

Product: Microsoft SQL Server 2005 -- Error 29515. SQL Server Setup could not connect to the database service for server configuration. The error was: [Microsoft][SQL Native Client]Encryption not supported on the client. Refer to server error logs and setup logs for more information. For details on how to view setup logs, see "How to View Setup Log Files" in SQL Server Books Online.

Invalid object error on temp table on a particular environment

Hi, I am using a temp table in my sp. I have written the following tsql before and after using the temp table. IF OBJECT_ID('tempdb..##TEMP') IS NOT NULL DROP TABLE tempdb..##TEMP; Data will be inserted to the temp table consecutively using a cursor. I use SELECT * INTO tempdb..##TEMP FROM EXEC('query') to fill this temp table for the first time and INSERT INTO tempdb..##TEMP(<fields>) EXEC('query') for the remaining times. The SP is working fine in my laptop, but I am getting an Invalid Object error on this temp table name in the production server. Could anyone tell me the possible causes please? Thanks Sree

Requested Conversion is not supported, error while processing the partition

I have read the other topics that are related this issue and I thought that my issue was related as well until I checked the datatypes of all my measures and made sure that they indeed could be inherited properly.   I even went as far as deleting all measures out the measure group and I still recieved this error.   Is there a way I get more detailed information on what is not being converted properly?  The error is so vague and again, I have thouroughly checked my datatypes and they are fine and why would the partition not process, throwing me the exact same error when I decided to take out all measures in the measure group.   Here the second strange thing, I know that it has to be data related because I also ran the process structure and that finished with success. Please let me know if there is a better way to find the problem child or problem children pertaining to my measure group when processing data Here is a last thought, do you think that it could have something to do with the datasize?  I know SSAS automatically converts the datasize and I see several in my measures that have a zero for the size, I am speculating that could be wrong but is there a way I can check the datasize by running the script on my fact table?   ThanksNetwork Analyst

SQL Server Native Client install fails during prerequisites

Hi I'm trying to install sharepoint 2010 on a new windows 2k8r2 which is a member server on our domain. The server is fully updated. The SQL Server native client installation fails. This is the entry in the error log;   2010-09-15 08:57:26 - Beginning download of Microsoft SQL Server 2008 Native Client 2010-09-15 08:57:26 - http://go.microsoft.com/fwlink/?LinkID=160387 2010-09-15 08:57:28 - Size of download of "Microsoft SQL Server 2008 Native Client" in bytes is "8073728" 2010-09-15 08:57:28 - Download of "Microsoft SQL Server 2008 Native Client" completed successfully 2010-09-15 08:57:28 - Installing Microsoft SQL Server 2008 Native Client 2010-09-15 08:57:28 - "C:\Windows\system32\msiexec.exe" /i "C:\Users\myadmin\AppData\Local\Temp\SQLCF11.tmp.msi" /quiet /norestart 2010-09-15 08:57:28 - Install process returned (0X660=1632) 2010-09-15 08:57:28 - [In HRESULT format] (0X80070660=-2147023264)   If I run the SQL native client installer manually I get the following error; The installer has encountered an unexpected error. The error code is 2755. Server returned unexpected error 1632 attempting to install package.   Any ideas why this is happening? I've had a quick google and can't see anything for SQL Native Client for that error code. Thanks   Olly

Opening a PowerPoint presentation fails with error "invalid path or file name".

When you go to a Document Library and try to open the presentation, PowerPoint opens, but then you get the error "The path or file name for "file URL" is invalid.  Please check that the path and file name are correct."I installed MOSS/WSS SP2 about 2 weeks ago, this happened once or twice before then, but I now know of about a half-dozen presentations that won't open.There is a way to get the file to open, if you hit the drop-down next to the file and select Send To and Download a Copy, you can save or open it from there.If you try browsing to if from within PowerPoint, it won't open either, and will also not open in Explorer View.  We have replaced the file, saved as a different name, etc. with no luck.Using both IE 7 and IE 8 and both XP Pro and Vista Business workstations.Any ideas out there?Thanks,Rusty

Invalid object name error


Hi Experts,

I create a simple controw flow task with the following code:

UPDATE Production.Product

SET ProductLine = 's'


when i insert the SQL task object into a Sequence container and run the debugger i get the following error: "failed with the following error: invalid object  name Production.Product".

Can anyone tell me what im doing wrong?


Web service's method GetListItems fails with error "'_', hexadecimal value 0x0B, is an invalid ch


We are developing ASP.NET web application that interacts with SharePoint via web services. At some our customers' systems we encountered the following problem.
Web method GetListItems throws an exception :
 ' ', hexadecimal value 0x0B, is an invalid character. Line 42, position 31.

Stack trace of exception you can see below:
   at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)
   at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle)
   at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
   at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
   at ITSMS.DAL.SPLists.Lists.GetListItems(String listName, String viewName, XmlNode query, XmlNode viewFields, String rowLimit, XmlNode queryOptions, String webID)

INNER MESSAGE: ' ', hexadecimal value 0x0B, is an invalid character. Line 42, position 31.

   at System.Xml.XmlTextReaderImpl.Throw(Exception e)
   at System.Xml.XmlTextReaderImpl.Throw(St

SQL Server 2008 - Alter Table Switch Statement Fails Where Partition Key Defined as a Persisted Comp


Here's a very annoying and poorly (or undocumented) issue in SQL Server 2008 Ent. Ed. post-SP1, CU8:

When creating a table with a persisted computed column as the clustered primary and partitioning key (see below), where the computation includes a call to CONVERT, watch out for the representation of this calculation on sys.computed_columns.  The query parser will modify the definition at table creation to insert a default style parameter of "(0)", if no other style is specified.  If the original definition did not include any style parameter and you later attempt to programmatically recreate the table using the stored definition contained on sys.computed_columns, the query optimizer will throw an error when you then attempt to switch partitions from the original table into the new programmatically created table, as follows:

Msg 4966, Level 16, State 1, Line 72

ALTER TABLE SWITCH statement failed. Computed column '%' defined as '%' in table %' is different from the same column in table %' defined as '%'.

This is so, eventhough the two definitions are completely functionally equivalent, considering the default value of the style parameter.  This can cause a lot of headaches, because correcting the problem requires dropping and rebuilding the computed column with a definition that include

(401) Unauthorized Error working with Client Object Model


Hi All,

I'm tryiing to retrieve a list of document libraries from a sharepoint site, here is my code, this is a windows app
  public string[] GetDocumentLibraries(string siteUrl)
            Collection<string> libraries = new Collection<string>();
                //Creating the client context object, establishing the connection from the client to the remote SharePoint site
                ClientContext ctx = new ClientContext(siteUrl);

                //Authetication on SP site
                string user = ConfigurationManager.AppSettings["user"];
                string password = ConfigurationManager.AppSettings["password"];

[Microsoft][SQL Server Native Client 10.0]Shared Memory Provider: Timeout error [258]


Hello All,

I am using MS SQL SERVER 2008. Im making an application which queries trillion of records. Im using PHP as scripting language. For those functions , which query database and 200 (approximately) rows of DB are returned, everything works fine. But if I query database and a large recordset should be returned, the following error is thrown:

Array ( [0] => Array ( [0] => 08S01 [SQLSTATE] => 08S01 [1] => 258

=> 258 [2] => [Microsoft][SQL Server Native Client 10.0]Shared Memory Provider: Timeout error [258]. [message] => [Microsoft][SQL Server Native Client 10.0]Shared Memory Provider: Timeout error [258]. ) [1] => Array ( [0] => 08S01 [SQLSTATE] => 08S01 [1] => 258
=> 258 [2] => [Microsoft][SQL Server Native Client 10.0]Communication link failure [message] => [Microsoft][SQL Server Native Client 10.0]Communication link failure ) [2] => Array ( [0] => 08S01 [SQLSTATE] => 08S01 [1] => -2147467259
=> -2147467259 [2] => [Microsoft][SQL Server Native Client 10.0]Communication link failure [message] => [Microsoft][SQL Server Native Client 10.0]Communication link failure ) )

If I see the error log it shows:

2010-10-17 12:32:38.88 Logon       Error: 18456, Severity: 14, State: 8.

2010-10-17 12

Error when using Client object model in Sand box solutions


Me created a web part using sandboxed solution

And used share point Client object model (.net managed COM) to access a list which is there in another site collection,

Getting error as follows:

Web Part Error: Unhandled exception was thrown by the sandboxed code wrapper's Execute method in the partial trust app domain: An unexpected error has occurred. 

Is it possible to get data from other site collection in same web application using sharepoint client object model?

Client object Model partial trust error


HELLO  i have a sandbox solution webpart and i,m trying to execute below code in button click

 ClientContext CC = new ClientContext(SPContext.Current.Web.Url);
        List MyDiscussionList = CC.Web.Lists.GetById(new Guid("30F27722-C0DC-4CF6-9D42-43DE5747DD8F"));
        CamlQuery Qry = CamlQuery.CreateAllFoldersQuery();
        Qry.ViewXml = "<View><Query><Where><Eq><FieldRef Name='Title'/><Value Type='Text'>" + DiscussionName + "</Value></Eq></Where></Query></View>";
        Microsoft.SharePoint.Client.ListItemCollection LstCollection = MyDiscussionList.GetItems(Qry);

but when it gives exception of partial trust error

Unhandled exception was thrown by the sandboxed code wrapper's Execute method in the partial trust app domain: An unexpected error has occurred.

can i execute client object model code through sandbox?



Using the Client Object Model to read values from Excel file produces 504 error



I use the Client Object Model to retrieve and read values from an Excel file. This is triggered in an Event Receiver on the Document Library where the Excel file lives. I use a simple CAML Query to retrieve the file. This has worked just fine on a dev/test server. 
Now, I just recently deployed this solution to a production/live server and now this code doesn't work anymore. I get an error saying 'The remote server returned an error: (504) Gateway Timeout'. This happnes when I try clientContext.ExecuteQuery();

The difference between the two servers is that on the test server (where it works) the solution is sitting as the root site, so to speak. No host headers or nothing.
On the live server, there are several web applications (SharePoint) on the same port, but with different host headers.

I have tried to trace a little bit and I found that on the test server, the url that is used to create the ClientContext object is 'http://<servername>/<webname>'. The url is comes from the following code: web.Url. I tried changing the url to the DNS name the test server has and that resulted in the same error as on the live server.

Does anyone have any idea what I need to do?

Thanks a billion!

Jscript error: Object does not support property or method


 Hi, i have little knowledge on javascript but i need to use this code get from somewhere for a jquery to work.

I face this "Jscript runtime error: Object does not support property or method" whenever im trying to run this page.

In my experience, im get this error msg 9 out of 10 times i use javascript in my system.

Im using Microsoft Visual web developer 2008, i wonder if this is related to my problem, i not sure there is anything i need to add as reference or update anything.

But anyway, in short, i just couldn't use javascript code when using this development tool because of this sort of error.

Anyway, it happen that last time i tried use the same type of jquery code in another project and it seems to work well without an error.

But now when im try to use it again in this recent project i created, it come out with this error and i have no idea how to solve it even look through google and this forum.

It doesn't really seems like its the code problem itself although im not sure, because any javascript code just couldn't work.

So below is my code that i need to use.

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" ></script>
<script type="text/javascript" src=&quo

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)

Registering controls of current assembly object reference NOT set error


Hi There,

I have created a simple ASP.net Web Application (2.0) and have added a web user control.

Now in my page I have added this control but I have registered like this,

<%@ Register Assembly="WebApplication1" Namespace="WebApplication1" TagPrefix="Custom" %>

Which means I want to access all the controls in my current Web Application project

Then I have added my user control like this,

<Custom:MyUserControl ID="MyUserControl1" runat="server" PublicProperty="Hello" />

Every thing is fine but when I execute the project, NO control on my user control gets "instantiated" and thus I receive error "Object Reference Not Set"

Note that My Control has,

1) Public property PublicProperty as String

2) 1 Label control

In Load Event Handler I am setting Text property of Label Control to PublicProperty. Here object reference NOT set error occurs (which means Label control is NOT initialized).

I don't want to register my control using Src, TagPrefix etc. Any ideas?


.NET Exceptions: Make the Transition from Traditional Visual Basic Error Handling to the Object-Orie


If you're used to Visual Basic 6.0 and you're making the transition to Microsoft .NET, you will find that error handling is quite different from what you've used for years. Visual Basic .NET uses a more object-oriented solution to signaling and responding to unexpected problems while your program is running. This approach, called structured exception handling, has a number of advantages over the On Error statements provided in previous versions of Visual Basic. For instance, exceptions give you lots more information about exactly what went wrong in your app. To help you take advantage of this modern error handling paradigm, this article will show you how to raise and respond to exceptions, as well as how to create your own custom exception classes.

Jesse Liberty

MSDN Magazine November 2002

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