Troubleshoot BCP errors
bcp.exe or bcp.rll file not found in OpManager_Home/bin folder
- Copy the bcp.exe and the bcp.rll files from the binn/ folder in MSSQL installed location and paste it in the OpManager_Home/bin/ folder.
- If there is more than one bcp.exe file, keep the version suitable for MSSQL and delete older versions.
(Hint: Open command prompt and execute "bcp.exe -v" command in OpManager_Home/bin/ folder to get the version of bcp.exe.)
BCP Login Failure
- Make sure the MSSQL server password does not contain special characters like ‘;’.
- Update the correct MSSQL Username and Password in OpManager/NetFlow Analyzer by executing DBConfiguration.bat in OpManager_Home/bin/ folder.
Steps for DBConfiguration.bat:
- Stop OpManager service.
- Open command prompt and execute DBConfiguration.bat in OpManager_Home/bin/ folder.
- Enter the correct authentication User Name and Password.
- If you wish to use the same database for data storage. Enter the same database name you want to use in Database Name field and click OK. A prompt opens whether you wish to use the same database, press OK.
If you wish to create a new database for data storage. Enter the new database name you want to create and press OK.
- When DBConfiguration is completed, start the OpManager service.
BCP and MSSQL server version mismatch
- Copy the bcp.exe and the bcp.rll files of same version as MSSQL from the binn/ folder in MSSQL installed location and paste it in the OpManager_Home/bin/ folder.
(Hint: Open command prompt and execute "bcp.exe -v" command in OpManager_Home/bin/ folder to get the version of bcp.exe. You can check the MSSQL version executing the query "SELECT SERVERPROPERTY('productversion') as 'Version'" or go to SQL Server Management Studio and right click on the instance name and select the Properties)
- If Microsoft Native client is installed, check whether the version of Microsoft Native client matches the MSSQL version.
BCP login timeout
- In Object Explorer, right-click a server and select Properties.
- Click the Connections node.
- In the Remote query timeout box under Remote server connections, type or select a value from 0 through 2,147,483,647 in seconds, to set the maximum time for SQL Server to wait before timing out.
Compatibility and other common troubleshooting options for bcp:
- 1. Check the file permission for bcp.exe in the antivirus and allow permissions for bcp.exe.
- When the MSSQL server is hosted in the local system, change the MSSQL server name to the system name.
- When the user(Windows/MSSQL) does not have permission to execute bcp file, make sure your ODBC connection uses SQL Server Authentication. BCP will not start if you use only Windows authentication without also using SQL Server authentication.
- Examine the ODBCBCP.dll file and SQLSRV32.dll file. These files must be of the same version. If they are of different versions, rename the SQLSRV32.dll file, and then reinstall MDAC(ODBC). The ODBCBCP.dll and SQLSRV32.dll files are located in the WINNT\System32 folder. The version numbers of these files must be the same.
- If the MSSQL server is installed in a remote server and native client is not installed in the local System, install the native client suitable for the MSSQL server in the local system.
Installing Native Client:
Download the SQL Native Client from the link below. You will need to scroll down the page for the Native Client downloads:
Microsoft SQL Server 2008 R2 Native Client (SQL Server Native Client) is a single dynamic-link library (DLL) containing both the SQL OLE DB provider and SQL ODBC driver. It contains run-time support for applications using native-code APIs (ODBC, OLE DB and ADO) to connect to Microsoft SQL Server 2000, 2005, or 2008. SQL Server Native Client should be used to create new applications or enhance existing applications that need to take advantage of new SQL Server 2008 R2 features. This redistributable installer for SQL Server Native Client installs the client components needed during run time to take advantage of new SQL Server 2008 R2 features, and optionally installs the header files needed to develop an application that uses the SQL Server Native Client API.
X86 Package (sqlncli.msi) X64 Package (sqlncli.msi) IA64 Package (sqlncli.msi)
For more details on installing the native client, refer this site: http://msdn.microsoft.com/en-us/library/ms131321.aspx
- If error message says "msvcr120.dll ,msodbcsql13.dll files are missing" when executing bcp.exe in OpManager_Home/bin/ folder, it may be due to two reasons.
- Missing Visual C++ Redistributable Packages for Visual Studio: In this case install Visual C++ Redistributable Packages for Visual Studio from here.
- Missing Microsoft® ODBC Driver for SQL Server®: In this case install Microsoft® ODBC Driver for SQL Server® from here.
- If the bcp issue still persists,
- Open command prompt and execute bcp.exe in OpManager_Home/bin/ folder and take a screenshot of the output.
- Contact firstname.lastname@example.org with the taken screenshot to resolve the issue.
MSSQL server transaction Log is Full
- Connect to the MSSQL database and right click on the database name.
- Click on properties, and under options select the Recovery Mode as Simple.
- Right Click the database name and select Tasks > Shrink > Files Then Click OK to compress.