SQL & PL/SQL :: Include Tablespace In Create Table Command

Oct 5, 2011

I want to creat a table using Execute Immediate that includes tablespace name in the create table command. But I don't know the tablespace name that the client is using. Can I incorporate in a script? If yes, then how?

I have written the following proc. While executing , it gives me the error:
ORA-00959: tablespace 'V_TABLESPACE_NAME' does not exist.

create or replace procedure pr_create_table as
v_tablespace_name varchar2(4000);
begin
select distinct tablespace_name into v_tablespace_name
from user_tables
where table_name like 'ABC%';
[code]....

View 20 Replies


ADVERTISEMENT

SQL & PL/SQL :: Command Is Used To Create Table By Copying Structure Of Another Table Including Constraints?

Jul 14, 2012

what command is used to create a table by copying the structure of another table including constraints ?

View 2 Replies View Related

SQL & PL/SQL :: Difference Between Include Program Header Before CREATE OR REPLACE PACKAGE Statement

Mar 2, 2010

Is there any difference between include program header before CREATE OR REPLACE PACKAGE statement and program header after CREATE OR REPLACE PACKAGE statement

View 4 Replies View Related

SQL & PL/SQL :: Create Partitioned Table With Tablespace

May 17, 2012

I got just confused while looking at the below two create table statements:

CREATE TABLE Test (
TestID integer not null,
Name varchar2(20) not null )
PARTITION BY LIST (TestID)
(
PARTITION testPart1 VALUES (1) TABLESPACE tbspc1,
PARTITION testPart2 VALUES (2) TABLESPACE tbspc2@RemoteServer);

and

CREATE TABLE Test (
TestID integer not null,
Name varchar2(20) not null )
tablespace tbspc1
PARTITION BY LIST (TestID)
(
PARTITION testPart1 VALUES (1) TABLESPACE tbspc1,
PARTITION testPart2 VALUES (2) TABLESPACE tbspc2@RemoteServer);

View 11 Replies View Related

Any Way To Include Sys.aud$ Table In Full Database Export

Jan 2, 2013

I am doing an export using the following parfile information:

userid=/
directory=datapump_nightly_export
dumpfile=test_expdp.dmp
logfile=test_expdp.log
full=y
content=all

However when I run this I do not see the sys.aud$ in the log file. I know I can do a seperate export to specifically get the sys.aud$ table but is there any way to include it in with my full export?

View 8 Replies View Related

JDeveloper, Java & XML :: Generating Document That Include Fields Provided In Table

Nov 27, 2011

I need to generate a document that include fields provided in following.

CREATE TABLE t
(x_customer_po VARCHAR2(20 BYTE),
x_accessory_code VARCHAR2(3 BYTE),
x_install_loc HAR(3 BYTE));
INSERT INTO apps.T
VALUES('N45882','D0C','MFG');
INSERT INTO apps.T

[code]...

How can I get the output as formated XML?

--output:

<OrderAcknowledgments><Sender ID="999999999" Name="Cars"></Sender><DateTime>2011-11-27T22:00:14.3</DateTime><Acknowledgments><Acknowledgment><Vehicle><CustomerPONum>N45882 </CustomerPONum><Options><Option><Code>D0C</Code><InstallLocation>MFG</InstallLocation></Option><Option><Code>R0B</Code> <InstallLocation>MFG</InstallLocation></Option><Option><Code>LK2</Code><InstallLocation>MFG</InstallLocation></Option><Option ><Code>K0B</Code><InstallLocation>MFG</InstallLocation></Option></Options></Vehicle></Acknowledgment><Acknowledgment><Vehicle ><CustomerPONum>N45883</CustomerPONum>

[code]...

View 5 Replies View Related

SQL & PL/SQL :: How To Create Dynamically ALTER INDEX Command

Nov 15, 2010

how I can create an index dynamically? The DBA wants me to put this code below in the beginning of a PL/SQL package. At first, I tried by just putting the below syntax in the code, but I get an 'Alter' is not a valid identifier.

alter index ZZAP_selected_invoices_n1 rebuild online;

And then once the job completes...

alter index ZZAP_selected_invoices_n1 unusable;

View 8 Replies View Related

PL/SQL :: How To Create Database And Tablespace

Aug 21, 2013

I want to create a database named Influx as well as tablespace influx.for this i login in sys account.now i am trying to run the following command:

CREATE DATABASE INFLUX   LOGFILE GROUP 1 ('G:appdhirenderoradataINFLUX
edo01.log') SIZE 100M,           GROUP 2 ('G:appdhirenderoradataINFLUX
edo02.log') SIZE 100M,           GROUP 3 ('G:appdhirenderoradataINFLUX
edo03.log') SIZE 100M   MAXLOGFILES 5   MAXLOGMEMBERS 5   MAXLOGHISTORY 1   MAXDATAFILES 100   DEFAULT TABLESPACE users      DATAFILE 'G:appdhirenderoradataINFLUXINFLUX01.dbf'      SIZE 500M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED   FOLLWOING ERROR IS COMMING:ora-01501     datbase fialed.ora-01100   

database already mount .

View 3 Replies View Related

Client Tools :: Create Shortcut On Desktop To Have SQLPLUS (command Line)

Sep 6, 2010

The way to create a short cut on desktop to have an sql*plus (command line).

i.e. I want to have an short cut on desktop when I click that short cut that would connect me to a specific database with a username and password (which i supply while creating the shortcut-I would provide the database name, username and password)

View 7 Replies View Related

SQL & PL/SQL :: Proc Create Partition With Variable Name / Value / Tablespace

Aug 18, 2010

developing a procedure to create a partition every month passing in parms for the name and values, and also need to determine the appropriate tablespace that has adequate space available. Working within the constraints of the environment. I would like to pass in the table name as well. This code gives the general idea..

CREATE OR REPLACE PROCEDURE FS.CREATE_PART_test
declare
v_monyy varchar2;
v_yyyymm varchar2;
v_tblspc dba_data_files.tablespace_name%type;
[code]...

View 2 Replies View Related

Create Dictionary Tablespace Creation In 10g Database?

Nov 5, 2012

Is it possible to create Dictionary Tablespace creation in 10g database?

View 5 Replies View Related

Unable To Create INITIAL Extent For Segment In Tablespace

Jun 12, 2012

ORA-01658: unable to create INITIAL extent for segment in tablespace

I am getting above error when a batch job is running.Its insterting data in tables. I checked free space i dont know y its not using avalable space.

Database Version: 11202

select sum(bytes)/1024/1024/1024, sum(maxbytes)/1024/1024/1024 from dba_data_files where tablespace_name='test_data';

sum(bytes) sum(maxbytes)
---------------- -------------
60 0

select sum(bytes/1024/1024/1024) from dba_free_space where tablespace_name='test_data';

sum(bytes/1024/1024/1024)
----------------------
50

View 2 Replies View Related

SQL & PL/SQL :: Create Dictionary Managed Temporary Tablespace In Oracle 10g

Aug 19, 2011

How we can create dictionary managed temporary tablespace in Oracle 10g.

SQL> create temporary tablespace temp
2 tempfile '+GWDAAS04_TEMP_DG01/pimsb_gw/tempfile/temp01.dbf' size 500m
3 extent management dictionary;
create temporary tablespace temp

ERROR at line 1:
ORA-25139: invalid option for CREATE TEMPORARY TABLESPACE

View 7 Replies View Related

Enterprise Manager :: What Is The Difference Between Create External Table Vs Create Table

Apr 29, 2011

What is the difference between CREATE EXTERNAL TABLE Vs CREATE TABLE .?

Is CREATE EXTERNAL TABLE included in CREATE TABLE?

View 3 Replies View Related

Security :: Create User With Full Access On Default Tablespace?

Aug 12, 2011

i have been trying to create a user with full access on default Tablespace so that i can access all the objects without any restrictions for the new user.

View 7 Replies View Related

Server Administration :: ORA-01658 / Unable To Create INITIAL Extent For Segment In Tablespace?

Aug 11, 2011

I have executed the below statement to move a bulk of table from source table space-SHOP3_DATA to destination tablespace -LINUX_CATA. Before executing the statement the source table space was having 85% full message . While executing the statement this is giving the error for the source tablespace means the the tablespace is getting consumed in the source TS. Currently no-one is using the tablespace SHOP3_DATA' . If I add datafile to the SHOP3_DATA the problem may be solved but why the space is getting consumed in the source. Now the tablespace SHOP3_DATA is 95% full

SQL> alter table LINUX_CATA.TST_FOLDERS move tablespace LINUX_CATA;
Table altered.
SQL> alter table LINUX_CATA.TST_SEARCH_TESTS move tablespace LINUX_CATA;
alter table LINUX_CATA.TST_SEARCH_TESTS move tablespace LINUX_CATA
*
ERROR at line 1:
ORA-01658: unable to create INITIAL extent for segment in tablespace SHOP3_DATA

[code]....

View 10 Replies View Related

Server Utilities :: ORA-01658 / Unable To Create INITIAL Extent For Segment In Tablespace USERS

Apr 4, 2013

while importing data i got this error in my log file.and i cannot import my data successfuly

in my log file error i found like this

ORA-01658: unable to create INITIAL extent for segment in tablespace USERS
IMP-00017: following statement failed with ORACLE error 1658:
IMP-00003: ORACLE error 1658 encountered
ORA-01658: unable to create INITIAL extent for segment in tablespace USERS
IMP-00017: following statement failed with ORACLE error 1658:

i can import my data using imp utility using this syntax

C:UsersAdministrator>imp tiger/****@tcs file=E:DUMP s.
dmp log=E:DUMP s.log fromuser=tiger121 touser=tiger statistics=none

this my user tiger default tablespace its uses and its a auto extend on and locally managed tablespace,and i have enough space on my drive also.

View 21 Replies View Related

Forms :: How To Include Progress Bar

Jun 4, 2010

How can we include a progress bar in forms?

View 1 Replies View Related

Way To Include New Warehouses / Products In Query

Feb 21, 2011

I have to do a number of database exercises and it's my very first time using SQL. I did all of them, except for one query.It's fairly simple, I need to find for every combination of warehouses (there are 5) and items (25) how many of each items I can stock in said warehouse until until it goes over the capacity. So for example warehouse 1 has a max of 300 pounds and item 1 weighs 1 pound, so I can stock 300 in it. Warehouse 1 and product 2...etc.

Every warehouse has a capacity in pounds and every item has a weight also in pounds. There are 3 tables between warehouse and items (warehouse---shipment---order----order details----items).

I managed to find every instance of warehouse_ID/item_ID/(capacity/weight)...but thats for the existing warehouses/item. If they added a new warehouse or product, I'd be screwed, as they wouldnt show up in my query...here's my query:

select Warehouse_ID, item_ID, (select round(capacity/weight,1) as maximum_capacity
from order_detail
join item using (item_ID)
join order using (Order_ID)
join shipment using (shipment_number)
join warehouse using (warehouse_ID)
group by warehouse_id, item_id
order by warehouse_ID

I keep trying to find a way to include possible new warehouses or products in my query, but I'm at a complete loss. I tried to right and left outer joins with no luck

View 5 Replies View Related

SQL & PL/SQL :: Include / Exclude In One Query Statement

Aug 31, 2011

how to write this query using all three tables in one query statement.

Result:

Input value of "GM" would return "GM@EMAIL.COM"

Input value of "GM" and "GMC" would return "GMC@EMAIL.COM"

If "GM" is supplied, then only return the "GM@EMAIL.COM" email.

If "GM" and "GMC" is supplied, then only return the "GMC@EMAIL.COM" email

Test Case : GM would return "GM@EMAIL.COM" email

Test Case : GM and GMC would return "GMC@EMAIL.COM" email

select email
from email a,
company b,
sub_company c
where (company = "GM" but no match found in sub_company)
(company = "GM" and sub_company_name = "GMC" match is found in sub_company)

[code]....

View 11 Replies View Related

Forms :: Include Multiple EnvFile?

Mar 3, 2010

Here is my problem : I have 7 applications to deploy on Forms server, each with there own applicationsX.env file. In formsweb.cfg, I specify an envFile directive in each applications specific section.The problem is that I would prefer not to copy default.env 7 times just to add 2-3 specific directives. I would like to always include default.env + applicationsX.env for example.

Is there a way to specify multiple env file in the envFile directive?

View 7 Replies View Related

SQL & PL/SQL :: Time Range Include A Specific Hour?

Aug 11, 2010

I'm looking for a way to say if a time range includes a specific hour.

If I was looking to work out if 01:00 to 04:00 includes 02:00, then this works:

CASE WHEN TO_DATE('02:00','HH24:MI') BETWEEN TO_DATE('01:00','HH24:MI') AND TO_DATE('04:00','HH24:MI') THEN 1 ELSE 0 END

But, if the time go over two days (with midnight in between), it doesn't work:

CASE WHEN TO_DATE('02:00','HH24:MI') BETWEEN TO_DATE('18:00','HH24:MI') AND TO_DATE('04:00','HH24:MI') THEN 1 ELSE 0 END

View 3 Replies View Related

RMAN :: Recover Data File Not Include In Backup?

May 16, 2013

I am using oracle 11.2.0.3.0, i have taken database backup using rman , after backup i have added a new datafile . My database has been crash , can i restore the database including the new data file which does not include in backup . I have all the archive logs.

View 6 Replies View Related

To Modify Dbca Template To Include Two Control Files

Nov 14, 2012

I'm trying to modify my dbca template to include two control files. One on ASM +RECO and we we're thinking of adding the second one on the database filesystem $ORACLE_BASE/something/something Within the template there are references to controlfiles two places:

Initparameter:
<initParam name="control_files" value="("{ORACLE_BASE}/oradata/{DB_UNIQUE_NAME}/control01.ctl", "{ORACLE_BASE}/fast_recovery_area/{DB_UNIQUE_NAME}/control02.ctl")"/>

and

<StorageAttributes>
<ControlfileAttributes id="Controlfile">
<maxDatafiles>32767</maxDatafiles>
<maxLogfiles>1024</maxLogfiles>
<maxLogMembers>3</maxLogMembers>
<maxLogHistory>32767</maxLogHistory>
<maxInstances>8</maxInstances>
<image name="control01.ctl" filepath="{ORACLE_BASE}/oradata/{DB_UNIQUE_NAME}/"/>
<image name="control02.ctl" filepath="+RECO"/>
</ControlfileAttributes>

With this configuration there is only one controlfile created and that is on +RECO. What am I doing wrong and also should I add the second controlfile to +DATA instead of fielsystem $ORACLE_BASE?

View 6 Replies View Related

Brtools Command Versus Oracle Command For Shutdown And Startup (statistics)

Sep 13, 2013

we are running SAP application against oracle database. say, if I use brspace or brtools (from SAP side) to shutdown or startup database or collect stats, does this mean it not recommend to use oracle command to shutdown/start & collect stats?

View 3 Replies View Related

What SQL Command To Find Index Of A Table

May 14, 2007

1) how to find a primary key of a table in oracle, for example if I want to drop a index in table , how do I find what is the primary key in a table so that I can issue that command.

P/s: I don't have OEM installed so I must use SQL command

Example of dropping the index
ALTER TABLE table_name
drop CONSTRAINT constraint_name;

For example:

ALTER TABLE supplier
drop CONSTRAINT supplier_pk;

View 2 Replies View Related

Application Express :: Include Data Files As Part Of Export Process?

Jan 14, 2013

if it is possible to include 'data' files as part of the Application Export process. Up till now I've only been able to include supporting object files which will recreate a table structure but not the data records - I've been creating the latter outside of APEX.

View 2 Replies View Related

Oracle 8 Table Export / Import Command

Apr 29, 2009

I need to truncate a database, though before doing that, want an export of one the tables. This will be re-imported once the truncate is complete.

What is the correct export syntax for Oracle 8? And possibly the import?

View 3 Replies View Related

SQL & PL/SQL :: Update Long String In Table By Command

Jan 23, 2011

I use sqlplus in oracle (linux).I have a table and the string cell have long string .

Like below :

column A Column B

A BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
.....................................BBBBBBBBBBB

So, I need to edit/update the row A and the value in Column B.But the string in Column B is so long and I only need to edit one character.IF I use update command , I need to type very long string and it is easy to wrong edit .

View 8 Replies View Related

SQL & PL/SQL :: Insert Into Table - Command Not Properly Ended

Oct 23, 2012

INSERT INTO Table (NID, NType) SELECT DTreeNotifySequence.NextVal, 1 FROM Dee WHERE ID =354344 commit;

I get the following error:

ORA-00933: SQL command not properly ended

I tried it in several ways...are more semicolons needed?

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved