PL/SQL... avoiding the database
Dear all,Maybe it's a weird question, but I want to run PL/SQL processes without writing them in the database. Let me explain...
In the past, I've always used "CREATE OR REPLACE PROCEDURE... "to write PL/SQL code.
However, with my current client data is "locked" and I don't have permissions to do this. Usually, this is not a problem, as almost everything I do can be managed with SQL scripts that I can call with SQL * more. No problem.
But there are a few points where it would be very nice to set up a simple loop and repeatedly call some SQL commands (send a different filter/parameter each time clause). So my question is whether it is possible to write code PL/SQL 'temporary' in a SQL script, call this script (with SQL * more) and then to have this script without writing in the database?
If so, then maybe someone knows a link or a howto that I can take a look at?
Best regards and many thanks,
Alan Searle
They are called anonymous blocks. You can do it like that.
DECLARE
BEGIN
END;
/
It can run directly within your window of sqlplus.
Thank you
Knani.
Tags: Database
Similar Questions
-
re-writing of form pl/sql in the database
Hi How can I re - write it in the database with a goal to use this application java adf
It's shape when next object triggers I have what it takes to call it from java applications how can I re - write it in the database
the goal is to do something like this Blog of Zeeshan Baig: the PL/SQL procedure call and function in the Oracle ADF application
The example uses several: block.field references, you will likely spend as IN OUT parameters. The 'message' + form_trigger_failure construction will have to be retransmitted, perhaps as a normal using raise_application_error() exception, but I don't know how he handles your Java environment. (He might have to analyze the exception and pull on the top-level message, depending on the amount of information you want to expose to your users.)
(While you are wearing it to Java, you may fix the double full stop in the error message. I bet that that has been tapped some poor end user since 1997)
-
Need help to record execution time of SQL in the database
Hello
I have an interesting thing that I am tiring to do. I want to record how much time (wall clock) it took the database to execute a select statement against a particular view lets call it CUST_ORDERS_V.
I want to check which ran, what the select statement (SQL text) and how long it took and perhaps a few other auxiliary things if possible.
Research in most of my needs me to right audit Oracle and the SYS. AUD $ table. After you set up auditing with:
I get every piece of information that I need, except for the time of execution. Wow that would be awesome if Oracle who recorded! So I thought that if I could. I was considering a trigger on SYS. AUD$ (I know bad thoughts) which would look at some reviews of $ V and get the runtime and write this in other tables custom with a link back to SYS. AUD$.audit_trail=db,extended and audit select on ME.CUST_ORDERS_V by access;
Maybe this is the complete wrong way to do it. I was wondering if anyone had any ideas on that.
I'm running on 11.2.0.3 EA. I'm on EA if I use Fine grain audit if necessary. However I DO NOT have the Tuning or Pack diagnosis.Sky13 wrote:
It's a call center and people on phones have learned that they can blame the database for their lack of productivity. Knowing the TSMITH selected in the 210 view times in his shift and the DB responded within the "Acceptable" range 99.5% of the time would be invaluable.If you're running at three levels (and this seems very likely) then your intermediate level probably has a record feature which can be enabled via a change of a line in a configuration file so that it will write a log record in a flat file for each call to the database with information such as : (source, time, start sql statement, return time). It is probably a better place to find a solution to your problem.
Concerning
Jonathan Lewis -
What do I need to run adsysapp2.sql in the database of R12?
Hi, experts:
I'm migrating a 11.2.0.3 R12 database of HP following Linux notes 741818.1. I work on the step 8. Establish the diagram of the SYSTEM. After execution of the
script ausy1120.sql, I saw that a command in the log file says "You must run adsysapp.sql to create packages of Oracle Applications in the scheme of the SYSTEM.". What do I need to run this? It is not said in the note. At this point I just create a database structure. No given no request.
Thanks and regards.
Thank you so much, Hussein.
-
Here's my question after tons of research and test without have the right solutions.
Target:
(1) I have a 12.1.0.2 database unique main enterprise 'testdb' as database instance running on the server "node1".
(2) I created physical standby database "stbydb" on the server "node2".
(3) DataGuard running on the mode of MaxAvailability (SYNC) with roll forward in real time 12 default c apply.
(4) primary database has 3 groups of one-man redo. (/oraredo/testdb/redo01.log redo02.log redo03.log)
(5) I've created 4 standby redo logfiles (/oraredo/testdb/stby01.log stby02.log stby03.log stby04.log)
(6) I do RMAN backup (database and archivelog) on the site of relief only.
(7) I want to use this backup for full restore of the database on the primary database.
He is a DR test to simulate the scenario that has lost every primary & Eve total servers.
Here is how to save, on the database pending:
(1) performance 'alter database recover managed standby database Cancel' to ensure that compatible data files
(2) RMAN > backup database;
(3) RMAN > backup archivelog all;
I got elements of backup and copied to primary db Server something like:
/Home/Oracle/backupset/o1_mf_nnndf_TAG20151002T133329_c0xq099p_.BKP (data files)
/Home/Oracle/backupset/o1_mf_ncsnf_TAG20151002T133329_c0xq0sgz_.BKP (spfile & controlfile)
/Home/Oracle/backupset/o1_mf_annnn_TAG20151002T133357_c0xq15xf_.BKP (archivelogs)
So here's how to restore, on the main site:
I clean all the files (data files, controlfiles oder all gone).
(1) restore spfile from pfile
RMAN > startup nomount
RMAN > restore spfile from pfile ' / home/oracle/pfile.txt' to ' / home/oracle/backupset/o1_mf_ncsnf_TAG20151002T133329_c0xq0sgz_.bkp';
(2) modify pfile to convert to db primary content. pFile shows below
*.audit_file_dest='/opt/Oracle/DB/admin/testdb/adump '
* .audit_trail = "db".
* full = '12.1.0.2.0'
*.control_files='/oradata/testdb/control01.ctl','/orafra/testdb/control02.ctl'
* .db_block_size = 8192
* .db_domain = "
*.db_file_name_convert='/testdb/','/testdb /'
* .db_name = "testdb".
* .db_recovery_file_dest ='/ orafra'
* .db_recovery_file_dest_size = 10737418240
* .db_unique_name = "testdb".
*.diagnostic_dest='/opt/Oracle/DB '
* .fal_server = "stbydb".
* .log_archive_config = 'dg_config = (testdb, stbydb)'
* .log_archive_dest_2 = "service = stbydb SYNC valid_for = (ONLINE_LOGFILE, PRIMARY_ROLE) db_unique_name = stbydb'"
* .log_archive_dest_state_2 = 'ENABLE '.
*.log_file_name_convert='/testdb/','/testdb /'
* .memory_target = 1800 m
* .open_cursors = 300
* runoff = 300
* .remote_login_passwordfile = "EXCLUSIVE."
* .standby_file_management = "AUTO".
* .undo_tablespace = "UNDOTBS1.
(3) restart db with updated file pfile
SQLPLUS > create spfile from pfile='/home/oracle/pfile.txt'
SQLPLUS > the judgment
SQLPLUS > startup nomount
(4) restore controlfile
RMAN > restore primary controlfile to ' / home/oracle/backupset/o1_mf_ncsnf_TAG20151002T133329_c0xq0sgz_.bkp';
RMAN > change the editing of the database
(5) all elements of backup catalog
RMAN > catalog starts by ' / home/oracle/backupset / '.
(6) restore and recover the database
RMAN > restore database;
RMAN > recover database until the SNA XXXXXX; (this YVERT is the maximum in archivelog backups that extends beyond the scn of the backup of the data file)
(7) open resetlogs
RMAN > alter database open resetlogs;
Everything seems perfect, except one of the file log roll forward pending is not generated
SQL > select * from v$ standby_log;
ERROR:
ORA-00308: cannot open archived log ' / oraredo/testdb/stby01.log'
ORA-27037: unable to get file status
Linux-x86_64 error: 2: no such file or directory
Additional information: 3
no selected line
I intended to use the same backup to restore primary basic & helps record traffic and the downtime between them in the world of real output.
So I have exactly the same steps (except STANDBY restore CONTROLFILE and not recover after database restore) to restore the database pending.
And I got the same missing log file.
The problem is:
(1) complete alert.log filled with this error, not the concern here
(2) now repeat it in real time apply won't work since the Party shall LGWR shows always "WAITING_FOR_LOG."
(3) I can't delete and re-create this log file
Then I tried several and found:
The missing standby logfile was still 'ACTIVE' at present RMAN backup was made.
For example, on db standby, under Group #4 (stby01.log) would be lost after the restoration.
SQL > select GROUP #, SEQUENCE #, USE (s), the STATUS from v$ standby_log;
GROUP # SEQUENCE # USED STATUS
---------- ---------- ---------- ----------
4 19 ACTIVE 133632
5 0 0 UNASSIGNED
6 0 0 not ASSIGNED
7 0 0 UNASSIGNED
So until I take the backup, I tried on the primary database:
SQL > alter system set log_archive_dest_state_2 = delay;
This was the Group of standby_log side Eve #4 was released:
SQL > select GROUP #, SEQUENCE #, USE (s), the STATUS from v$ standby_log;
GROUP # SEQUENCE # USED STATUS
---------- ---------- ---------- ----------
4 0 0 UNASSIGNED
5 0 0 UNASSIGNED
6 0 0 not ASSIGNED
7 0 0 UNASSIGNED
Then, the backup has been restored correctly without missing standby logfile.
However, to change this primary database means break DataGuard protection when you perform the backup. It's not accept on the production environment.
Finally, my real questions come:
(1) what I do may not do on parameter change?
(2) I know I can re-create the control file to redo before delete and then recreate after. Is there any simple/fast to avoid the standby logfile lost or recreate the lost one?
I understand that there are a number of ways to circumvent this. Something to keep a copy of the log file waiting restoration progress and copy up one missing, etc, etc...
And yes I always have done no real-time applies "to the aid of archived logfile" but is also not accept mode of protection of production.
I just want proof that the design (which is displayed in a few oracle doc Doc ID 602299.1 is one of those) that backs up data backup works effectively and can be used to restore the two site. And it may be without spending more time to resume backups or put the load on the primary database to create the database before.
Your idea is very much appreciated.
Thank you!
Hello
1--> when I take via RMAN backup, RMAN does not redo log (ORL or SRL) file, so we cannot expect ORLs or SRL would be restored.
2nd--> when we opened the ORL database should be deleted and created
3rd--> Expecting, SRL should not be an issue.we should be able to do away with the fall.
DR sys@cdb01 SQL > select THREAD #, SEQUENCE #, GROUP #, STATUS from v$ standby_log;
THREAD # SEQUENCE # GROUP # STATUS
---------- ---------- ---------- ----------
1 233 4 ACTIVE
1 238 5 ACTIVE
DR sys@cdb01 SQL > select * from v$ logfile;
GROUP # STATUS TYPE MEMBER IS_ CON_ID
---------- ------- ------- ------------------------------ --- ----------
3 /u03/cdb01/cdb01/redo03.log no. 0 online
/U03/cdb01/cdb01/redo02.log no. 0 2 online
1 /u03/cdb01/cdb01/redo01.log no. 0 online
4 /u03/cdb01/cdb01/stdredo01.log WATCH No. 0
/U03/cdb01/cdb01/stdredo02.log EVE 5 No. 0
DR sys@cdb01 SQL > ! ls - ltr /u03/cdb01/cdb01/stdredo01.log
method: cannot access the /u03/cdb01/cdb01/stdredo01.log: no such file or directory
DR sys@cdb01 SQL >! ls - ltr /u03/cdb01/cdb01/stdredo02.log
-rw - r-. 1 oracle oinstall 52429312 17 Oct 15:32 /u03/cdb01/cdb01/stdredo02.log
DR sys@cdb01 SQL > alter database force claire logfile 4;
change the database group claire logfile 4
*
ERROR on line 1:
ORA-01156: recovery or current flashback may need access to files
DR sys@cdb01 SQL > alter database recover managed standby database cancel;
Database altered.
DR sys@cdb01 SQL > change the database group claire logfile 4;
Database altered.
DR sys@cdb01 SQL > ! ls - ltr /u03/cdb01/cdb01/stdredo01.log
-rw - r-. 1 oracle oinstall 52429312 17 Oct 15:33 /u03/cdb01/cdb01/stdredo01.log
DR sys@cdb01 SQL >
If you do, you can recreate the controlfile without waiting for redo log entry...
If you still think it's something is not acceptable, you must have SR with support to analyze why he does not abandon SRL when controlfile_type is "underway".
Thank you
-
Please help
Janet Oluwadunsin wrote:
Thanks Steve, I appreciate your correction.
I want to start the listener from the command prompt, I have connected successfully to sql plus, but I don't remember how I'll get my way to
[oracle@oel6 journal] $
at startup my interlocutor.
I hope this helps
And just to clarify my and other previous posts... you do NOT get to a command prompt and start your receiver from sqlplus. sqlplus is a command-line that connects to a database and provides a user interface to the question of the sql to the database statements. lsncrctl is another command line utility, used to send commands to the listener. lsnrctl and sqlplus are two completely separate and distinct, all tools two started from the command line of the operating system, that have nothing to do with the other. Neither one is a kind of 'gateway' to the other.
-
ColdFusion 10 - cannot create the database
I think that this error has to do with permissions, but I'm not sure. I'm not under personal service accounts to run IIS 7.5 or Coldfusion. There is some dirt on my server and Setup:
Server product ColdFusion Version ColdFusion 10,282913 Edition Developer Operating system Windows Server 2008 R2 OS version 6.1 Update level /C:/ColdFusion10/cfusion/lib/updates/chf10000002.jar Version of the Adobe driver 4.1 (build 0001) Details of the JVM
Java version 1.6.0_29 History of this server:
A installed version 9.0.1. Installled CF 10 Beta and then uninstalled beta 9 and 10 to install 10 final. Ran into a problem with IIS 7.5 refusing to release some settings somewhere deep beyond web.config files so it was a dev server I simply uninstalled IIS 7.5 role and also uninstalled WAS, wonderful Windows Process Activation Service, test function (if it is really what it is... more as a burden IMO) and delete the files C:\ColdfusionX and C:\inetpub to purge settings and garbage. I then rebooted and again installed IIS and WAS. The previous problem had nothing to do with the substance of data base, it was the IIS for CF 10 connector not properly be created and applied by IIS, resulting in .cfm files offered for download.
After all the changes, I was able to connect to the CF admin date to which I applied the update of 10 CF 2. Web server here on out stuff is practically install stock.
I created the directory C:/ColdFusion10/cfusion/db/andHalt/and then to data sources to create the embedded Apache Derby database.
Error just after the attempt to create the data source:
Connection verification failed for data source: andHalt
org.apache.derby.impl.jdbc.EmbedSQLException: cannot create the database "C: / ColdFusion10/cfusion/db/andHalt /', see the following exception for more details."
The root cause was that: java.sql.SQLException: unable to create the database "C: / ColdFusion10/cfusion/db/andHalt /', see the following exception for more details."
Logs show a very little bit of detail that does not help me to find a crowd of CF related Google goodies so I come here to read more in the knowledge depth and because Murphy's law still nips at my heels I'm always towing in good errors for the people gawk and awk to
Sun Oct 14 22:58:03 CDT 2012 Thread [Thread-24, 5, main] cleanup from action
java.sql.SQLException: unable to create the database "C: / ColdFusion10/cfusion/db/andHalt /', see the following exception for more details."
at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException (unknown Source)
at org.apache.derby.impl.jdbc.Util.newEmbedSQLException (unknown Source)
at org.apache.derby.impl.jdbc.Util.seeNextException (unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection.createDatabase (unknown Source)
to org.apache.derby.impl.jdbc.EmbedConnection. < init >(Unknown Source)
to org.apache.derby.impl.jdbc.EmbedConnection30. < init >(Unknown Source)
to org.apache.derby.impl.jdbc.EmbedConnection40. < init >(Unknown Source)
at org.apache.derby.jdbc.Driver40.getNewEmbedConnection (unknown Source)
at org.apache.derby.jdbc.InternalDriver.connect (unknown Source)
at org.apache.derby.jdbc.EmbeddedDriver.connect (unknown Source)
at coldfusion.server.j2ee.sql.pool.JDBCPool.createPhysicalConnection(JDBCPool.java:614)
to coldfusion.server.j2ee.sql.pool.ConnectionRunner$ RunnableConnection.run (ConnectionRunner. java: 67)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.sql.SQLException: unable to create the database "C: / ColdFusion10/cfusion/db/andHalt /', see the following exception for more details."
at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException (unknown Source)
at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA (unknown Source)
... 13 more
Caused by: java.sql.SQLException: the database directory "C:\ColdFusion10\cfusion\db\andHalt" exist. However, it does not contain the file expected 'service.properties '. Perhaps, Derby has been reduced in the middle of the creation of this database. You can remove this directory and try again to create the database.
at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException (unknown Source)
at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA (unknown Source)
at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException (unknown Source)
at org.apache.derby.impl.jdbc.Util.generateCsSQLException (unknown Source)
at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException (unknown Source)
at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException (unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection.handleException (unknown Source)
... more than 10
Caused by: ERROR XBM0A: the directory database "C:\ColdFusion10\cfusion\db\andHalt" exist. However, it does not contain the file expected 'service.properties '. Perhaps, Derby has been reduced in the middle of the creation of this database. You can remove this directory and try again to create the database.
at org.apache.derby.iapi.error.StandardException.newException (unknown Source)
at org.apache.derby.impl.services.monitor.StorageFactoryService.vetService (unknown Source)
to org.apache.derby.impl.services.monitor.StorageFactoryService.access$ 600 (unknown Source)
to org.apache.derby.impl.services.monitor.StorageFactoryService$ 9.run (unknown Source)
at java.security.AccessController.doPrivileged (Native Method)
at org.apache.derby.impl.services.monitor.StorageFactoryService.createServiceRoot (unknown Source)
at org.apache.derby.impl.services.monitor.BaseMonitor.bootService (unknown Source)
at org.apache.derby.impl.services.monitor.BaseMonitor.createPersistentService (unknown Source)
at org.apache.derby.iapi.services.monitor.Monitor.createPersistentService (unknown Source)
... more than 10
= launch nested exception, level (1) =.
java.sql.SQLException: the database directory "C:\ColdFusion10\cfusion\db\andHalt" exist. However, it does not contain the file expected 'service.properties '. Perhaps, Derby has been reduced in the middle of the creation of this database. You can remove this directory and try again to create the database.
at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException (unknown Source)
at org.apache.derby.impl.jdbc.Util.generateCsSQLException (unknown Source)
at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException (unknown Source)
at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException (unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection.handleException (unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection.createDatabase (unknown Source)
to org.apache.derby.impl.jdbc.EmbedConnection. < init >(Unknown Source)
to org.apache.derby.impl.jdbc.EmbedConnection30. < init >(Unknown Source)
to org.apache.derby.impl.jdbc.EmbedConnection40. < init >(Unknown Source)
at org.apache.derby.jdbc.Driver40.getNewEmbedConnection (unknown Source)
at org.apache.derby.jdbc.InternalDriver.connect (unknown Source)
at org.apache.derby.jdbc.EmbeddedDriver.connect (unknown Source)
at coldfusion.server.j2ee.sql.pool.JDBCPool.createPhysicalConnection(JDBCPool.java:614)
to coldfusion.server.j2ee.sql.pool.ConnectionRunner$ RunnableConnection.run (ConnectionRunner. java: 67)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.sql.SQLException: the database directory "C:\ColdFusion10\cfusion\db\andHalt" exist. However, it does not contain the file expected 'service.properties '. Perhaps, Derby has been reduced in the middle of the creation of this database. You can remove this directory and try again to create the database.
at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException (unknown Source)
at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA (unknown Source)
... 15 more
Caused by: ERROR XBM0A: the directory database "C:\ColdFusion10\cfusion\db\andHalt" exist. However, it does not contain the file expected 'service.properties '. Perhaps, Derby has been reduced in the middle of the creation of this database. You can remove this directory and try again to create the database.
at org.apache.derby.iapi.error.StandardException.newException (unknown Source)
at org.apache.derby.impl.services.monitor.StorageFactoryService.vetService (unknown Source)
to org.apache.derby.impl.services.monitor.StorageFactoryService.access$ 600 (unknown Source)
to org.apache.derby.impl.services.monitor.StorageFactoryService$ 9.run (unknown Source)
at java.security.AccessController.doPrivileged (Native Method)
at org.apache.derby.impl.services.monitor.StorageFactoryService.createServiceRoot (unknown Source)
at org.apache.derby.impl.services.monitor.BaseMonitor.bootService (unknown Source)
at org.apache.derby.impl.services.monitor.BaseMonitor.createPersistentService (unknown Source)
at org.apache.derby.iapi.services.monitor.Monitor.createPersistentService (unknown Source)
... more than 10
= end of the nested exception, level (1) =.
= launch nested exception, level (2) =.
java.sql.SQLException: the database directory "C:\ColdFusion10\cfusion\db\andHalt" exist. However, it does not contain the file expected 'service.properties '. Perhaps, Derby has been reduced in the middle of the creation of this database. You can remove this directory and try again to create the database.
at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException (unknown Source)
at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA (unknown Source)
at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException (unknown Source)
at org.apache.derby.impl.jdbc.Util.generateCsSQLException (unknown Source)
at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException (unknown Source)
at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException (unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection.handleException (unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection.createDatabase (unknown Source)
to org.apache.derby.impl.jdbc.EmbedConnection. < init >(Unknown Source)
to org.apache.derby.impl.jdbc.EmbedConnection30. < init >(Unknown Source)
to org.apache.derby.impl.jdbc.EmbedConnection40. < init >(Unknown Source)
at org.apache.derby.jdbc.Driver40.getNewEmbedConnection (unknown Source)
at org.apache.derby.jdbc.InternalDriver.connect (unknown Source)
at org.apache.derby.jdbc.EmbeddedDriver.connect (unknown Source)
at coldfusion.server.j2ee.sql.pool.JDBCPool.createPhysicalConnection(JDBCPool.java:614)
to coldfusion.server.j2ee.sql.pool.ConnectionRunner$ RunnableConnection.run (ConnectionRunner. java: 67)
at java.lang.Thread.run(Thread.java:662)
Caused by: ERROR XBM0A: the directory database "C:\ColdFusion10\cfusion\db\andHalt" exist. However, it does not contain the file expected 'service.properties '. Perhaps, Derby has been reduced in the middle of the creation of this database. You can remove this directory and try again to create the database.
at org.apache.derby.iapi.error.StandardException.newException (unknown Source)
at org.apache.derby.impl.services.monitor.StorageFactoryService.vetService (unknown Source)
to org.apache.derby.impl.services.monitor.StorageFactoryService.access$ 600 (unknown Source)
to org.apache.derby.impl.services.monitor.StorageFactoryService$ 9.run (unknown Source)
at java.security.AccessController.doPrivileged (Native Method)
at org.apache.derby.impl.services.monitor.StorageFactoryService.createServiceRoot (unknown Source)
at org.apache.derby.impl.services.monitor.BaseMonitor.bootService (unknown Source)
at org.apache.derby.impl.services.monitor.BaseMonitor.createPersistentService (unknown Source)
at org.apache.derby.iapi.services.monitor.Monitor.createPersistentService (unknown Source)
... more than 10
= end of the nested exception, level (2) =.
= launch nested exception, level (3) =.
ERROR XBM0A: The directory of database 'C:\ColdFusion10\cfusion\db\andHalt' exists. However, it does not contain the file expected 'service.properties '. Perhaps, Derby has been reduced in the middle of the creation of this database. You can remove this directory and try again to create the database.
at org.apache.derby.iapi.error.StandardException.newException (unknown Source)
at org.apache.derby.impl.services.monitor.StorageFactoryService.vetService (unknown Source)
to org.apache.derby.impl.services.monitor.StorageFactoryService.access$ 600 (unknown Source)
to org.apache.derby.impl.services.monitor.StorageFactoryService$ 9.run (unknown Source)
at java.security.AccessController.doPrivileged (Native Method)
at org.apache.derby.impl.services.monitor.StorageFactoryService.createServiceRoot (unknown Source)
at org.apache.derby.impl.services.monitor.BaseMonitor.bootService (unknown Source)
at org.apache.derby.impl.services.monitor.BaseMonitor.createPersistentService (unknown Source)
at org.apache.derby.iapi.services.monitor.Monitor.createPersistentService (unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection.createDatabase (unknown Source)
to org.apache.derby.impl.jdbc.EmbedConnection. < init >(Unknown Source)
to org.apache.derby.impl.jdbc.EmbedConnection30. < init >(Unknown Source)
to org.apache.derby.impl.jdbc.EmbedConnection40. < init >(Unknown Source)
at org.apache.derby.jdbc.Driver40.getNewEmbedConnection (unknown Source)
at org.apache.derby.jdbc.InternalDriver.connect (unknown Source)
at org.apache.derby.jdbc.EmbeddedDriver.connect (unknown Source)
at coldfusion.server.j2ee.sql.pool.JDBCPool.createPhysicalConnection(JDBCPool.java:614)
to coldfusion.server.j2ee.sql.pool.ConnectionRunner$ RunnableConnection.run (ConnectionRunner. java: 67)
at java.lang.Thread.run(Thread.java:662)
= end of the nested exception, level (3) =.
Complete cleaning action
Ah shucks! I can't believe how far from the solution I was looking for. Documentation has revealed what I had to do it even if it honestly should have probably been better treated with the best comments of the error.
http://help.Adobe.com/en_US/ColdFusion/10.0/Admin/WSc3ff6d0ea77859461172e0811cbf364104-7FD a.html
"Note: when you add an Apache Derby Embedded data source, verify that the specified directory does not exist."
Which is a bit ridiculous given a fileOpen dialog box is provided which means just the opposite.
I came across this problem before CF 9 awhile back and I am surprised it is still hidden and I had forgotten about it.
-
How to avoid the duplicateConnection on a sql database?
I have a database of newspapers that I have access to both c ++ and QML.
While everything works correctly logs qml page complained about a double connection whenever it is open, which in turn spam log file.
In c ++, the database is initialized once, with db being QSqlDatabase:
QString databaseFileName = QDir::homePath() + QDir::separator() + "logs.db"; db = QSqlDatabase::addDatabase("QSQLITE", "loggerDatabase");if (!db.open()) { printf("Critical: Error opening logs database\n");}
QML, I use a very simple way to view the contents of the db: A GroupDataModel with a data source.
I have set up a query on the data source and fill in the datamodel with the result:
DataSource { id: dataSource source: loggerService.dbPath onDataLoaded: { dataModel.clear(); dataModel.insertList(data); } }
I assume that the data source uses SQLDataAccess to open a connection to the db, and db already has a connection there is a complaint:
QSqlDatabasePrivate::addDatabase: duplicate connection name ' / accounts/1000/appdata/x/data/logs.db' old deleted connection.
How can I avoid this?
I've given up trying through QML and just dynamically added the groupDataModel of c ++.
I was getting the same error, without reason.
-
SQL query to avoid the PL/SQL
Hello
I'm doing below pl/sql block in a single stm SQL, let me know how could achieve us.
Here I use SELECT * FROM TEMP_ORDER WHERE DB_NAME = V_DBNAME which runs a cursor to get the separate database names.
This V_DBNAME could be avoided? and put everything in a single SQL?
(The PL/SQL block is not running properly because several rows are returned) I would be interested in the SQL solution.
create table TEMP_ORDER ( ORD1 VARCHAR2(25), ORD2 VARCHAR2(25), DB_NAME VARCHAR2(25) ) INSERT INTO TEMP_ORDER(ORD1,ORD2,DB_NAME) VALUES('A1','FIRST ORDER','DB1'); INSERT INTO TEMP_ORDER(ORD1,ORD2,DB_NAME) VALUES('A2','SECOND ORDER','DB2'); INSERT INTO TEMP_ORDER(ORD1,ORD2,DB_NAME) VALUES('A3','THIRD ORDER','DB1'); create table TEMP_PAYMENT ( PAY1 VARCHAR2(25), PAY2 VARCHAR2(25), DB_NAME VARCHAR2(25) ) INSERT INTO TEMP_PAYMENT(PAY1,PAY2,DB_NAME) VALUES('A1','FIRST PAYMENT','DB1'); INSERT INTO TEMP_PAYMENT(PAY1,PAY2,DB_NAME) VALUES('A2','SECOND PAYMENT','DB2'); INSERT INTO TEMP_PAYMENT(PAY1,PAY2,DB_NAME) VALUES('A3','THIRD PAYMENT','DB1'); create table TEMP_DELIVER ( DEL1 VARCHAR2(25), DEL2 VARCHAR2(25), DB_NAME VARCHAR2(25) ) INSERT INTO TEMP_DELIVER(DEL1,DEL2,DB_NAME) VALUES('A1','FIRST DELIVER','DB1'); INSERT INTO TEMP_DELIVER(DEL1,DEL2,DB_NAME) VALUES('A2','SECOND DELIVER','DB2'); INSERT INTO TEMP_DELIVER(DEL1,DEL2,DB_NAME) VALUES('A3','THIRD DELIVER','DB1'); --------------------------------- DECLARE V_DBNAME TEMP_ORDER.DB_NAME%TYPE; V_ORDER_NAME TEMP_ORDER.ORD2%TYPE; V_PAYMENT_NAME TEMP_PAYMENT.PAY2%TYPE; V_DELIVER_NAME TEMP_DELIVER.DEL2%TYPE; CURSOR DBCURSOR IS SELECT UNIQUE DB_NAME from TEMP_ORDER; BEGIN IF NOT DBCURSOR%ISOPEN THEN OPEN DBCURSOR; END IF; LOOP FETCH DBCURSOR INTO V_DBNAME; EXIT WHEN DBCURSOR%NOTFOUND; SELECT A.ORD2, B.PAY2, C.DEL2 INTO V_ORDER_NAME,V_PAYMENT_NAME,V_DELIVER_NAME FROM (SELECT * FROM TEMP_ORDER WHERE DB_NAME = V_DBNAME)A, (SELECT * FROM TEMP_PAYMENT WHERE DB_NAME = V_DBNAME)B, (SELECT * FROM TEMP_DELIVER WHERE DB_NAME = V_DBNAME)C WHERE A.ORD1 = B.PAY1 AND B.PAY1 = C.DEL1; DBMS_OUTPUT.put_line(V_ORDER_NAME || ':' || V_PAYMENT_NAME || ':' || V_DELIVER_NAME); END LOOP; CLOSE DBCURSOR; END;
Hello
Do you mean something like this?
SELECT a.db_name, a.ord2 || ':' || b.pay2 || ':' || c.del2 string FROM TEMP_ORDER A, TEMP_PAYMENT B, TEMP_DELIVER C WHERE A.ORD1 = B.PAY1 AND B.PAY1 = C.DEL1 AND a.db_name = b.db_name AND b.db_name = c.db_name; DB_NAME STRING ------- ------------------------------------------ DB1 FIRST ORDER:FIRST PAYMENT:FIRST DELIVER DB2 SECOND ORDER:SECOND PAYMENT:SECOND DELIVER DB1 THIRD ORDER:THIRD PAYMENT:THIRD DELIVER
I hope this helps.
Kind regards.
-
How to avoid the SEPARATE in OBIEE SQL
Hello...
For the issue I posted previously...
Problem with the data type LONG in responses
I executed the query into a FROG, and I've identified the error because of what this error is coming... because of SEPARATE...
I took care to avoid this column in ORDER BY putting order on another column...
Now my question is how to avoid the DISTINCT clause in SQL generated by OBIEE...
If the first column of criteria is then it avoids the SEPARATE... but if I use measure... Group of will come... and group of should not be used here...
If it's done... my problem is solved...
Of course... I get duplicate rows...
However, I want the answer how avoid SEPARATE?
Waiting for the response from your...
Thanks and greetings
Kishore GuggillaKishore,
In the physical layer, open the properties of physical catalog and in the features tab find DISTINCT_SUPPORTED and remove the check box value.
who removed separate in each query generated for this database.
-Madan
-
The problem with SQL after the migration of the database to another machine
Having a SQL strange problem trying to extract a database being moved from one machine to the other. Both machines are running SQL 2008 32-bit and are both Windows 2008 servers. When I try to backup the database using the SQL tools and restore the. BAK file on the new SQL Server, I get the following error:
Restore failed for server 'servername' (Microsoft.SqlServer.Smo)
Additional information:
System.Data.SqlClient.SqlError: RESTORE detected an error on the page (44:2097184) in database 'RestoreDBName' read from the backup set.
Similarly, when I am trying to copy the. MDF and. LDF files to the new server and tie them, I get the following error:
Attach the database failed for the server 'servername '.
Additional information:
An exception occurred during the execution of a Transact-SQL statement or batch.
A system assertion failed. An assertion failure is usually caused by a corruption of data or software bug. To check the database, consider running DBCC CHECKDB. If you have agreed to send images to Microsoft during installation, a mini dump will be sent to Microsoft. An update can be an available from Microsoft in the latest Service Pack or a QFE from Technical Support.
Could not open new database 'NewDatabaseName' create a DATABASE is dropped.
"" Location: "logmgr.cpp": 3277
Expression: lfh-> lfh_startOffset is startOffset
SPID:55
PID: 292876 (Microsoft SQL Server, error: 3624)
Everything I've read, these errors usually indicate some sort of database corruption. However when I run DBCC CHECKDB on the database on the source server, it is up to perfectly don't own... None detected corruption. In fact, this server hosts 8 different databases. Departure from all the correct DB on the source server, none of them will restore however to a new server using one of the methods above. I'm having a hard time to believe that each of them could be corrupted when they show absolutely no indication of a problem.
Anyone have any ideas?Try to make the backup and restore via SQLCMD (or via a query in SQL Server MS window).
The backup will be the following (obviously, change "MaBase" and "D:\BACKUPS" to some database and the location you wish to save - just using for example):
BACKUP DATABASE MyDatabase
TO DISK = 'D:\BACKUPS\MyDatabase.bak. '
WITH NOFORMAT, NOINIT,.
NAME = 'Database MyDatabase - Full Backup',
NOREWIND, NOUNLOAD, STATS = 10, SKIP
Copy your backup to the other server and file make:
RESTORE the DATABASE to MyDatabase
FROM DISK = 'E:\Backups\MyDatabase.bak' WITH FILE = 1,
GO to "MyDatabase_Data" to "E:\SQLDATA\MyDatabase_Data.mdf,"
GO to "MyDatabase_Log" to "E:\SQLLOG\MyDatabase_Data.ldf,"
NOUNLOAD, STATS = 10 REPLACE
Again, change your names and locations in function.
If this does not work, try to restore a database by third-party tools. You can find them in Google. If you don't want to spend the time to research, you can try a tool SQL Server Recovery Toolbox. All the details about this program on the link. http://www.oemailrecovery.com/sql_repair.html
-
original title: SQL Server 2008
We have SQL Server 2005 cluster (3 node cluster) and if we improve this nodes to 2008 R2, can the databases associated with the named instance remain to the version of SQL Server 2005, I seem to disagree with this notion, but still need to validation of the pro.
One way I can think of to achieve this scenario changes the compatibility level to SQL Server 2005 when the node has been upgraded to SQL Server 2008, so we can upgrade databases to SQL 2008 as and when the vendors provide support for this version.
Hello
Here is the Vista forums
Try the links below:
SQL Server forums
http://social.technet.Microsoft.com/forums/en-us/category/SQLServer/
SQL Server TechCenter
http://TechNet.Microsoft.com/en-us/SQLServer/bb265254.aspx
Blogs and Forums SQL server 2008
http://www.Microsoft.com/sqlserver/2008/en/us/forums-blogs.aspx
-
How to manipulate the apex error to avoid lost database updates?
Hello
I'm looking for a way to manipulate the user error message hostile apex to avoid lost database updates. It seems that the message to the error handling function is not routed.
Any ideas?
THX.
Gerd
Hello
Try the APEX error code. DATA_HAS_CHANGED
Kind regards
Jari
-
How to install utilities PL/SQL Developer SQL v1.6.0 in the database
in fact I'm looking
HTTP_UTIL_PKG
CSV_UTIL_PKG
to download excel file in Oracle 11 g r2 11.2.0.1.0 feature
Downloaded from https://code.google.com/p/plsql-utils/downloads/detail?name=plsql-utils-v160.zip & can = 2 & q =
How to install utilities PL/SQL Developer SQL v1.6.0 in the database
If we install in sys or particular schema in which I need to use
and how to run the script
ReemaPuri wrote:
in fact I'm looking
HTTP_UTIL_PKG
CSV_UTIL_PKG
to download excel file in Oracle 11 g r2 11.2.0.1.0 feature
Downloaded from https://code.google.com/p/plsql-utils/downloads/detail?name=plsql-utils-v160.zip&can=2&q=
then download the zip file and then extract the contents
Both are contained in it.
Then add them to the schema of your choice.
-
Dblink Oracle to sql server, multiple database on the same server sql under a dblink
Hi, we managed to set up an Oracle dblink to sql server and retrieve data.
The user of sql server have been using via dblink has access to multiple databases on the same sql server
But the question is how in oracle (if possible) prepend you the SQL access to this?
For example:
Sqlserver_prod has the user sqlserver_user which seems to be set up as default database sqlserver_db1
But we have select access to sqlserver_db2
all work well as sqlserver_user
Select * from table_fromdb1
Select * from dbo.table_fromdb1
Select * from sqlserver_db1.dbo.table_fromdb1
as does
Select * from sqlserver_db2.dbo.table_fromdb2
more in Oracle
Oracle_db a dblink sqlserver_prod. World connection sqlserver_user
everything works fine
Select * from 'table_fromdb1"@sqlserver_prod '.
Select * from 'dbo '. "table_fromdb1"@sqlserver_prod
But how to (if possible) access from oracle
sqlserver_db2.dbo.table_fromdb2
without having to create a new sqlserver_db2_user referenced in a new dblink
If oracle for oracle would be
Select * from remote_oracle_schema.table@remote_oracle_db
Hello
You cannot select a table in a different SQL * database server from that to which the gateway instance connects.
As stated in the documentation-Oracle® database gateway
Installation and Configuration Guide
11g Release 2 (11.2) for AIX 5 L Based Systems (64-bit), HP - UX
Itanium, Solaris (SPARC 64-Bit), Linux x 86 operating system,
and Linux x 86-64
In the section.
The example SQL Server multiple databases: Configuration of the modem router
A separate instance of the gateway that is required for each SQL Server database. Each
instance needs its own Gateway system ID (SID).
==========
You will need to create a new instance of the gateway for the SQL * Server DB2 as well as a link separate db.
Kind regards
Mike
Maybe you are looking for
-
How to remove the password of BIOS on my Satellite A210-17Z?
Hi friends,I left my Toshiba Satellite A210-17Z unused more than 2 months and when I want to use I forgot my BIOS password. I searched everywhere on the net how can I reset it I have not found an answer. All of the given methods does not work. Can so
-
Satellite L300-1FS - Wireless reconnect after closing the lid
Hello My 2 month old son Toshiba laptop works very well in many ways, but an annoying problem, is that if we close the lid when you open it again it doesn't re connect to our router. If I click on the network connection, it just says: there is no eve
-
Satellite 1130: How to upgrade the HARD drive?
I want to spend the hard drive from my old laptop Satellite 1130. But the manual to write that it is fixed, could I ask if I can update and how to? Thank you
-
tried to allow fixit Center repair a codec problem. Says that he does not support?
When you play, my system hangs. I got an error that says I have to disable my cyberlink demultiplexer codec, because it was causing problems. How can I do this?
-
no WiFi in the Laserjet pro 200 M276n option
Hi all I have just purchase HP Laserjet Pro 200 color MFP M276n, I managed to install and print documents using the USB connection. However, the printer is equipped with WiFi option that let's you connect the printer to a wireless network, or print d