use @DBNAME
 
DECLARE @b char(8)

DECLARE pr_Cursor CURSOR FOR

SELECT  (perno)  FROM     @DBNAME..person 

OPEN pr_Cursor

FETCH NEXT

FROM         pr_Cursor

INTO            @b WHILE @@FETCH_STATUS = 0 BEGIN
                          
                           UPDATE    newEOS..person
                           SET            PwdP = 'paass'
                           WHERE     (newEOS..person.PERNO = @b) AND ((newEOS..person.PwdP IS NULL) OR
                                                  (newEOS..person.PwdP = '')) 

FETCH NEXT

FROM         pr_Cursor

INTO            @b END CLOSE pr_Cursor DEALLOCATE pr_Cursor