2012年2月25日星期六

BCP copy in failed...The SQL Server cannot obtain a LOCK resource

I have 2 identical databases (DB1, DB2) in SQL Server 2000 (OS:
Windows 2003 with SP1). I want to copy some data from DB1 to DB2 with
BCP.
I BCP out the data to the data files no problem with the following
command:
bcp "SELECT * FROM DB1.dbo.Table1 WHERE id>=587738400000000000"
queryout Table1.dat -n -Usa -Ppass -Shost -eTable1_out_error.txt
However, I failed to BCP in the data to the database with this
command:
--
bcp DB2.dbo.Table1 in Table1.dat -n -Usa -Ppass -Shost -
eTable1_in_error.txt
--
Here is the error message:
--
<SKIP>
1000 rows sent to SQL Server. Total sent: 141497000
SQLState = S1000, NativeError = 1204
Error = [Microsoft][ODBC SQL Server Driver][SQL Server]The SQL S
erver
cannot obtain a LOCK resource at this time. Rerun your statement when
there are fewer active users or ask the system administrator to check
the SQL Server lock and memory configuration.
BCP copy in failed
--
The error files "Table1_out_error.txt" and "Table1_in_error.txt" are
empty.
I had used BCP to copy similar (type and among of) data to an Oracle
database without any problem in the same server. Am I messing
something here?
Any help will be highly appreciated.
HelenOn Jul 5, 9:31 am, hele...@.gmail.com wrote:
> I have 2 identical databases (DB1, DB2) in SQL Server 2000 (OS:
> Windows 2003 with SP1). I want to copy some data from DB1 to DB2 with
> BCP.
> I BCP out the data to the data files no problem with the following
> command:
> bcp "SELECT * FROM DB1.dbo.Table1 WHERE id>=587738400000000000"
> queryout Table1.dat -n -Usa -Ppass -Shost -eTable1_out_error.txt
> However, I failed to BCP in the data to the database with this
> command:
> --
> bcp DB2.dbo.Table1 in Table1.dat -n -Usa -Ppass -Shost -
> eTable1_in_error.txt
> --
> Here is the error message:
> --
> <SKIP>
> 1000 rows sent to SQL Server. Total sent: 141497000
> SQLState = S1000, NativeError = 1204
> Error = [Microsoft][ODBC SQL Server Driver][SQL Server]The SQL
Server
> cannot obtain a LOCK resource at this time. Rerun your statement when
> there are fewer active users or ask the system administrator to check
> the SQL Server lock and memory configuration.
> BCP copy in failed
> --
> The error files "Table1_out_error.txt" and "Table1_in_error.txt" are
> empty.
> I had used BCP to copy similar (type and among of) data to an Oracle
> database without any problem in the same server. Am I messing
> something here?
> Any help will be highly appreciated.
> Helen
Your server is running out of memory either because of your actions or
because of someone else's actions.
use sp_lock to check who is doing it .
Cheers,

没有评论:

发表评论