Can you please help me in creating a stored procedure which can create a tablesapce in a specified location ?

Hello ...
Can you please help me in writing a procedure which can create tablespace. like i have a requirement that
through sql query i need to get the location of where the data file of the newly created tablespace need to be stored.
I need to store the location of the datafiles in a variable and i need to use that variable for specifying the location of the data file in newly created data file.
please help me writing this procedure.....
Regards vinay raj.
Thanks in advance..

select distinct substr(file_name,1,instr(file_name,'/',-1)) from dba_data_files;
Run this in a few of your databases and see how often you ONLY get one row returned.
Normally there is no "default" file system for data files (read about the DB_CREATE_FILE_DEST parameter and Oracle Managed Files for the exception to that).
You could pick the same file system as an existing tablespace, but even then there is no guarantee that the file system has sufficient space for the new tablespace - you have to check that OUTSIDE the database.
Given the query at the top it is pretty simple to create a SQL script that generates a SQL script.  This can be run in any database via sqlplus, and then the generated script can be edited as needed and run immediately, under human control, avoiding surprises.
set echo off
set feedback off
set heading off
set lines 100
spool myts.sql
select distinct 'create tablespace MYTS DATAFILE '''||substr(file_name,1,instr(file_name,'/',-1))||'myts01.dbf'' size 40M ONLINE;' stmt
from dba_data_files;
spool off
For example, if you find there are multiple filesystems to choose from, run this then delete the filesystems you don't want from the generated script.  If you find there is only one file system but it is too full, work with your SA or storage to to add space or allocate a new file system, then modify the generated script accordingly.
This example assumes a traditional file system, on a UNIX-style OS, not using Oracle-Managed files.  ASM or RAW will have a different format for the data file location, of course.

Similar Messages

  • My illustator crashes when i try to save  can you please help?

    My illustator crashes when i try to save  can you please help? im using Cs6

    Archelass,
    If the crashing happens when placing from/saving to new location with Yosemite, you maybe able to get round it by using the Adobe Dialog instead of the OS Dialog in the Place window (similarly for Save As in the Save As window).
    If crashing happens when moving objects, the issue may be caused by the Chrome Pushbullet extension, see this post #3 by Matt with the solution,
    https://forums.adobe.com/message/6984777#6984777
    or by the Adobe Color extension, see this post #2 byhexxstatic with the solution,
    https://forums.adobe.com/message/7095368#7095368
    or by the cache on the computer, see post #5 in this thread by Booklover with the solution,
    https://forums.adobe.com/thread/1696375
    Or, when issues start to appear in general you may try the list.
    The following is a general list of things you may try when the issue is not in a specific file, and when it is not caused by issues with opening a file from external media. You may have tried/done some of them already; 1) and 2) are the easy ones for temporary strangenesses, and 3) and 4) are specifically aimed at possibly corrupt preferences); 5) is a list in itself, and 6) is the last resort.
    If possible/applicable, you should save current artwork first, of course.
    1) Close down Illy and open again;
    2) Restart the computer (you may do that up to at least 5 times);
    3) Close down Illy and press Ctrl+Alt+Shift/Cmd+Option+Shift during startup (easy but irreversible);
    4) Move the folder (follow the link with that name) with Illy closed (more tedious but also more thorough and reversible), for CS3 - CC you may find the folder here:
    https://helpx.adobe.com/illustrator/kb/preference-file-location-illustrator.html
    5) Look through and try out the relevant among the Other options (follow the link with that name, Item 7) is a list of usual suspects among other applications that may disturb and confuse Illy, Item 15) applies to CC, CS6, and maybe CS5);
    Even more seriously, you may:
    6) Uninstall (ticking the box to delete the preferences), run the Cleaner Tool (if you have CS3/CS4/CS5/CS6/CC), and reinstall.
    http://www.adobe.com/support/contact/cscleanertool.html

  • HT201210 i keep getting errors while i try to restore my iphone. can you please help?

    Hello. I wanted to restore my iphone but i keep getting errors while i'm at it. 1015 and some others. It is still in recovery mode and i cannot seem to solve anything. Can you please help? I have an iphone 3G which used to work on iOS 4.2.1. Thanks

    ERROR 1015...
    This Error Code is indicative of the Device being jailbroken / Hacked...
    Unauthorized modification of iOS  >  http://support.apple.com/kb/HT3743
    Sorry... But...
    The discussion of Jailbroken Devices is against the Terms of Use of this Forum.
    You will need to look elsewhere.

  • I entered new fields in a form that was created last year to update it.  However, now when I view the responses, they are listed as Column 1, Column 5, etc.  It doesn't show a label for the actual field when I view the responses.  Can you please help?

    I entered new fields in a form that was created last year to update it.  However, now when I view the responses, the headings are listed as Column 1, Column 5, etc. rather than the name of the heading.  Can you please help?

    Hi Mike,
    CRSE is an OEM Product and for use with a custom application they have written. Unfortunately we don't their reports or how they are connecting, it would appear they were originally built off a SQL and then set to a Dataset in the app or they could be adding the data source at runtime. Lots of variations and without access to the source code to see what they are doing not much we can help you with.
    You need to contact the OEM Partner for help in resolving this and find out what you can and need to do to update your SP and work with their canned reports,
    Thank you
    Don

  • Hi there, Can you please HELP ME? I created a signature for my email account, but I can not choose it because the option is daded under "none"and nothing happens when you click on it! Thank you, Johan

    Hi there, Can you please HELP ME? I created a signature for my email account, but I can not choose it because the option is daded under "none"and nothing happens when you click on it! Thank you, Johan

    This can be a problem with the file places.sqlite that stores the bookmarks and the history.
    * http://kb.mozillazine.org/Bookmarks_history_and_toolbar_buttons_not_working_-_Firefox

  • Can you please help me figure out what filter(s) to use to recreate this picture?

    Hi Everyone!
    I'm a student and not an expert in Photoshop. I'm trying to work over in After Effects using a Photoshop edited picture I was given (not separated in layers). However in order to give the image more movement I would like to recreate the picture, but have failed in figuring out which filters to use. Can you please help a student out? I would greatly appreciate it.!! (The first picture is the original, and the second one is the one I am trying to recreate) Thanks !

    Thanks for sharing that piece of information.  I was only aware of creating posterized effects in Illustrator, though the
    re is a posterize filter in Photoshop too.  I'm learning as I post so bear with me.  I find that providing a helping hand can't hurt unless you're way off base.  In this case I guess I should have provided my suggestion as an alternative rather than stating that it could only be best done in AI.
    -markerline

  • HT2534 Hello, The procedure above doesn't work. Regardless the options I choose, it doesn't allow to proceed without a credit card number. The option not to select a credit card is not there. Can you please help?

    Hello, The procedure above doesn't work. Regardless the options I choose, it doesn't allow to proceed without a credit card number. The option not to select a credit card is not there. Can you please help?

    Read the steps in the support article from which you came carefully as the order in which you follow them is  critical. Note that you can do this only when creating a new Apple ID. You cannot use an existing ID.
    If you are certain you're following the steps exactly as given and are creating a new Apple ID and still have problems, go here:
    http://www.apple.com/support/itunes/contact/
    and follow the instructions to report the issue to the iTunes Store.
    Regards.

  • While trying to update Adobe Reader XI 10.0.06 to 10.0.07 on my laptop running W7 Home Premium x 64, I get error message 2203. The same occurs if I try to uninstall before manually install the new version. Can you please help?

    Hello,
    While trying to update Adobe Reader XI 10.0.06 to 10.0.07 on my laptop running W7 Home Premium x 64, I get error message 2203. The same occurs if I try to uninstall before manually install the new version. Can you please help?
    PS.- Thank you very much for your Support in trying to solve a problem created by yourselves.
    Message was edited by: Juan Verano

    Is there anything else beside the number 2203?
    Try removing the current Reader using http://labs.adobe.com/downloads/acrobatcleaner.html, then install 11.0.07 from http://get.adobe.com/reader/enterprise/

  • Can you please help me with validation logic for Events in Table maintenance generator

    Can you please help me with validation logic for Events in Table maintenance generator,i.e if i enter record in 1st internal table then automatically 2nd internal table should be updated.

    Hi Glen Anthony,
        Thanks for replay,
         I used foreign key relationship between those 2 internal tables....
    I used event 05: When creating a new entry. I want to know the custom logic by which my 2nd Internal table gets automatically updated when i update my 1st Internal table
    Thanks Glen.

  • Unable to sync iMac address book with iPad. Can you please help?

    Unable to sync iMac address book with iPad. Can you please help?

    I have the same problem as Sheilaza but haven't been able to solve it using the advice offered.  The same problem applies to my Calendars. When I look at my iPad settings in iTunes, it says:
    Sync Contacts
    Your contacts are being synced with your iPad over the air from iCloud.
    Over-the-air sync settings can be changed on your iPad.
    and the same for Calendars.
    On the iPad, in iCloud settings, I have checked 'Contacts' and 'Calendars' as 'ON' but the Calendar remains blank and the Contacts are a very old version that was somehow created when I set up the iPad initially.
    Any ideas?
    Thanks.

  • I have bought new apple iPad but I don't know how to verify my Apple ID can you please help me

    I Have bought new apple I pad but I don't know how to verify it can you please help me

    When you create an iTunes account you should receive an email to the primary email address that you put on the account - that email should have a 'verify now' link in it which you need to click on and which will open a browser for you to log into your account from.
    From Frequently asked questions about Apple ID :
    How do I verify my Apple ID by email?
    Simply follow the link in the verification email that says "Verify Now." Sign in with your current Apple ID and password, then click Verify Address. You can also verify by signing in at My Apple ID. You'll receive an email prompting you to verify.
    (For info these are user-to-user forums, you are not talking to iTunes Support nor Apple, nor is it 'live chat' - a fellow user will reply when they see a question and they know the answer.)

  • HT5312 Dear Apple Support ,  I can't remember my security question answers , so Please help me to Create new Security Question for my Account .  Best wishes

    Dear Apple Support , I can't remember my security question answers , so Please help me to Create new Security Question for my Account .  Best wishes
    <Email Edited by Host>

    Welcome to the user to User Technical Support Forum provided by Apple.
    Please do not post personal information on a Public Forum.
    I have requested the Hosts remove it for you
    For your issue...
    See Here > Apple ID: Contacting Apple for help with Apple ID account security
              Ask to speak with the Account Security Team...
    Or Email Here  >  Apple  Support  iTunes Store  Contact
    More Info >  Apple ID: All about Apple ID security questions
    Note:
    You can only set up and/or change a Rescue Email Before you forget the questions/answers.

  • Dear Apple Support ,  This is FAHAD ALGORWAN ,I can't remember my security question answers , so Please help me to Create new Security Qu

    Dear Apple Support ,  This is FAHAD ALGORWAN ,I can't remember my security
    > question answers , so Please help me to Create new Security Qu

    Please do not make multiple posts. One is enough. These are user forums, so you are not speaking to Apple here.
    The Best Alternatives for Security Questions and Rescue Mail
        a. Send Apple an email request at: Apple - Support - iTunes Store - Contact Us.
        b. Call Apple Support in your country: Customer Service: Contact Apple support.
        c. Rescue email address and how to reset Apple ID security questions.

  • Dear Apple Support , This is ***Abdurrahman*** ,I can't remember my security question answers , so Please help me to Create new Security Question for my Account . Best wishes,

    Dear Apple Support ,
    This is ***Abdurrahman*** ,I can't remember my security question answers , so Please help me to Create new Security Question for my Account .
    Best wishes,

    The people on these boards aren't Apple Support and can't do that for you. You need to ask Apple to reset your security questions; ways of contacting them include clicking here and picking a method for your country, phoning AppleCare and asking for the Account Security team, and filling out and submitting this form.
    They wouldn't be security questions if they could be bypassed without Apple verifying your identity.
    (102461)

  • I can't remember my security question answers , so Please help me to Create new Security Question for my Account .

    rt ,
    This is ***majed*** ,I can't remember my security question answers , so Please help me to Create new Security Question for my Account .
    Best wishes,

    If you have a rescue email address (which is not the same thing as an alternate email address) set up on your account then the steps half-way down this page give you a reset link on your account : http://support.apple.com/kb/HT5312
    If you don't have a rescue email address (you won't be able to add one until you can answer your questions) then you will need to contact iTunes Support / Apple in your country to get the questions reset.
    Contacting Apple about account security : http://support.apple.com/kb/HT5699
    When they've been reset (and if you don't already have a rescue email address) you can then use the steps half-way down the HT5312 link above to add a rescue email address for potential future use

Maybe you are looking for

  • Very slow loading time - Crystal Reports Viewer 2008

    Hi,   I search this forum to find another thread regarding this issue.  Since I've found nothing in particular, I started this one.   We are currently developping a new report engine based on the .Net Crystal Report Viewer. This engine will be used i

  • Condition record exists, but has not been set

    Hi in the pricing analysis this is the explanation i got. the reasons could be an Condition record overflow  or the condition record wpuld have been created after the documnet is created. But i found the record has been mainatined earlier to the crea

  • Having Trouble With E-mails That Involve Animation

    This is too weird. When I receive an e-mail that has animation in it it comes through freeze framed in Mail. It does not matter if it is in my .Mac account or Verizon account. Just for the heck of it I forwarded it to myself using the Verizon account

  • Switching between 2 iphoto libraries...

    I went to the genius bar & they made me 2 iphoto libraries so I could keep my new and old photos separate and it was meant to be quite simple to be able to switch between the 2 but I don't know how! Can anyone help?

  • Routing in solaris zones

    Lets see the hypothetical situation. I have Solaris 10 with 3 zones ( + global). I have 4 network interfaces. Every zone has it's own interface. Now from what i've learnt all network configuration must be done in global zone. It means that every sing