bcp text file with "" identifiers 
Author Message
 bcp text file with "" identifiers

I'm trying to use bcp to copy a comma delimited text file with ""
identifiers.  My problem is this.

The instance of sqlserver is on my D: drive and the database is on my
G: drive.  This is what I have:

d:\MSSQL$MYINSTANCE>bcp g:\mydata\MyDB..MyTable in a:\Mytextfile.txt
-n -t"," -m50 -hTABLOCK -T

I'm getting "Cannot open database requested in login 'g:\mydata\MyDB'.
Login fails.

I've tried using "-SMyServer/MSSQL$MYINSTANCE" with this but come up
with "Server cannot be found.

Any suggestions will be GREATLY appreciated.  The text file has over 1
million records and this is the only way I know of uploading it to
SQL.

Thanks in advance.



Sat, 15 May 2004 04:33:19 GMT
 bcp text file with "" identifiers

Cheryl,
if 'G:\' is a networkdrive, you have to start your
instance of mssqlserver with an account that has
permission to access this network drive. default is
'system' that only can access local drives.
you can change this in the settings...services or from
within enetrprisemanager if you rightclick on your
serverregistration and choose 'properties', then click the
'security' tab.
good luck

      Robert



Sat, 15 May 2004 05:14:34 GMT
 bcp text file with "" identifiers
Don't specify the SQL Server file name; SQL Server already knows where the
database files are.  For example:

bcp MyDB..MyTable in
a:\Mytextfile.txt -n -t"," -m50 -hTABLOCK -T -SMyServer/MYINSTANCE

--
Hope this helps.

-----------------------
SQL FAQ links (courtesy  Neil Pike):

http://www.ntfaq.com/Articles/Index.cfm?DepartmentID=800
http://www.sqlserverfaq.com
http://www.mssqlserver.com/faq
-----------------------


Quote:
> I'm trying to use bcp to copy a comma delimited text file with ""
> identifiers.  My problem is this.

> The instance of sqlserver is on my D: drive and the database is on my
> G: drive.  This is what I have:

> d:\MSSQL$MYINSTANCE>bcp g:\mydata\MyDB..MyTable in a:\Mytextfile.txt
> -n -t"," -m50 -hTABLOCK -T

> I'm getting "Cannot open database requested in login 'g:\mydata\MyDB'.
> Login fails.

> I've tried using "-SMyServer/MSSQL$MYINSTANCE" with this but come up
> with "Server cannot be found.

> Any suggestions will be GREATLY appreciated.  The text file has over 1
> million records and this is the only way I know of uploading it to
> SQL.

> Thanks in advance.



Sat, 15 May 2004 05:15:49 GMT
 bcp text file with "" identifiers
The security on the registration is set to a windows NT login.  I
tried the bcp without the g:\mydata before the database and still no
luck.

Am I supposed to do the bcp from a specific directory?  When I try to
use
"-SMyServer/MYINSTANCE" it says Server not found or access denied.
When I use
"-Udomain/login -Ppassword" it say not a trusted SQL Server
connection.  Then I use the -T and it says Cannot open database
requested in login 'database name'.

I'm stuck!  Please help.

Thanks again.

Quote:

> I'm trying to use bcp to copy a comma delimited text file with ""
> identifiers.  My problem is this.

> The instance of sqlserver is on my D: drive and the database is on my
> G: drive.  This is what I have:

> d:\MSSQL$MYINSTANCE>bcp g:\mydata\MyDB..MyTable in a:\Mytextfile.txt
> -n -t"," -m50 -hTABLOCK -T

> I'm getting "Cannot open database requested in login 'g:\mydata\MyDB'.
> Login fails.

> I've tried using "-SMyServer/MSSQL$MYINSTANCE" with this but come up
> with "Server cannot be found.

> Any suggestions will be GREATLY appreciated.  The text file has over 1
> million records and this is the only way I know of uploading it to
> SQL.

> Thanks in advance.



Sat, 15 May 2004 23:05:35 GMT
 
 [ 4 post ] 

 Relevant Pages 

1. BCP lockup with multiple "text" columns

2. BCP - text qualifiers ""

3. max of ("...","...","..")

4. Exporting text file "problem/limitation"?

5. ORA-00972 "Identifier is too long"

6. DAO Text File "Import" Problems

7. No ,"", on NULL field in db.Text file

8. "Invalid Attribute/ Option Identifier" Error

9. HELP: error C2065 "ERROR" undeclared identifier

10. "function sequence error" with BCP

11. "master..xp_cmdshell" and BCP ODBC error

12. BCP Problems "String data, right truncation"


 
Powered by phpBB® Forum Software