Anyone got a SQL script that outputs Oracle create statements?
Hi all,
I've been using a data modeling tool (ER/Studio from Embarcadero Technologies) to design my database (which currently is 11g XE running on Win7). I need to ensure that the data model and database are 100% in sync. My lack of DBA abilities now haunts me. I need to accomplish one of two things.
1. Run a SQL script that outputs the full compliment of Oracle CREATE statements that define my app's database (BTW, all of my tables are prefixed with "PT_").
2. Connect ER/Studio with the local 11g XE database.
Unless someone is familiar with ER/Studio reverse-engineering, I imagine #1 above is the more straightforward solution. Does anybody have such a script they can share with me?
Thanks so much,
Kim
Hi,
Maybe this blog post helps you.
http://www.apex-at-work.com/2013/03/generate-ddl-source-code-with-sql.html
BTW, you are posting in wrong forum as this is Application Express forum and your question do not have anything do with this product.
Regards,
Jari
My Blog: http://dbswh.webhop.net/htmldb/f?p=BLOG:HOME:0
Twitter: http://www.twitter.com/jariolai
Similar Messages
-
How can I convert a mysql sql script to a oracle sql script
Hi,
We have a bunch of tables with data running on a mysql server.
This should now be moved to an oracle 9 db.
are there any tools to convert the import script of a mysql db
to a format of the sql script that work for oracle ?
Thanks
MichaelOracle has a tool called Migration Toolbench, which supports MySQL 3.22 and 3.23:
http://otn.oracle.com/tech/migration/workbench/content.html
On this same topic, I was wondering if anybody has tried migrating from PostgreSQL to Oracle 9i. The workbench doesn't seem to support it, and feeding a pg_dump file directly into SQL*Plus is not working. -
I have an Script mostly that is generated by SSMS which works with-out issue on SQL Server 2008, but when I attempt to run it on a new fresh install of SQL Server 2012 I get an Msg 8631. Internal error: Server stack limit has been reached. Please look for
potentially deep nesting in your query, and try to simplify it.
The script itself doesn't seem to be all that deep or nested. The script is large 2600 lines and when I remove the bulk of the 2600 lines, it does run on SQL Server 2012. I'm just really baffled why something that SQL Server generated with very
few additions/changes AND that WORKS without issue in SQL Server 2008 R2 would suddenly be invalid in SQL Server 2012
I need to know why my script which is working great on our current SQL Server 2008 R2 servers suddenly fails and won't run on an new SQL Server 2012 server. This script is used to create 'bulk' Replications on a large number of DBs saving a tremendous
amount of our time doing it the manual way.
Below is an 'condensed' version of the script which fails. I have removed around 2550 lines of specific sp_addarticle statements which are mostly just copy and pasted from what SQL Management Studio 'scripted' for me went I when through the Replication
Wizard and told it to save to script.
declare @dbname varchar(MAX), @SQL nvarchar(MAX)
declare c_dblist cursor for
select name from sys.databases WHERE name like 'dbone[_]%' order by name;
open c_dblist
fetch next from c_dblist into @dbname
while @@fetch_status = 0
begin
print @dbname
SET @SQL = 'DECLARE @dbname NVARCHAR(MAX); SET @dbname = ''' + @dbname + ''';
use ['+@dbname+']
exec sp_replicationdboption @dbname = N'''+@dbname+''', @optname = N''publish'', @value = N''true''
use ['+@dbname+']
exec ['+@dbname+'].sys.sp_addlogreader_agent @job_login = N''DOMAIN\DBServiceAccount'', @job_password = N''secret'', @publisher_security_mode = 1, @job_name = null
-- Adding the transactional publication
use ['+@dbname+']
exec sp_addpublication @publication = N'''+@dbname+' Replication'', @description = N''Transactional publication of database
'''''+@dbname+''''' from Publisher ''''MSSQLSRV\INSTANCE''''.'', @sync_method = N''concurrent'', @retention = 0, @allow_push = N''true'', @allow_pull = N''true'', @allow_anonymous = N''false'', @enabled_for_internet
= N''false'', @snapshot_in_defaultfolder = N''true'', @compress_snapshot = N''false'', @ftp_port = 21, @allow_subscription_copy = N''false'', @add_to_active_directory = N''false'', @repl_freq = N''continuous'', @status = N''active'', @independent_agent = N''true'',
@immediate_sync = N''true'', @allow_sync_tran = N''false'', @allow_queued_tran = N''false'', @allow_dts = N''false'', @replicate_ddl = 1, @allow_initialize_from_backup = N''true'', @enabled_for_p2p = N''false'', @enabled_for_het_sub = N''false''
exec sp_addpublication_snapshot @publication = N'''+@dbname+' Replication'', @frequency_type = 1, @frequency_interval = 1, @frequency_relative_interval = 1, @frequency_recurrence_factor = 0, @frequency_subday = 8,
@frequency_subday_interval = 1, @active_start_time_of_day = 0, @active_end_time_of_day = 235959, @active_start_date = 0, @active_end_date = 0, @job_login = N''DOMAIN\DBServiceAccount'', @job_password = N''secret'', @publisher_security_mode = 1
-- There are around 2400 lines roughly the same as this only difference is the tablename repeated below this one
use ['+@dbname+']
exec sp_addarticle @publication = N'''+@dbname+' Replication'', @article = N''TABLE_ONE'', @source_owner = N''dbo'', @source_object = N''TABLE_ONE'', @type = N''logbased'', @description = null, @creation_script =
null, @pre_creation_cmd = N''drop'', @schema_option = 0x000000000803509F, @identityrangemanagementoption = N''manual'', @destination_table = N''TABLE_ONE'', @destination_owner = N''dbo'', @vertical_partition = N''false'', @ins_cmd = N''CALL sp_MSins_dboTABLE_ONE'',
@del_cmd = N''CALL sp_MSdel_dboTABLE_ONE'', @upd_cmd = N''SCALL sp_MSupd_dboTABLE_ONE''
EXEC sp_executesql @SQL
SET @dbname = REPLACE(@dbname, 'dbone_', 'dbtwo_');
print @dbname
SET @SQL = 'DECLARE @dbname NVARCHAR(MAX); SET @dbname = ''' + @dbname + ''';
use ['+@dbname+']
exec sp_replicationdboption @dbname = N'''+@dbname+''', @optname = N''publish'', @value = N''true''
use ['+@dbname+']
exec ['+@dbname+'].sys.sp_addlogreader_agent @job_login = N''DOMAIN\DBServiceAccount'', @job_password = N''secret'', @publisher_security_mode = 1, @job_name = null
-- Adding the transactional publication
use ['+@dbname+']
exec sp_addpublication @publication = N'''+@dbname+' Replication'', @description = N''Transactional publication of database
'''''+@dbname+''''' from Publisher ''''MSSQLSRV\INSTANCE''''.'', @sync_method = N''concurrent'', @retention = 0, @allow_push = N''true'', @allow_pull = N''true'', @allow_anonymous = N''false'', @enabled_for_internet
= N''false'', @snapshot_in_defaultfolder = N''true'', @compress_snapshot = N''false'', @ftp_port = 21, @allow_subscription_copy = N''false'', @add_to_active_directory = N''false'', @repl_freq = N''continuous'', @status = N''active'', @independent_agent = N''true'',
@immediate_sync = N''true'', @allow_sync_tran = N''false'', @allow_queued_tran = N''false'', @allow_dts = N''false'', @replicate_ddl = 1, @allow_initialize_from_backup = N''true'', @enabled_for_p2p = N''false'', @enabled_for_het_sub = N''false''
exec sp_addpublication_snapshot @publication = N'''+@dbname+' Replication'', @frequency_type = 1, @frequency_interval = 1, @frequency_relative_interval = 1, @frequency_recurrence_factor = 0, @frequency_subday = 8,
@frequency_subday_interval = 1, @active_start_time_of_day = 0, @active_end_time_of_day = 235959, @active_start_date = 0, @active_end_date = 0, @job_login = N''DOMAIN\DBServiceAccount'', @job_password = N''secret'', @publisher_security_mode = 1
-- There are around 140 lines roughly the same as this only difference is the tablename repeated below this one
use ['+@dbname+']
exec sp_addarticle @publication = N'''+@dbname+' Replication'', @article = N''DB_TWO_TABLE_ONE'', @source_owner = N''dbo'', @source_object = N''DB_TWO_TABLE_ONE'', @type = N''logbased'', @description = null, @creation_script
= null, @pre_creation_cmd = N''drop'', @schema_option = 0x000000000803509D, @identityrangemanagementoption = N''manual'', @destination_table = N''DB_TWO_TABLE_ONE'', @destination_owner = N''dbo'', @vertical_partition = N''false''
EXEC sp_executesql @SQL
fetch next from c_dblist into @dbname
end
close c_dblist
deallocate c_dblist
George P Botuwell, ProgrammerHi George,
Thank you for your question.
I am trying to involve someone more familiar with this topic for a further look at this issue. Sometime delay might be expected from the job transferring. Your patience is greatly appreciated.
Thank you for your understanding and support.
If you have any feedback on our support, please click
here.
Allen Li
TechNet Community Support -
Does anyone have a terminal script that can bind Macs to AD?
Looking to use terminal to bind our Macs to AD. Is there anyone who has done this process before?
Thanks for the help!Personally, we use Casper Suite and that works well especially since it's a 'set and forget' sort of thing. But I did find this. I've used some of these commands and this looks thorough.
PLEASE BE SURE TO TEST IN YOUR TEST AD ENVIRONMENT!!
#!/bin/sh
############################ AD_Bind_ARD ###########################
# Patrick Gallagher | [email protected]
# http://macadmincorner.com/bind-to-ad-using-apple-remote-desktop/
# This is a script that will bind a Mac to AD from ARD.
# Modified from Mike Bombich's ad-bind-login-tiger.sh script
# which can be found at http://www.bombich.com/mactips/scripts.html
# Needs to be modified for your enviornment
computerid=`/usr/sbin/scutil --get LocalHostName`
# Standard parameters
domain="domain.school.edu" # fully qualified DNS name of Active Directory Domain
udn="username" # username of a privileged network user
password="password" # password of a privileged network user
ou="CN=Computers,DC=domain,DC=school,DC=edu" # Distinguished name of container for the computer
# Advanced options
alldomains="enable" # 'enable' or 'disable' automatic multi-domain authentication
localhome="enable" # 'enable' or 'disable' force home directory to local drive
protocol="smb" # 'afp' or 'smb' change how home is mounted from server
mobile="enable" # 'enable' or 'disable' mobile account support for offline logon
mobileconfirm="disable" # 'enable' or 'disable' warn the user that a mobile acct will be created
useuncpath="disable" # 'enable' or 'disable' use AD SMBHome attribute to determine the home dir
user_shell="/bin/bash" # e.g., /bin/bash or "none"
preferred="-nopreferred" # Use the specified server for all Directory lookups and authentication
# (e.g. "-nopreferred" or "-preferred ad.server.edu")
admingroups="YOURDOMAIN\domain admins" # These comma-separated AD groups may administer the machine (e.g. "" or "APPLE\mac admins")
# Login hook setting -- specify the path to a login hook that you want to run instead of this script
### End of configuration
# Activate the AD plugin
defaults write /Library/Preferences/DirectoryService/DirectoryService "Active Directory" "Active"
plutil -convert xml1 /Library/Preferences/DirectoryService/DirectoryService.plist
sleep 5
# Bind to AD
dsconfigad -f -a $computerid -domain $domain -u $udn -p "$password" -ou "$ou"
# Configure advanced AD plugin options
if [ "$admingroups" = "" ]; then
dsconfigad -nogroups
else
dsconfigad -groups "$admingroups"
fi
dsconfigad -alldomains $alldomains -localhome $localhome -protocol $protocol \
-mobile $mobile -mobileconfirm $mobileconfirm -useuncpath $useuncpath \
-shell $user_shell $preferred
# Restart DirectoryService (necessary to reload AD plugin activation settings)
killall DirectoryService
# Add the AD node to the search path
if [ "$alldomains" = "enable" ]; then
csp="/Active Directory/All Domains"
else
csp="/Active Directory/$domain"
fi
#dscl /Search -create / SearchPolicy CSPSearchPath
#dscl /Search -append / CSPSearchPath "/Active Directory/All Domains"
#dscl /Search/Contacts -create / SearchPolicy CSPSearchPath
#dscl /Search/Contacts -append / CSPSearchPath "/Active Directory/All Domains"
# This works in a pinch if the above code does not
defaults write /Library/Preferences/DirectoryService/SearchNodeConfig "Search Node Custom Path Array" -array "/Active Directory/All Domains"
defaults write /Library/Preferences/DirectoryService/SearchNodeConfig "Search Policy" -int 3
defaults write /Library/Preferences/DirectoryService/ContactsNodeConfig "Search Node Custom Path Array" -array "/Active Directory/All Domains"
defaults write /Library/Preferences/DirectoryService/ContactsNodeConfig "Search Policy" -int 3
plutil -convert xml1 /Library/Preferences/DirectoryService/SearchNodeConfig.plist -
Underlying SQL or SQL Script for Calculated Views Create Graphically
Hello,
Is it possible to view the SQL or SQL script generated for calculated views that are created graphically?Hi Mike,
For your calculation view you will find the corresponding column view created in schema '_SYS_BIC'-->Column Tables->
<packagename>/<Calculation view> --> Open Definition of this and check the 'create statement'.
Note: This is a information modeler generated SQL script which will show the generated Calculation Scenario and the respective Column View.
Regards, Rahul
Seems the answer was already given by Murali while I typed
Edited by: Rahul Pant on Mar 2, 2012 5:22 AM -
Running sql script files to re create database
We have having around 10 sql script file that has sql statments inside it (example insert .... delete...update.... etc).Right now what we do is that in jdbc we open each script file, and read each line ,and then make jdbc call run jdbc for each sql statement inside the file.
Wondering if there is a better way to do this.
Right now the challenges are
1)The process goes wrong if there is an extra semi colon ...or extra space after a statments...etc...Basically I find this way of creating data odd...
2)it is slow because of the network traffic between application server and database server for every sql statements that gets executed.The solution for this issue is to do a batch update....But still I dont like this solution.
Can someone give me any better idea.
I am thinking to have all this sql script moved to a store procedure (rather than inside the sql script file) .JDBC then can pick this store procedure sql file ,and create this store procedure via jdbc, and then execute this store procedure.
This will be faster because all the sql will be running in the databsase.Only one trip to database to call this store procedure.
Is this a good idea ?
thx
mManjit wrote:
We have having around 10 sql script file that has sql statments inside it (example insert .... delete...update.... etc).Right now what we do is that in jdbc we open each script file, and read each line ,and then make jdbc call run jdbc for each sql statement inside the file.
Wondering if there is a better way to do this.
Right now the challenges are
1)The process goes wrong if there is an extra semi colon ...or extra space after a statments...etc...Basically I find this way of creating data odd...
2)it is slow because of the network traffic between application server and database server for every sql statements that gets executed.The solution for this issue is to do a batch update....But still I dont like this solution.
Can someone give me any better idea.
I am thinking to have all this sql script moved to a store procedure (rather than inside the sql script file) .JDBC then can pick this store procedure sql file ,and create this store procedure via jdbc, and then execute this store procedure.
This will be faster because all the sql will be running in the databsase.Only one trip to database to call this store procedure.
Is this a good idea ?
thx
mI'm not 100% sure i follow (it's Friday and i have a mild case of ADD).
Are you suggesting having the Java application create procedures in the database on the fly? If so i would say that's not a good idea.
Create the stored procedures in the database, have Java call them as needed to process data.
If you need to load copious amounts of data, look in to external tables, it's possible they could come in handy for what you are doing .... or not ... again, it's hard to say given i find your description of what's currently happening somewhat confusing. -
Hi, Dave.
If you're using the BlackBerry browser, you can't configure anything to bypass the RIM servers. I believe you may do so by using the Opera browser, but I haven't tried it myself so cannot comment with authority.
I hope that clears up the issue for you.
- If my response has helped you, please click "Options" beside my post and mark it as solved. Clicking the "thumbs up" icon near the bottom of my response would also be appreciated. -
T-SQL script help needed on creating a distribution.
Hello Team -
I'm new to T-SQL.
I have a set of sales reps and have accounts assigned to them. I want to be able to take out only those accounts for each
sales rep whose REVMIX won't exceed more than 10% (summing up the total revmix and capping it to <=10%). Not sure how to get to it.
Kindly help. Below is how the data looks like.
SALES REP
ACCOUNT_ID
REVENUE
TOTALREVENUE
REVMIX
23626
123456791
100
$44,100
0.2%
23626
123456793
300
$44,100
0.7%
23626
123456795
500
$44,100
1.1%
23626
123456797
700
$44,100
1.6%
23626
123456799
900
$44,100
2.0%
23626
123456801
1100
$44,100
2.5%
23626
123456803
1300
$44,100
2.9%
23626
123456805
1500
$44,100
3.4%
23626
123456807
1700
$44,100
3.9%
23626
123456809
1900
$44,100
4.3%
23626
123456811
2100
$44,100
4.8%
23626
123456813
2300
$44,100
5.2%
23626
123456815
2500
$44,100
5.7%
23626
123456817
2700
$44,100
6.1%
23626
123456819
2900
$44,100
6.6%
23626
123456821
3100
$44,100
7.0%
23626
123456823
3300
$44,100
7.5%
23626
123456825
3500
$44,100
7.9%
23626
123456827
3700
$44,100
8.4%
23626
123456829
3900
$44,100
8.84%
23626
123456831
4100
$44,100
9.30%
236267
123456802
4300
167500
2.57%
236267
123456814
4500
167500
2.69%
236267
123456826
4700
167500
2.81%
236267
123456838
4900
167500
2.93%
236267
123456850
5100
167500
3.04%
236267
123456862
5300
167500
3.16%
236267
123456874
5500
167500
3.28%
236267
123456886
5700
167500
3.40%
236267
123456898
5900
167500
3.52%
236267
123456910
6100
167500
3.64%
236267
123456922
6300
167500
3.76%
236267
123456934
6500
167500
3.88%
236267
123456946
6700
167500
4.00%
236267
123456958
6900
167500
4.12%
236267
123456970
7100
167500
4.24%
236267
123456982
7300
167500
4.36%
236267
123456994
7500
167500
4.48%
236267
123457006
7700
167500
4.60%
236267
123457018
7900
167500
4.72%
236267
123457030
8100
167500
4.84%
236267
123457042
8300
167500
4.96%
236267
123457054
8500
167500
5.07%
236267
123457066
8700
167500
5.19%
236267
123457078
8900
167500
5.31%
236267
123457090
9100
167500
5.43%
236268
123457102
9300
136500
6.81%
236268
123457114
9500
136500
6.96%
236268
123457126
9700
136500
7.11%
236268
123457138
9900
136500
7.25%
236268
123457150
10100
136500
7.40%
236268
123457162
10300
136500
7.55%
236268
123457174
10500
136500
7.69%
236268
123457186
10700
136500
7.84%
236268
123457198
10900
136500
7.99%
236268
123457210
11100
136500
8.13%
236268
123457222
11300
136500
8.28%
236268
123457234
11500
136500
8.42%
236268
123457246
11700
136500
8.57%This is close to a live data. There are about 23 rows here from the table. Sum(REVENUE) for the 10 rows would add up to 2380114.397. I will get 10% MIX if I divide it with RUNNINGTOTAL_REVENUE. For some reason when
I'm applying where condition it's not returning those first 10 rows. Not sure what the problem is. :(
SALESREP
ACCOUNT_ID
REVENUE
RUNNINGTOTAL_REVENUE
MIX
236300
ACCOUNT1
17917.83
23451885.59
0%
236300
ACCOUNT2
67402.07
23451885.59
0%
236300
ACCOUNT3
69576.646
23451885.59
0%
236300
ACCOUNT4
82828.84
23451885.59
0%
236300
ACCOUNT5
130955.866
23451885.59
1%
236300
ACCOUNT6
153865.04
23451885.59
1%
236300
ACCOUNT7
316329.34
23451885.59
1%
236300
ACCOUNT8
476030
23451885.59
2%
236300
ACCOUNT9
483660.01
23451885.59
2%
236300
ACCOUNT10
581548.755
23451885.59
2%
236300
ACCOUNT11
669007.05
23451885.59
3%
236300
ACCOUNT12
683942.12
23451885.59
3%
236300
ACCOUNT13
748481.98
23451885.59
3%
236300
ACCOUNT14
878047.8
23451885.59
4%
236300
ACCOUNT15
1127457.05
23451885.59
5%
236300
ACCOUNT16
1221103.91
23451885.59
5%
236300
ACCOUNT17
1422627.56
23451885.59
6%
236300
ACCOUNT18
1492686.19
23451885.59
6%
236300
ACCOUNT19
1698136.33
23451885.59
7%
236300
ACCOUNT20
2536279.246
23451885.59
11%
236300
ACCOUNT21
2618973.05
23451885.59
11%
236300
ACCOUNT22
2860847.283
23451885.59
12%
236300
ACCOUNT23
3114181.627
23451885.59
13% -
Has anyone has this problem:
1) I log onto my database (Oracle XE 10.2.0).
2) I open a SQL Script that I previously created and saved. The script is about 1700 bytes.
3) I edit the script. I run the script. I click "Edit Script" button on results screen.
4) Everything is fine.
5) I repeat these steps (1-4) 10 or 20 times and then all of a sudden all edits to my script stop saving.
A) When I run the script without explicitly saving the script, it runs the unedited version of the script.
B) When I explicitly save the script, the edits do not save.
C) If I log off the database and back on again, the effects are the same (beginning here with "5)" from the get-go).
D) I I log off the database, shut down IE 7.0, reboot IE, log back on to the database I begin here at "5)" again.
E) I mark all my script and copy it to clipboard. I replace script with 3 bytes: "aaa". I click "Save". The three bytes save.
F) I replace the 3 bytes with my original 1700 bytes of code. The 1700 bytes do not save; only the three bytes remain.
6) In summary, I would ask, "Is there a size limit to the amount of SQL script you can save using this application?". However, the problem with this question is that everything worked fine for me for one and one-half hours of using the app.
I will go now to reboot my machine to see if that resolves it.
I will report back here with the results of that experiment.
Anybody has any insight, I would be grateful 'cause this is frustrating!!
Thank you,
Mike Kemp
St. Petersburg, FLOK problem started right off the bat today.
But then again the computer had been up and running overnight, multiple users during that time, etc.
So I rebooted.
Script is up to 2120 bytes now.
Problem was not resoved by reboot.
No matter what I do I can't edit my script and have it save (I edit it, copy and paste to Notepad and move back and forth as needed ... however problem is that when I click "Run" it never recognizes the new script; it always runs the old one).
Let me take my 2120-byte script and paste it into a brand-new Script Editor window and see if it will run from there (thinking that maybe this Apex thing just can't run long scripts at all)....
OK that works!!
Hmmmm...so looks to me like Apex Script Editor can't edit long scripts (I started running into problems when my script exceeded 1700 bytes).
I'll keep posting back here in case somebody big in Oracle Apex World (I just heard Tom Kyte talking about the guy who created Apex ... can't remember his name now) cares.
I know, I know they'll probably tell me it's user error :-)
-Mike -
Hi, all. We've got a SQL script that will call the HOST and pass some parameters. One parameter, JOB_TYPE is set from a function call. The other variables are passed into the SQL script as parameters and they work fine. However, the JOB_TYPE variable's value is not being passed to the shell script,
JOB_TYPE := f_get_job_type(person_id);
--host $MY_HOME/mods/general/myjobs.shl &chain JOB_TYPE &username &pw &one_up &printer &special_print ""
It thinks that we're passing the actual string "job_type" in. We've tried using "&" but that doesn't work either. Your help is appreciated.SQL> var jobtype number
SQL> exec :jobtype := power(2,10)
PL/SQL procedure successfully completed.
SQL> col :jobtype new_v jobtype
SQL> select :jobtype from dual;
:JOBTYPE
1024
SQL> host echo hello &jobtype
hello 1024 -
What is the easiest tool to debug an SQL script in Oracle XE environment?
I try to run a simple sql script that creates tables with their keys on Oracle XE. When it runs into bunch errors, I have difficult time to locate the mistake. One of the reason is, I don't know how to view the script in color that distinguishes the syntax like virtual C++ editor treats their text code.
Can XE do this? If not, is there any easier way to debug a script in its environment?
Much appreciated. Pardon for the triviality nature of the question.[PL/SQL Developer|http://www.allroundautomations.com/plsqldev.html] lets you step through a SQL*Plus-style script one command at a time.
SQL*Plus (Oracle's very basic command-line tool) has [WHENEVER OSERROR|http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14357/ch12051.htm] and [WHENEVER SQLERROR|http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14357/ch12052.htm] settings that make it jump out of the script on OS or database failure, but that's about it. Other tools such as PL/SQL Developer, SQL Developer and (if you must) TOAD attempt to emulate SQL*Plus commands to some extent but you'd have to check the documentation to see what commands they support.
Scripts aren't a compiled programming language like C++ or PL/SQL so there is no interactive debugger. -
Execute SQL scripts in Oracle DB
Hi ,
Can someone give stepbystep flow to execute sql scripts(patches) in oracle db on unix server.SQL scripts and patches are generally two completely different things.
Assuming you are referring to patches that you download from My Oracle Support (MOS), each patch and patchset comes with a README. That README has specific instructions for installing that particular patch in whatever version of Oracle you have running on whatever operating system you have with whatever database options you have in use. It wouldn't make sense to try to summarize that document here-- we would undoubtedly leave something out that may be important to you and there may be patch-specific instructions.
Justin -
"ORA-1722 Invalid number" error while runing a SQL script in SQL*Plus
Hello,
I created a SQL script that is intended to populate tables with
baseline data. When I run the script in the SQL*Plus program
that comes with the Oracle 8.1.6 (client), I receive an "ORA-
1722 Invalid number".
The error always occurs when SQL*Plus tries to execute the
following SQL statement:
insert into components(db_ind,module_id,ext_compid,active) values
('cm',modules_seq.currval,1046682,'y');
The datatypes for the columns on the components table are as
follows:
db_ind varchar2(2);
module_id number;
ext_compid number;
active varchar2(1);
It seems that for some reason Oracle is having trouble
recognizing 1046682 as a number.
I also tried the following INSERT statements to see if that
would work:
insert into components(db_ind,module_id,ext_compid,active) values
('cm',modules_seq.currval,to_number('1046682'),'y');
insert into components(db_ind,module_id,ext_compid,active) values
('cm',modules_seq.currval,'1046682','y');
but I still receive the same error message
Is there some NLS setting(s) I need to modify so that Oracle
does not give me this error? Does anyone know the answer to
this problem?
Your help is greatly appreciated.
Oscar
(NOTE: I also receive this same error when trying run the
script in SQL Navigator and Toad programs)Please see the following docs.
R12: JBO-27122 Error Message Clicking On Supplier Accounting Link With Unexpected Error [ID 1218903.1]
Supplier Management Accounting Link Gives Unexpected Error and JBO-27122 at SELECT * FROM (select pvsa.ADDRESS_STYLE [ID 1340655.1]
Adding Accounting Information or Operating Unit Information fails with APP-FND-1564: ORACLE error 1722 in FDFGVD [ID 364265.1]
Thanks,
Hussein -
Error in SQL script generated from OWB 10.1.0.4.0 Metadata Export Bridge
Hi... maybe i´m abusing this forum .. but .. when you have questions .. you have to look for answers
I use OWB 10.1.0.4 to buid some dimensions and one cube. I validate and generate this object and the result was successful.
I made the deployment and everithing goes OK !!!.
The problem appears when i want to generate metadata over this objects. I use the option Project > Metadata > Export > Gridge and use the option "Oracle 9i OLAP" like the product where i want to transfer the metadata .. and i got the SQL script without any errors. I suppose that i take the sql script i run it into SQL*plus ... so i do it.. and i got this errors:
declare
ERROR at line 1:
ORA-06501: PL/SQL: program error
ORA-06512: at line 119
ORA-06510: PL/SQL: unhandled user-defined exception
The same error for any dimension in script..
Any help .. will be fully valued for me ..
best regards
Lisandro.But how did you identify that there are no runtime records in all_rt_audit_executions for your PL/SQL procedure?
I guess you tried to search by procedure name... (but what column you used for searching)
In my case all_rt_audit_executions and wb_rtv_audit_executions contains the same number of records, so they should be always in sync.
Oleg -
OEM12c Job - Run a SQL Script from a central location against multiple targets
Hi All:
I need to execute a SQL script that can be run as OEM Job against multiple targets from a single location so that the output csv files are all in that central location. My problem is that the sql script job documentation says "Make sure that the script file is installed in the appropriate location on all targets". Is anyone aware of a way I can do this so that the SQl script is executed from a location on my OMS console?
CheersHi
Create SQL job to run against on the server. Save those results (csv) file in local target. And crete one OS job, to collect all csv files into your OMS Console.
Regards
Krishnan
Maybe you are looking for
-
Lost my purchased songs on my IPOD nano but still in my library
I don't understand, one minute they were there and now 90 songs won't upload back to my ipod. I've tried everything. HELP
-
Hi, i have scenario (XML file to RFC), it's by BPM, I can see XML content by file sender adapter but can't get detail field data into my data type of interface. what's wrong, please advise! Thanks! my data type as follows, EXPORT Complex type
-
Edit in photoshop image opens without Lightroom adjustments.
Images opened edit in in photoshop do not have the auto adjustment made in Lightroom but brush adjustments made do appear, When i close the picture in Photoshop and open it for a second time all the adjustments are there. also the same thing happe
-
When Safari opens all of my favourites come up as open tabs. I have tried changing settings and deleting and reopening! I removed all favourites but still all open up at start? I have set a homepage and that doesn't come up upon starting safari ei
-
Hi, I am trying to configure ESS in EP 6.0 . I am getting the following error. What am i supposed to do. I had created a system to connect to R/3 .How am i supposed to proceed after this. Any suggestions ! <b>Portal Runtime Error An exception occurr