Can I close DataReader using T-SQL commands in SQL Server Management Studio 2005
Posted on 2011-10-12
I have a job that runs every night that executes SQL commands to import data from a flat text file to a table in my database (after truncating the file). For some reason, it appeared to get stuck last night. I went to the Job Activity Monitor and stopped the job (which I probably shouldn't have done). I want to try to import the data again, but it appears the table is "locked." If I try to open the table, I get an error message that says "Lock request time out period exceeded." If I look at the table properties using Mgmt Studio, it takes a while to bring them up, then several of the properties say "There is already an open DataReader associated with this Command that must be closed first." Is there a way to close the datareader? Do I have to just delete the table and start over?