home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / database / oracle / 1495 < prev    next >
Encoding:
Text File  |  1992-09-03  |  2.4 KB  |  53 lines

  1. Newsgroups: comp.databases.oracle
  2. Path: sparky!uunet!mcsun!news.funet.fi!ajk.tele.fi!funic!nic.funet.fi!lahti
  3. From: lahti@paiste.fmi.fi (Mikko Lahti)
  4. Subject: Re: how to compress database and move indexes to different tablespace
  5. In-Reply-To: suskind@bbs.mdcbbs.com's message of 2 Sep 92 10:06:26 GMT
  6. Message-ID: <LAHTI.92Sep4113757@paiste.fmi.fi>
  7. Sender: usenet@nic.funet.fi
  8. Nntp-Posting-Host: paiste.fmi.fi
  9. Organization: Finnish Meteorological Institute
  10. References: <1992Sep2.100626.1@bbs.mdcbbs.com>
  11. Date: 4 Sep 92 11:37:57
  12. Lines: 39
  13.  
  14. In article <1992Sep2.100626.1@bbs.mdcbbs.com> suskind@bbs.mdcbbs.com writes:
  15.  
  16. > I am trying to compress my database. While I am at it I am moving stuff
  17. > into various tablespaces to improve performance and layout. My original
  18. > database has only ONE tablespace "system". My new database will have
  19. > "system", "user", "temp", and "index". I can see how to easily move
  20. > a user's tables into the "user" tablespace by only giving him resource
  21. > in that tablespace and altering his user account so "user" is his default
  22. > tablespace. 
  23.  
  24. As you did not mention version you are using, I suppose RDBMS v. 6.0.
  25. You might already know this, but have you checked that none of your users
  26. have general resource privileges (that is, have number 1 in column 
  27. RESOURCE_PRIV in table DBA_USERS). If they have, they have resource on 
  28. every tablespace and granting (or revoking) resources in any one tablespace
  29. does not mean a thing and imports always goes to the original tablespace.
  30. So do not use GRANT RESOURCE TO <user> command (I think it is quite useless),
  31. use always GRANT RESOURCE ON <tablespace> TO <user> command.
  32.  
  33. > However, how to I move the corrisponding indexes? I have tried using the
  34. > "show" option of IMP to generate a file, but this file is in such a poor
  35. > format I cannot use it without EXTENSIVE editing. Does anybody have a
  36. > utility that will take the file generated by the "show" option and make it
  37. > usable? The format I get is ONLY 80 column records and EVERY line is
  38. > enclosed in double quotes.
  39.  
  40. Try 
  41.  
  42. IMPORT username/password INDEXFILE=<filename>
  43.  
  44. It gives you a file <filename>.SQL with CREATE INDEX commands.
  45. It works on RDBMS 6.0.34 (may work on earlier versions, but I cannot say
  46. for sure), but it is not yet in the manuals, only in the readme-file.
  47.  
  48. Hope this helps, I had to learn it by try-and-error.
  49.  
  50. Mikko Lahti                            Mikko.Lahti@fmi.fi
  51. Finnish Meteorological Institute
  52. Helsinki, Finland
  53.