IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

SQLCODE -666 on a table DROP command


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
John Poulakos

Active User


Joined: 13 Jun 2012
Posts: 178
Location: United States

PostPosted: Mon Aug 06, 2012 11:29 pm
Reply with quote

I'm back again. As you may have guessed, I'm not a DBA. We are a small shop and the people who would normally act as DBAs are on vacation or quit (great planning). So, I've been thrust into unknown territory of trying to load a database onto a new test mainframe and I'm pretty much flying solo.

My latest problem is I need to redo the table defintions, but when I attempt to drop the old table defintion, I get:

SQLCODE = -666, ERROR: DROP TABLE CANNOT BE EXECUTED BECAUSE A UTILITY IS IN PROGRESS

On the statement:

DROP TABLE G10.TG10318

I don't know of any utility running and I have no problem running this drop statement:

DROP TABLE DBTTEST.SAMPLET1

I have issued START and STOP database commands for G10, which proved a waste of time. I'm clueless (obviously).
Back to top
View user's profile Send private message
Pandora-Box

Global Moderator


Joined: 07 Sep 2006
Posts: 1592
Location: Andromeda Galaxy

PostPosted: Mon Aug 06, 2012 11:38 pm
Reply with quote

Looks like there is some utility jobs which is running or might have failed agaisnt the resource

To check the utility which is executing

Code:
-DIS UTIL(*)


It might give the list of jobnames probably that are executing a utility

So you might need to wait till the job completes or probably until clearing the failed utility
Back to top
View user's profile Send private message
John Poulakos

Active User


Joined: 13 Jun 2012
Posts: 178
Location: United States

PostPosted: Mon Aug 06, 2012 11:59 pm
Reply with quote

This is interesting (I think):

-DIS UTIL(*)
DSNU100I -DB9G DSNUGDIS - USERID = JOHN0
MEMBER =
UTILID = TEMP
PROCESSING UTILITY STATEMENT 1
UTILITY = LOAD
PHASE = RELOAD COUNT = 0
NUMBER OF OBJECTS IN LIST = 1
LAST OBJECT STARTED = 1
STATUS = STOPPED

JOHN0 is my ID and I failed attempting to do a LOAD on Friday.
Back to top
View user's profile Send private message
Pandora-Box

Global Moderator


Joined: 07 Sep 2006
Posts: 1592
Location: Andromeda Galaxy

PostPosted: Tue Aug 07, 2012 12:04 am
Reply with quote

Do a

-TERM UTIL(TEMP)

and try to Drop your table

Always ensure to clear of these util id when failed to avoid errors

Also you might need to do a start before DROP to get it back to RW mode
Back to top
View user's profile Send private message
John Poulakos

Active User


Joined: 13 Jun 2012
Posts: 178
Location: United States

PostPosted: Tue Aug 07, 2012 1:00 am
Reply with quote

That worked! I found a couple of other errors I was able to find and fix on my own. I have one last hurdle (I hope). When I attempt the table load that failed on Friday I get this message:

RECOVER PENDING ON TABLE SPACE DG10.SG10318 PROHIBITS PROCESSING
Back to top
View user's profile Send private message
John Poulakos

Active User


Joined: 13 Jun 2012
Posts: 178
Location: United States

PostPosted: Tue Aug 07, 2012 1:18 am
Reply with quote

I assume I can correct this by issuing a DROP TABLESPACE command and redefining it?
Back to top
View user's profile Send private message
Pandora-Box

Global Moderator


Joined: 07 Sep 2006
Posts: 1592
Location: Andromeda Galaxy

PostPosted: Tue Aug 07, 2012 1:26 am
Reply with quote

Why is your tablespace recover pending?

Why do a drop when it is not needed

Try the below command

Code:
 -STA DB(<DBNAME>) SPACE(<TSNAME>) ACCESS FORCE
Back to top
View user's profile Send private message
John Poulakos

Active User


Joined: 13 Jun 2012
Posts: 178
Location: United States

PostPosted: Tue Aug 07, 2012 1:45 am
Reply with quote

The DROP command already worked and the load of the first table is done. I will use this new command on the rest of the tables I need to change. Your help has been invaluable. Many Thanks! I sure hope I don't have to bother you again for a long time.
Back to top
View user's profile Send private message
Pandora-Box

Global Moderator


Joined: 07 Sep 2006
Posts: 1592
Location: Andromeda Galaxy

PostPosted: Tue Aug 07, 2012 2:10 am
Reply with quote

I am happy that I am learning from your experience in turn

icon_cool.gif
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Aug 07, 2012 8:59 am
Reply with quote

Quote:
I sure hope I don't have to bother you again for a long time.
Surely not a bother. . . This is why the forum is here icon_smile.gif

d
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts RACF - Rebuild SETROPTS command which... All Other Mainframe Topics 3
No new posts Load new table with Old unload - DB2 DB2 6
No new posts Routing command Address SDSF to other... TSO/ISPF 2
No new posts Pulling a fixed number of records fro... DB2 2
No new posts DTL - how to define key with stacked ... TSO/ISPF 3
Search our Forums:

Back to Top