Re: bcp invalid object name



Hi Mike

A full object qualification is database_name.object_owner.object

What is xxxxx?

You need to have the owner in between the db and the object, so if the user
dbo is the owner, you would specify as:

FASTECHTIME.dbo.EmpEvals

or, since dbo is one of the default owners, you can leave it out, but you
still need the two dots:

FASTECHTIME..EmpEvals

--
HTH
Kalen Delaney, SQL Server MVP


"Mike" <mavila@xxxxxxxxxxxxxxxxx> wrote in message
news:OyTDWkgmGHA.2204@xxxxxxxxxxxxxxxxxxxxxxx
I have a bcp command

bcp xxxxx.FASTECHTIME.EmpEvals out
C:\EmpEvalsDue.txt -STime -Uxxxxx -Pxxxxxxxxxxx

for which I receive the error

SQLState = 37000, NativeError = 4060
Error = [Microsoft][ODBC SQL Server Driver][SQL Server]Cannot open
database requested in login 'xxxxx'. Login fails.

The other error I get is

SQLState = S0002, NativeError = 208
Error = [Microsoft][ODBC SQL Server Driver][SQL Server]Invalid object name
'FASTECHTIME.EmpEvals'.

The server is Time, the database is FASTECHTIME, and the table is
EmpEvals.

What is the proper way to code access to the object? I have tried

EmpEvals
FASTECHTIME.EmpEvals
xxxxx.FASTECHTIME.EmpEvals


TIA.

Mike





.



Relevant Pages

  • Re: ADP: Cant use stored procedure on remote SQL server
    ... Not only I use dbo everywhere but I ... If you don't mention the owner when creating a new stored procedure, view, ... BTW in the database window, all the stored procedures are followed by ... Check also the owner of the SPInc stored procedure. ...
    (microsoft.public.access.adp.sqlserver)
  • Re: dbackupoperators
    ... EXECUTE permission denied on object 'xp_availablemedia', database 'master', ... owner 'dbo'. ... > Tibor Karaszi, SQL Server MVP ...
    (microsoft.public.sqlserver.server)
  • Re: rda push when owner is not dbo.
    ... If I launch the sql query analyzewr and try to run the ... I'm pretty configdent that the owner name not being qualified is the ... > I pull the table with rda to a local table named task. ... > I also created a test table in the same database with owner dbo and I ...
    (microsoft.public.sqlserver.ce)
  • Re: Question about dropping owners permissions...
    ... When a member of the db_owner role creates an object, ... dbo, must the owner must be specified: ... >>> create databases themselves. ... Can anyone help me reach my end goal: Allowing developers to ...
    (microsoft.public.sqlserver.security)
  • Re: not creating tables as dbo anymore ?
    ... Database Owner (dbo) ... existing user ID in the database specified by database_name. ... with the login of the current connection. ...
    (microsoft.public.sqlserver.security)