RE: Proper method of dropping 160K views
Posted in 2006
Topics: Migration, Import/Export & Data Conversion
Don't hit systables or sysviews directly if you value your job!
unload to 'where_ever.sql'select "DROP VIEW ", tabname, ";" from systables
where tabtype = "V"
and tabid > 99
order by tabname
will give you an sql file that contains the drop statements for all
non system views in your database in alphabetical order. Edit it to
remove any you wish to retain, and then run and watch them disappear
in seconds few.
Keith
-> -----Original Message-----
-> From: natebsi@gmail.com [mailto:natebsi@gmail.com]
-> Sent: Wednesday, May 03, 2006 5:55 PM
-> To: informix-list@iiug.org
-> Subject: Proper method of dropping 160K views
->
->
-> Greetings,
->
-> I need to do a massive drop of views, but I'm a bit unclear as to the
-> proper procedure. I am familiar with "drop view", but with so many to
-> drop, I was wondering if it is acceptable or advisable to delete from
-> the sysviews table directly?
-> Actually, I want to delete from the systables, since each view in
-> sysviews comprises about 50 rows with the same tabid.
->
-> Thanks in advance!
->
-> _______________________________________________
-> Informix-list mailing list
-> Informix-list@iiug.org
-> http://www.iiug.org/mailman/listinfo/informix-list
->
**********************************************************************************
This message is sent in strict confidence for the addressee only. It may
contain legally privileged information. The contents are not to be disclosed
to anyone other than the addressee. Unauthorised recipients are requested
to preserve this confidentiality and to advise the sender immediately of any
error in transmission.
This footnote also confirms that this email message has been swept for the
presence of computer viruses, however we cannot guarantee that this message
is free from such problems.
**********************************************************************************
Thanks Keith and Carsten, that was exteremly helpful! I used a slighly
modified version of your sql to only get the views I needed, and after
viewing the .sql file, I dropped them successfully via dbaccess. Kudos!