Tag Info

Hot answers tagged

13

No. All (standard) packages are written in PL/SQL. The DBMS engine itself is written in C Edit: Oracle does include a JVM which runs on the same machine as the database itself, but that is not used to run any "DBMS related" code. It's only there to run stored procedures/functions written in Java.


10

In addition to Craig's advice I would like to advise you to examine the storage parameters of the affected tables. I am currently in a similar situation to yours. The largest table in my system contains ~200 million records and the performance was really bad. Tune the storage parameters of your tables and indexes Besides adding several indexes to the ...


6

Deferred indexing would be nice, but isn't currently supported. Adding indexes has a cost - write performance. They're a trade-off. COPY won't help much if index maintenance is the main issue. The simplest solution is to drop the indexes, and re-create them when you're done importing. Since you can live with losing all your data if the DB crashes, you ...


4

The simple version would be to generate a hash from the CLOB and use this as a key. This key will fit into the allowed key width for your engine (900 SQL Server, 767 InnoDB, 1000 MyISAM etc). The hash can be generated by the engine as a computed column, trigger, or by some ETL process, or by the application There is a faint chance of collision (birthday ...


4

Invoking direct path insert with the append hint causes an exclusive lock to be taken against the entire table, so having multiple threads performing the insert will not help. You would need to explicitly address a different partition with each insert ... insert /*+ append */ into my_table partition (partition_name_1) ... ... to get partition level ...


4

Just saw the update, 60-col table with mostly VARCHAR(2k) fields -- that is (potentially) a monster table. First things first... You have to understand your bottleneck FIRST. On the app side, go all the way back to your single-threaded batch-insert solution (1/2/3k at a time) and begin running it and login to the DB machine and run a 'top' -- see how much ...


3

Incorrect syntax near '-'. This tells me that you've named a database, table or column with a dash in it, not that POJO is having an issue mapping your columns. As an example, if you've named your entity bar-none and POJO issues the following CREATE TABLE statement: CREATE TABLE dbo.foo(bar-none BIT); Or this one: CREATE TABLE dbo.foo-bar(none ...


3

Your trigger doesn't need the CALL keyword. create or replace trigger TRYTABLE_BEF_UPD_ROW before update or insert on TryTable for each row begin TryJavaHelperRun(:new.arg1, :new.arg2); end; / Generally, you should never use CALL in a PL/SQL block-- just execute the procedure. I assume that CALL is some ancient leftover syntactic remnant from some ...


3

Already answered at a parallel thread on serverfault: http://serverfault.com/questions/345253/oracle-11-updating-blob-field-db-file-sequential-read-inappropriately-slow/345588#345588 In Oracle, LOB (including BLOB) is stored as: in-the-table LOB - if the LOB is smaller than 3900 bytes it can be stored inside the table row; by default this is ...


2

Take a look at Comparison of database tools, there you find some tools supporting both HSQL and MySQL. Then it should be possible to export the MySQL DB and directly import to HSQL DB from the same GUI.


2

I am not sure whether you need compulsory callable statement or not. If you are ready to use other ways, best way is convert your Excel sheet into CSV file and you can directly load data from CSV file into database by using following syntax: "Load data infile "c:/filename.csv" into table tablename Fields terminated by ',' Lines terminated by '\r\n'" This ...


2

Compiler messages are not returned to the client through the getWarnings() on the statement or the connection. Instead once you have identified the warning through Statement.getWarnings() you need to parse retrieve the compiler errors from the view ALL_ERRORS Something like: SELECT line, position, text, name, type FROM ...


2

This is probably not the best way to do what you want to do. The "proper" way would probably be to execute the SQL commands in your file via jdbc. That said, that's a long way from where you are now, and we can probably make what you are trying to do work. The likely problem is that there is a space in the path to psql.exe. When you use that particular ...


1

I have two suggestions Commercial Product There is a product called ScaleBase that can handle Geographic replication topologies. Handcrafted Solution If you want to set up Geographic Replication using MySQL Replication, you will need to make the MySQL Instance in each Data Center resilient. Here is what thinking: IDEA #1 : Local Data Redundancy In each ...


1

If I am reading your requirements correctly. From the dataset provided the start_ip_num and end_ip_num will be the same. Why you may ask? you are not storing a range of ip addresses; take for example a /24 range: 192.168.1.0/24 this provides a range 192.168.1.0 - 192.168.1.255, whilst really only ip's 192.168.1.1 though 192.168.1.254 are usable (.255 being ...


1

Ok, what I believe you are after is creating Java routines (ie, stored procedures implemented in Java and stored within DB2). You will want to follow the documentation in this section on Java routines. Pay special attention to the Creating, Building, and Deploying sections. And even though this is an older article, you may wish to check out this article ...


1

You can try setting up a shell script that runs the SQL scripts or write a program in perl/whatever language which tries to log the errors and return codes from MySQL. Otherwise it is very difficult to troubleshoot without knowing the errors. You could also add SHOW ERRORS; and SHOW WARNINGS; to your SQL scripts, but I suspect the problem is not with your ...


1

I don't think Rolando thought about what this variable does before answering. Don't set the thread_stack to 32M. It's is allocated per connection and 100 connections is going use 3.2GB. thread_stack = 192K Setting it to the fairly standard 192k should be fine.


1

If I get you right then one post is linked to one user but one user can have many post. I think this is a one to many relationship. So put a field user_id in your table post then you know wich post is linked to wich user. It's a german page but the first image would help you.


1

You certainly can. This article: Using MySQL Workbench to Execute SQL Queries and Create SQL Scripts gives you step by step instructions (with screenshots). Enjoy!


1

This is easy to do. Write a script to create the backup using the "mysqldump" tool available at http://dev.mysql.com/doc/refman/5.1/en/mysqldump.html - Google "mysql backup unix/windows script" to find some examples. Use a task scheduler to run this script. On UNIX this could be "cron", Windows as a "task scheduler". Best to do so at times when the app is ...


1

This might work as an example: CREATE TABLE Messages ( MessageID INT , fromUserID INT , toUserID INT , TimeSent DATETIME ); INSERT INTO Messages VALUES (1, 10, 11, GetDate()); INSERT INTO Messages VALUES (2, 11, 10, GetDate()); INSERT INTO Messages VALUES (3, 11, 12, GetDate()); INSERT INTO Messages VALUES (4, 11, 10, GetDate()); INSERT ...


1

There are some useful hints in this SO post. If you are looking for alternatives to Oracle Text, have a look at this.


1

DISCLAIMER : Not a Derby Expert DERBY There are options you can set to increase data pages for Derby For a mass load of table prodtable, you may want to consider create temptable just like prodtable, but with no indexes load data into the temptable rebuild indexes on temptable rename prodtable to zaptable rename temptable to prodtable drop zaptable ...


1

Try creating a temp table, and then perform a bait-and-switch ALTER TABLE stuff RENAME oldstuff CREATE TABLE newstuff LIKE oldstuff; ALTER TABLE newstuff DROP INDEX idx_UpdatedTime; INSERT INTO newstuff SELECT * FROM oldstuff; INSERT INTO newstuff (x,y,z) SELECT x,y,z FROM inventory; ALTER TABLE newstuff ADD INDEX idx_UpdatedTime(UpdatedTime); ALTER TABLE ...


1

Try shutting down the database and then issuing the startup command. Then try your script. If you get the same error verify basic connectivity by connecting from sqlplus with the same name and password. Check your log file location and the any operating system error logs as well.


1

It looks like your MySQLD is running at port 5000, from the working mysql command line. The server listening on port 1186 is probably the cluster management server (ndb_mgmd). It has its own client (ndb_mgm). You cannot connect to it using the mysql client. Similarly, the MySQL JDBC driver cannot connect to it. Frazer


1

PhpMyAdmin (Requires a Web Server with PHP) is a tool that is able to create SQL Scripts for Schema and Data. -- The good thing is, it creates SQL scripts, so you can insert the Schema and data to the most other SQL Databases. So if you have it already installe then you can use it. If you do not have it installed jet, then I would search for an other tool.



Only top voted, non community-wiki answers of a minimum length are eligible