Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Tempdb tables
Message
De
11/01/2013 09:18:15
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
11/01/2013 07:54:09
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Titre:
Divers
Thread ID:
01562112
Message ID:
01562134
Vues:
25
>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

Tempdb doesn't really have the tables you think it has. They are named differently - last time I checked (which may have been in SQL 2000) their names are padded with underscores, and on the right your ID or something is inserted. The names you see are translated into these, which is the way the temp tables are made private to your connection. You see aliases which nobody else does, as if you heard voices nobody else does (which is no madness nor magic, just a headset).

Mind you, this was a one-time observation, not based on documentation of any kind.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform