1
vote
1answer
793 views

db2 tables altered, reorg

When I alter a table in DB, I need to reorg it: Call Sysproc.admin_cmd ('reorg Table myTable'); if I had done many modifications, how can I know which tables need a reorg?
0
votes
1answer
275 views

How is PostgreSQL extension feature compared to SQL Server extended and CLR stored procedures?

I am new to PostgreSQL. If I am not wrong, SQL Server has similar mechanism - extended stored procedures for adding new functionality to the base SQL Server functionality. CLR stored procedures could ...
0
votes
0answers
478 views

best way to copy data from SQL Server db to MYSQL DB(remote)

I currently copy data between my local SQL Server to a remote MySQL database linking in SQL and doing a data transformation task but now I'm sending lots of data it is getting very slow. Just after ...
1
vote
2answers
470 views

MySQL: CAST + SUBSTR vs. FLOOR + MOD

I have a field in a mysql database where dates are stored as BIGINT like YYYYMMDDHHMMSS (PHP: date('YmdHis')). I'm building a query, where I check the amount of rows per hour and have tried two ...
1
vote
1answer
719 views

How to disable oracle's MAX_ENABLED_ROLES limit

How to disable oracle's MAX_ENABLED_ROLES limit or expand the value of limitation. [oracle 10g (win32)]
3
votes
1answer
1k views

PostgreSQL concurrent increment of counter

I need to maintain a statistical table for a project, composed by a list of items and their usage (Think about something like a website in which you would like to count pageviews). Each time an item ...
1
vote
1answer
170 views

How to allow a user to create databases only with a certain prefix?

We're having a multi-user Linux server. I'd like to give each user the ability to create and manage databases at will, but to keep things sane, force them that each database name they create must ...
5
votes
1answer
428 views

How does order of index affect performance in SQL Server?

I am wondering how does order of index affect performance (ASC, DESC) ? If it affects, why ? And which order should I choose ?
0
votes
1answer
62 views

Load balancing MySQL ndbcluster

I have successfully setup ndbcluster version 7.1.26. This contains 2 data nodes[NDBD], 2 mysql [MYSQLD] nodes and one management [MGMD] node. Replication works successfully. My Web application is ...
0
votes
1answer
270 views

Database schema design help needed

I am developing a PHP application expecting millions of records both parent and children. My goal is to design an optimized database design to achieve high speed and performance. This application ...
0
votes
0answers
22 views

Myisam Mysql server crashed

I have a server with linux fedora 11 Operating System. Recently , I discovered that every morning mysql has been crashed, so I have to restart mysql service. Can any body help me?
0
votes
2answers
1k views

PostgreSQL cannot start after replacing contents inside its Data folder

When recovering the Postgresql database from a hacked Ubuntu 12.04 server, I copied the data directory to another location, reinstalled the OS and PostgreSQL, stopped PostgreSQL service, removed the ...
0
votes
5answers
7k views

How can I convert an Oracle dump file into SQL Server?

I want to ask about converting Oracle dump files (.dmp) into SQL Server files (.bak) where during conversion I don't have to be connected to any database server. I've searched for related ...
1
vote
0answers
4k views

impdp failing with ORA-01031: insufficient privileges

I'm trying to import a dmp file provided by our dba to my dev database. I've been able to export the contents to a SQLFILE and the contents look ok. I tried importing the schema and it kept on failing ...
2
votes
1answer
162 views

Avoiding Multiple Queries when Searching for Records Associated with a Set of Records

So, I am sure I have done something really stupid while designing this, and I'm open to schema changes if they'll really help me out. On to the problem: I have a custom shopping cart system (backed ...
1
vote
1answer
931 views

Can putting mysql DB into memory or having the innodb_buffer_pool_size match the size of DB increase performance?

We have a mysql database that has roughly 80 gigabytes (GB) of data using inno_db engine. We are looking to increase performance on the database (we looked at the slow log and gone through and ...
1
vote
2answers
826 views

mySQL data table seems to stuck at 16777215 rows

I am creating a MySQL table and loading data from a local file. CREATE TABLE `patent` ( `seq_number` mediumint(9) unsigned NOT NULL auto_increment, `seq_id` varchar(24) default NULL, `date` ...
0
votes
0answers
110 views

Identical Postgres index scan taking 5x longer on server

I have an intermediate table for managing a many-to-many relation between tables called Expert and Subject: Column | Type | Modifiers ...
0
votes
2answers
468 views

Reclaiming space from a large partitioned database

We have a database where one of the business group decided to remove several millions of rows as part of their upgrade process. (we removed for them..).. This database is partitioned based on a date ...
0
votes
1answer
419 views

Generate script for SQL Broker objects

I'm using SQL Server Management Studio to generate scripts for all the objects in an existing database: but the objects related to SQL Broker (messages, queues and services) are not generated. ...
1
vote
1answer
460 views

import csv data stored in a blob column

Here's what i need to do: Users will upload CSV files into SQL Server 2012 blob column Each night, i would like to take each file and import the data into table I will have 2 web sites using the ...
1
vote
2answers
40 views

Order by on an alphanumerical column

I have a column that has strings of the following type: Miller 10 Allen 20 King 10 .... Jones 100 I try to sort the column based on the numerical part of the data. I tried the following: SELECT ...
0
votes
1answer
2k views

MySQL database drop insanely slow

I just installed MySQL 5.0.45-log Source distribution on my Debian 6.0.6 server. I installed it under my user home directory like I'm used to doing. But this time the queries are extremely slow to ...
0
votes
1answer
285 views

Is there a way to truncate table that has foreign a key?

Is there a way to truncate table that has foreign keys ? Delete and reseed can take too long. Is deleting and recreating keys only way ? If so is there a tool that does this ?
22
votes
3answers
35k views

How do I list all schemas in PostgreSQL?

When using PostgreSQL v9.1, how do I list all of the schemas using SQL? I was expecting something along the lines of: SELECT something FROM pg_blah;
1
vote
2answers
9k views

How to check if Oracle DB process is running in Unix and where Oracle DB is installed

I am new to Unix and trying to find out a command that checks if Oracle DB is installed in my Unix box. I came across commands ps -ef|grep smon and ps -ef|grep pmon in net. But which is the correct ...
1
vote
1answer
415 views

Multiple like conditions for same column?

How do I write a query for a Oracle database when I have several "like" values for the same column (in my example data "name")? My example data for table "address": name like "John" name like ...
3
votes
1answer
574 views

How to Return XML Node Ordinal, or delete node based on element value?

I have an XML document similar to this: <Root> <Sub> <Record> <Guid>aslkjflaksjflkasjfkljsd</Guid> </Record> <Record> ...
2
votes
2answers
687 views

SQL Server stored procedure working when run manually, not running from SQL Server Agent

I have a procedure that runs fine using the execute command in SSMS, however putting the same command in a job gives the following error. line 9, character 9, unexpected end of input The code ...
1
vote
1answer
79 views

Hiding variable input in psql

I am attempting to prompt for a username and password when running a database creation script, and I want to hide any text input for my password prompt. In Oracle's sqlplus, I can use HIDE at the end ...
0
votes
2answers
79 views

Error log - What does this mean and what can I do about it?

I have the following repeated errors in my error.log and I don't know what it means or what I should/can do about it: Access denied for user 'root'@'[some IP]' (using password: YES) There are ...
1
vote
1answer
629 views

Getting the data from a foreign key table

I have a table that relates a user to client using both their table id's UsersClients Table --------------------- | userid | clientid | --------------------- | 2 | 32 | | 3 ...
0
votes
1answer
162 views

Memcache implementation

I have a Wordpress site that uses WP Super Cache plugin in order to make my blog posts and pages stay as HTML so that less PHP/MySQL code is executed. However, there's a featured box that can't get ...
1
vote
2answers
3k views

Granting privileges to dbms_crypto

I'm trying to grant proper privileges for using DBMS_CRYPTO. Whenever I call it from package it gives me error: PLS-00201: identifier 'DBMS_CRYPTO' must be declared User already has privileges: ...
0
votes
0answers
353 views

Temporarly disable cache in oracle 11g

I want to disable the caching for my session in oracle 11g to see how long a query takes. Is this possible or is there a better way for meassuring the time a query takes to run?
2
votes
1answer
174 views

Updating column in underlying table causes massive transaction log growth

I have an underlying table ~14k records and an indexed view that contains ~11 million records. When updating a column in the small underlying table this seems to cause a massive transaction log entry ...
4
votes
1answer
1k views

How to fine-tune Postgres for IO usage?

I have a Postgres database I am hosting in a quad core server with 8 GB of RAM. At any time, there can be 100 or so reads and writes occurring concurrently. I am experiencing high IO wait time. When ...
2
votes
1answer
86 views

Oracle Database: View schema without access to data

In Oracle Database 10g, I need to create a user with these permissions: user can access schema to be able to read table names and columns user can not select (get) any data from any table Is this ...
2
votes
1answer
435 views

Trying to allocate 3G for buffer pool in InnoDB fails

I'm trying to boost my InnoDB driver on my Windows 7 PC since each page request takes just about 1.7 seconds to load versus 0.002 seconds on my Ubuntu 12.10 workstation. The setting I'm playing ...
1
vote
4answers
4k views

How to change the data directory on Postgresql 9.1 on Ubuntu

I am having a problem changing the data directory on postgresql 9.1 on ubuntu 13.04: I first did a: sudo pg_dropcluster --stop 9.1 main and then attempted to create a new one in the desired path: ...
1
vote
2answers
323 views

getting error when i use merge statement

I am using sql 2008 r2. when i use merge statement i am gettig error when i execute following code: merge products as trgt using updatedproducts as src on (trgt.productid = src.productid) ...
3
votes
2answers
1k views

SHOW TABLE STATUS very slow on InnoDB

Recently we've been migrating from MyISAM to InnoDB and I understand that MyISAM uses meta information against each table to track information and such - however, the database is about 1.8gb with 1+ ...
1
vote
0answers
496 views

sql server 2008 execution plan different on two production servers [closed]

We have two servers running SQL server 2008 R2, with identical databases, where we implemented a datawarehousing solution. The cube processing operation was taking a VERY long time in one of the ...
0
votes
0answers
69 views

Linked server performace issue?

I have created a linked server in sql server 2008 R2 Enterprise Edition for mysql i.e. MySQL database is accessible under sql server environment. I have a created a trigger in sql server such that ...
1
vote
1answer
299 views

MySQL users corrupt

I have a strange situation here: From time to time I cannot log in with any of my mysql users. I even cannot make a mysql dump. So I started searching in mysql files and I found that users.MYD and ...
1
vote
1answer
208 views

Syncronize mysql databases between local and hosted servers automatically

We have many website with Development , Staging and Production Server. we have many developers for many projects, we need a solution to synchronize the database with developer database with staging ...
0
votes
2answers
625 views

VARCHAR, InnoDB MySQL, is inline allocated space variable or fixed?

For a log table, I have a custom message column. It will never be updated. It will be searched with LIKE conditions. It will be capped at 1KB. TEXT fields are slower than VARCHAR fields for ...
-2
votes
2answers
1k views

How can I search for a name in two columns in MySQL? [closed]

I want to search a name 'Hamed Haddadi'. 'Hamed' is first name and 'Haddadi' is the last name of the user. When I search individually in the first name and last name columns it shows a record. My ...
1
vote
1answer
97 views

Approach for a 2,000 table migration

What might be the best approach when converting or migrating a database containing over 2,000 tables? Where would you begin to tackle such an issue? Steps to take in the first weeks of designing? ...
2
votes
1answer
211 views

In MySQL, does the order of the columns in a WHERE clause affect query performance,why? [closed]

I have a query that doesn't use any indexes: SELECT 32, guid, 1, 1, 1, 0, 5 FROM test WHERE level >= 20 AND ( ( fun_GetIndexValue(data, 354) ...

15 30 50 per page