Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 520
  • Last Modified:

how to do simplest create tablespace query

This is gonna sound silly but I can't seem to get my create tablespace to work. Never done one before. Says I need a datafile?

I'm using a virtual box for queries to mess around but I want to know how to create tablespace for my user newuser

i tried "create tablespace newspace" after granting myself the create tablespace priv.

I want to know how to do the default, and a basic non-default version of create tablespace please
0
Mark_Co
Asked:
Mark_Co
  • 4
  • 3
  • 2
4 Solutions
 
DavidSenior Oracle Database AdministratorCommented:
Here 'ya go!
http://docs.oracle.com/cd/B19306_01/server.102/b14200/statements_7003.htm

Your DBA must grant you the CREATE TABLESPACE role; then after it's created, the usual steps are to be granted QUOTA xx | UNLIMITED; create table(s) in that tablespace, etc.  Also, the O/S account used has to have write/execute permission on the datafile's directory or file system.
0
 
Mark_CoAuthor Commented:
so I don't need a datafile or path to give to the query like this example I saw on psoug?

CREATE TABLESPACE uwdata DATAFILE
'c:\oracle\oradata\orabase\uwdata01.dbf' SIZE 150M,
'c:\oracle\oradata\orabase\uwdata02.dbf' SIZE 100M
AUTOEXTEND OFF
BLOCKSIZE 8192
FORCE LOGGING
EXTENT MANAGEMENT LOCAL UNIFORM SIZE 256K
FLASHBACK ON;
0
 
slightwv (䄆 Netminder) Commented:
Check the doc link provided.

If you don't provide a full path, there is a default: DB_CREATE_FILE_DEST
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
DavidSenior Oracle Database AdministratorCommented:
Unless I'm missing something obvious, which I do too often, the 2nd and 3rd rows provide the datafiles, fully pathed.  In case this is new, the tablespace is a logical component of the instance; the datafiles are physical -- so it's a mapping process between the two.
0
 
Mark_CoAuthor Commented:
could not get this to work

CREATE TABLESPACE my_demo_space DATAFILE
'/data/ts_mydemo01.dbf' SIZE 1M
logging
ONLINE;
0
 
Mark_CoAuthor Commented:
"grant unlimited tablespace to newconnection"  did work
0
 
slightwv (䄆 Netminder) Commented:
>>could not get this to work

Error messages would be nice.

I assume you have a /data folder and oracle has read/write access to it?
0
 
DavidSenior Oracle Database AdministratorCommented:
Your second example shifted from a Windows file format to a UNIX one.  Which OS did you mean?
0
 
Mark_CoAuthor Commented:
pardon, I'm running in a virtual machine which is linux
0

Featured Post

Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

  • 4
  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now