Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

SQLCODE -666 on a table DROP command

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
John Poulakos

New User


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

PostPosted: Mon Aug 06, 2012 11:29 pm    Post subject: SQLCODE -666 on a table DROP command
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

Moderator


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

PostPosted: Mon Aug 06, 2012 11:38 pm    Post subject:
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

New User


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

PostPosted: Mon Aug 06, 2012 11:59 pm    Post subject: Reply to: SQLCODE -666 on a table DROP command
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

Moderator


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

PostPosted: Tue Aug 07, 2012 12:04 am    Post subject:
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

New User


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

PostPosted: Tue Aug 07, 2012 1:00 am    Post subject: Reply to: SQLCODE -666 on a table DROP command
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

New User


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

PostPosted: Tue Aug 07, 2012 1:18 am    Post subject: Reply to: SQLCODE -666 on a table DROP command
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

Moderator


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

PostPosted: Tue Aug 07, 2012 1:26 am    Post subject:
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

New User


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

PostPosted: Tue Aug 07, 2012 1:45 am    Post subject: Reply to: SQLCODE -666 on a table DROP command
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

Moderator


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

PostPosted: Tue Aug 07, 2012 2:10 am    Post subject:
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

Site Director


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

PostPosted: Tue Aug 07, 2012 8:59 am    Post subject: Reply to: SQLCODE -666 on a table DROP command
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    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts What is the command to check MODE of ... rohanthengal CLIST & REXX 6 Fri Nov 18, 2016 1:48 pm
No new posts SDSF Command Avtrix CLIST & REXX 4 Fri Sep 30, 2016 11:13 am
No new posts How to find a CICS resource used in C... Arunkumar Chandrasekaran CICS 8 Thu Sep 29, 2016 1:45 pm
No new posts Need Rexx Program to Load in to DB2 T... Hareesh Verma CLIST & REXX 22 Tue Sep 20, 2016 2:59 pm
No new posts COMPARE command sivatechdrive TSO/ISPF 7 Fri Sep 16, 2016 4:31 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us