Yeah, the number of locks is dynamically set based on how much memory is
available. So, I could set it higher, but you're right my system we really
get slow and it could really screw things up by using up all my disk space
or something. I'm getting a new pc in a week. So, I'll try it again on that
one.
Here's an article that hints at the solution 3 posts down, i think:
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1641381&SiteID=1
As for the identity_insert . I had to turn off identity insert because it
said that an explicit value for the identity column wasn't specified. I
didn't check the actual data being inserted. But it worked after that. So, I
assume that for some reason it thought sql server would create the identity
values for it. Here is some of the output just before and after the error:
* FLUSHING AkasMoviesCache...
EXECUTING "AFTER_AKAMOVIES_TODB:SET IDENTITY_INSERT %(table)s OFF;"...
EXECUTING "SET IDENTITY_INSERT aka_title OFF;"... DONE!
SCANNING italian aka titles: Sarafina! Il profumo della libertà (1992)
SCANNING german aka titles: Heiße Girls mit Straps und Knarre (1993)
SCANNING iso aka titles: Murió Hace Quince Años (1954)
EXECUTING "BEFORE_MOVIES_TODB:SET IDENTITY_INSERT %(table)s ON;"...
EXECUTING "SET IDENTITY_INSERT title ON;"... DONE!
EXECUTING "AFTER_MOVIES_TODB:SET IDENTITY_INSERT %(table)s OFF;"...
EXECUTING "SET IDENTITY_INSERT title OFF;"... DONE!
EXECUTING "BEFORE_AKAMOVIES_TODB:SET IDENTITY_INSERT %(table)s ON;"...
EXECUTING "SET IDENTITY_INSERT aka_title ON;"... DONE!
* FLUSHING AkasMoviesCache...
EXECUTING "AFTER_AKAMOVIES_TODB:SET IDENTITY_INSERT %(table)s OFF;"...
EXECUTING "SET IDENTITY_INSERT aka_title OFF;"... DONE!
# TIME doAkaTitles() : 4 min, 41 sec.
SCANNING alternate versions: 0361140
EXECUTING "BEFORE_MOVIES_TODB:SET IDENTITY_INSERT %(table)s ON;"...
EXECUTING "SET IDENTITY_INSERT title ON;"... DONE!
EXECUTING "AFTER_MOVIES_TODB:SET IDENTITY_INSERT %(table)s OFF;"...
EXECUTING "SET IDENTITY_INSERT title OFF;"... DONE!
EXECUTING "BEFORE_SQLDATA_TODB:SET IDENTITY_INSERT %(table)s ON;"...
EXECUTING "SET IDENTITY_INSERT movie_info ON;"... DONE!
* FLUSHING SQLData...
Traceback (most recent call last):
File "imdbpy2sql.py", line 1977, in <module>
run()
File "imdbpy2sql.py", line 1885, in run
doMinusHashFiles()
File "imdbpy2sql.py", line 1314, in doMinusHashFiles
minusHashFiles(fp, funct, INFO_TYPES[index], fname)
File "imdbpy2sql.py", line 1293, in minusHashFiles
sqldata.add((mid, defaultid, data))
File "imdbpy2sql.py", line 870, in add
self[key] = None
File "imdbpy2sql.py", line 865, in __setitem__
self.flush()
File "imdbpy2sql.py", line 891, in flush
self._toDB()
File "imdbpy2sql.py", line 925, in _toDB
CURS.executemany(self.sqlString, self.converter(self.values()))
File "C:\Python25\Lib\site-packages\pymssql.py", line 152, in executemany
raise DatabaseError, "internal error: %s" % self.__source.errmsg()
pymssql.DatabaseError: internal error: SQL Server message 545, severity 16,
state 1, line 1:
Explicit value must be specified for identity column in table 'movie_info'
either when IDENTITY_INSERT is set to ON or when a replication user is inse
rting into a NOT FOR REPLICATION identity column.
DB-Lib error message 10007, severity 5:
General SQL Server error: Check messages from the SQL Server.
On Thu, Jun 5, 2008 at 1:53 AM, Davide Alberani <[EMAIL PROTECTED]>
wrote:
> On Jun 04, David Jones <[EMAIL PROTECTED]> wrote:
>
> > I found out the lock error is caused by not enough memory. :)
>
> Wooops. ;-)
> That's strange, anyway: I expect the system to swap-off to disc
> (becoming slow as hell and ultimately trashing the system, if
> the available RAM memory is _really_ low ;-)) but I don't
> expect errors at the database server level.
>
> Can it be a limit of some kind of MS SQL Server, set by default
> to a value too low for our needs?
>
> Moreover: do you confirm that you had to change the _executeQuery()
> method? From what I see, you were reversing the logic of the SET
> IDENTITY_INSERT calls; this doesn't make much sense to me (but I've
> never used MS SQL Server, so there's probably something I don't
> understand).
>
>
> Thank your for the reports and the tests!
> --
> Davide Alberani <[EMAIL PROTECTED]> [PGP KeyID: 0x465BFD47]
> http://erlug.linux.it/~da/ <http://erlug.linux.it/%7Eda/>
>
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Imdbpy-devel mailing list
Imdbpy-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/imdbpy-devel