Posts

Showing posts from March, 2009

QUERY parameter in Export Utility

This parameter is used in conjunction with TABLE parameter of exp (export) utility of Oracle. This parameter will enable selection of rows from the list of tables mentioned in TABLE parameter. The value to this parameter is a WHERE clause for a SELECT statement which you would normally issue. For example if you want to query all records of employees for a particular department you will use: SELECT * FROM employees WHERE dept = 10; To export these rows into a file using exp utility you will follow the below syntax: exp scott/tiger TABLES=employees QUERY=\"WHERE dept=10\" Use \ for providing character or special characters like less than or greater than symbol inside the string. Also for operating system keywords you need to place \ as escape character. For example: exp scott/tiger TABLES=employees QUERY=\"WHERE name=\ANANTHA\' and sal \ You can also use ROWID for exporting, for example: exp scott/tiger@slspnc1 tables=emp query=\"where ROWID='AAAMgzAAEAAAAA...

ORA-01658: Unable to create INITIAL extent for segment in tablespace %s

** Solved ** You will encounter this error when a tablespace is full or cannot extend automatically. These are the possible solutions (if there are any other ways add a comment): Solution 1: Resize Tablespace alter database datafile ' ' resize M; Solution 2: Add Datafile alter tablespace tablespace_name add datafile ' ' size M autoextend M maxsize M|off>;