Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Tempdb tables
Message
 
 
To
11/01/2013 08:54:03
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Title:
Miscellaneous
Thread ID:
01562112
Message ID:
01562131
Views:
31
>>>Can anyone think of a reason that
>>>
>>>exec master..xp_cmdshell 'bcp "select * from tempdb.dbo.webdata_donation_report" queryout "C:\temp-data\data_file.xls" -c -t\t -T'
>>>
>>>works ok on one instance of sql server but not on another.
>>>
>>> the table tempdb.dbo.webdata_donation_report exists on both servers but one server gives an error
>>>
>>>SQLState = 42S02, NativeError = 208
>>>Error = [Microsoft][SQL Native Client][SQL Server]Invalid object name 'tempdb.dbo.webdata_donation_report'.
>>>SQLState = 42000, NativeError = 8180
>>>Error = [Microsoft][SQL Native Client][SQL Server]Statement(s) could not be prepared.
>>>NULL
>>>
>>>the other server finds the data
>>>
>>>NULL
>>>Starting copy...
>>>NULL
>>>3 rows copied.
>>>Network packet size (bytes): 4096
>>>Clock Time (ms.) Total : 1 Average : (3000.00 rows per sec.)
>>>NULL
>>>
>>>Thanks
>>
>>Do you spell the name of the table exactly including casing? Just ruling out possibility of case sensitive collation of tempdb
>
>Hi Naomi
>
>no the case is the same I did check that.
>
>On further investigation on one server none of the tables in tempdb can be accessed by the select. On the other server any tables in tempdb can.

You need to check permissions on the account execution the package to the Tempdb.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform