cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Help us improve the PTC Community by taking this short Community Survey! X

SQLImport - Runbcp error

SB_9897546
3-Visitor

SQLImport - Runbcp error

I am importing a database provided by our program's modeling team to PTC Windchill Modeler 9.3. They have provided a .zip of the database modules using the method of the enabler export tool. When I attempt to import using sqlimport.exe in the cmd prompt with admin privileges, I am getting 2 errors in the log after database creation and import setup has ended. I am open to other suggestions or arguments to attempt resolving this db import issue.

Thank you!

 

Input with arguments as PTC documentation suggests:

>sqlimport "C:\location of file\dbfile.zip" "<Machine-Name>\<SQL-Instance>" "<Database-Name>"

 

The first errors, I believe, shouldn't impede the import because the user accounts don't match the source PTC Windchill system (it was failing in creating logins that don't exist on this system, but still reported, "Migration User/Groups completed." in the log file.

 

The other issue; however, is an error with executing bcp/runbcp not finding the file specified, objects.csv. Which is bizarre because it is being provided in the TEMP location, but appears to be removed when the executable gets to this point because I was able to locate the reported missing file, object.csv, when the temp folder,enabexp, is created.

 

1st Error:
DB Import environment setup Ended.
12:06:04 Thursday, December 07, 2023| Import Started.
Failed to create login for: (domain\ACCOUNT)
Session Last Error:7024 - Windows NT user or group not found.

... repeated for multiple accounts....


2nd Error:
Migration User/Groups completed.
Import(). Enter.
Source Location EnablerATF Path: C:\Users\ADMIN\AppData\Local\Temp\enabexp\EnablerATF\DATABASE
Import Location EnablerATF Path: \\SERVER\ModelerATF\DATABASE
GetFormatFileName() Enter.
RunBCP() Enter.
RunBCP() Exit.
RunCommand() Enter.
Command to execute :
"bcp" "DATABASE.dbo.Object" in "C:\Users\ADMIN\AppData\Local\Temp\enabexp\objects.csv" -b 1000 -q -e "C:\Users\ADMIN\AppData\Local\Temp\ObjectErrors.Log" -E -T -S "SERVER" -f "C:\Users\ADMIN\AppData\Local\Temp\enabexp\Object.fmt" -h "TABLOCK, CHECK_CONSTRAINTS" -C RAW
The system cannot find the file specified.


BCP import failed for -
objects.csv
RunAllBCPCmd fails.
Cannot Import DB.
12:17:25 Thursday, December 07, 2023| Import Failed.

 

1 REPLY 1

The first error can be ignored. Please refer to article CS303370 ;

 

The second error is unknow. It is related to objects.csv

What is in the C:\Users\ADMIN\AppData\Local\Temp\ObjectErrors.Log ?

 

You said the access permissions are ok, then

  • Ensure the objects.csv is not open by another user.
  • Objects.csv contains characters you can read then
    • Is there any special characters that could prevent the BCP import?
    • It could be an interference with an antivirus.
Top Tags