2
votes
1answer
620 views

return percentage of records based on value in column

I'm working on a sql query that needs to get a percentage of the records based on the value of a particular column. The percentage is given by the user. A stripped down version of the query is below ...
1
vote
1answer
496 views

Master to Slave to Slave Configuration in MySQL

We currently have 3 MySQL Servers running; the first which contains production data and is due to be retired mysqld Ver 5.5.28-0ubuntu0.12.04.2 for debian-linux-gnu on x86_64 ((Ubuntu)) mysql> ...
1
vote
1answer
182 views

Best way to determine if a MySQL InnoDB table is in its own file, not in system tablespace

I have a MySQL development server that uses InnoDB tables in some of the databases. It was originally setup with the defaults so all data went into the system tablespace (e.g the main ibdata1 file). ...
1
vote
2answers
83 views

How to Perform Two Simple Queries using Select Value from First Query

I need to perform a select operation and get the id column's value (single value returned). Using this value, I need to perform two more selects on the same table using UNION ALL (in order to select ...
1
vote
2answers
187 views

Database Is In InRecovery Mode.

I have a database that has entered "Recovery Mode". It was working fine, but ended up in this status a few days ago. I have been told that a cause can be the partition holding the datafiles running ...
2
votes
2answers
62 views

2 databases in sql server 2005 “Production Server”

Can 2 databases decrease the performance in a sql 2005 production server? Server specs: Dell Power edge 2950, 2 Quad core Xeon, 16 GB of RAM, 3x73 GB sata hard drive hot plug, windows server 2003 R2 ...
3
votes
2answers
5k views

Add additional disks to FRA diskgroup in ASM

We're running Oracle 11.2.0.3 with a two node RAC and our FRA diskgroup is running low on space. I need to allocate some more disks to it through ASM. I'm not sure how to go about doing this. I can ...
1
vote
0answers
64 views

How to calculate run-off triangles?

(Note: This is copy of my question on StackOverflow here.) Reality description: We do have a list of projects. In every project there is a lot of accounts. You can do a lot of actions on every ...
1
vote
0answers
134 views

How to model Week Commencing / Week Ending scenario

I’m reasonably new to data warehousing and I’m struggling to get a feature of my time dimension working. I’d like to model a Week Commencing and Week Ending type of scenario. I’ve created a DimTime ...
7
votes
3answers
1k views

Store a formula in a table and use the formula in a function

I have a PostgreSQL 9.1 database where part of it handles agent commissions. Each agent has his/her own formula of calculation how much commission they get. I have a function to generate the amount of ...
2
votes
0answers
124 views

automated data sync after Primary node is down

I have this scenario, using version 2.2.2: Node A, Primary, Priority: 10, Wireless network Node B, Secondary, Priority: 9, VM Server1 Node C, Secondary, Priority: 8, VM Server1 Sequence: In Node ...
0
votes
1answer
271 views

inconsistent Data Type -ORA-00932

I know there is question related to inconsistent datatypes but that comes from a query. while I am getting this error on database side when we try to access user defined datatype on our schema that ...
1
vote
2answers
115 views

Who changed the size of the transaction log?

Can I know, who and when changed size of database transation log?
2
votes
1answer
2k views

What is the proper way to backup MySQL database with rsnapshot?

I want to backup my website that contains both user uploaded images and data stored in MySQL database such that they are always consistent with each other in any particular point of time. While ...
3
votes
1answer
146 views

SQL Database automatic back up

I have an SQL database - I need to back it up everyday (at a minimum) - preferably multiple times a day - automatically so it definitely gets done. I'm running Windows which the SQL database is ...
6
votes
1answer
212 views

Steal ownership on database from user that no longer exists

We have a few SQL Server 2008 R2 databases where its member domain was changed (i.e. it was connected to DOMAINA and is now on DOMAINB). We have three databases where the owner of the database is ...
4
votes
2answers
4k views

Restore database from backup file of different version / edition

I read that it's possible to restore a database in SQL Server as long as you're restoring from an older version to a newer version, for backwards compatibility reasons. Does anyone know off hand if ...
2
votes
0answers
904 views

SQL Server Create Access Denied even after adding MSSQLSERVER user permissions

I am aware that SQL Server instances need write access not for my user account (which is in fact irrelevant to that service's context) but for the user account or security principal under which the ...
4
votes
1answer
568 views

Slow SQL Server query using a DB2 linked server in virtual environment

I have a problem with a slow query which uses a linked server. Let me list out my environment first and I'll get to the issue: Virtual Windows 2003 R2 server (fresh deployments on XenServer 6.1 ...
0
votes
2answers
151 views

The difference between sys/ and sys@xe (Oracle)

Can anyone tell me in detail,what is the difference between sqlplus sys/ as sysdba and sqlplus sys@xe as sysdba?For the records the database is installed on the same machine as the client.
2
votes
1answer
174 views

SQL Server Alert - Description (None) [closed]

For every system Alert defined to send an email, we receive a 2 alerts with the following bodies. How do I stop the message with the empty (None) description? Empty Alert SQL Server Alert System: ...
1
vote
2answers
1k views

MySQL slow queries - Fast using PHPMyAdmin , low CPU and RAM usage

I have a site running on Amazon EC2 , which runs fast and contains some reasonably complex MySQL queries. Part of that site is an API which serves out data to another site. These queries are very ...
0
votes
1answer
734 views

Downloading image data type contain to desktop SQL Server 2008

I am very new to SQL Server 2008 and question may look very basic to gurus. Following in the problem universe. I have a huge (600 GB size) SQL Server 2008 table that stores pdf files in a column ...
1
vote
3answers
5k views

Non-Clustered-Index on a temporary table

I am working on various query optimization techniques. I reduced the query execution time from 1 minute to 12 seconds just by adding a Non-Clustered-Index on a table including one column (which is ...
0
votes
1answer
3k views

How to set up data entry in many-to-many database in Access 2010 with forms/subforms?

I have a simple two table database in Access 2010 tracking landowners and properties. They are related in a many-to-many (M:M) relationship with a link table. Forms for viewing data have been ...
5
votes
1answer
132 views

To Foreign Key or not to Foreign Key… (inet -> cidr)

Below is a very abridged version of a project I am working on. CREATE TABLE cidr_block ( id serial not null unique, block_def cidr primary key, dhcp_server_id int not null references ...
0
votes
0answers
98 views

In DBMS binary relationship is better than ternary

For which reasons (Features/points) binary relationship is better than ternary one in Database ER modeling? I got something by searching in website but those are not precise and meaningful!
1
vote
1answer
266 views

Which Database to choose: MySQL or Oracle

I have an application generating time series data (32 channels, 22KHz, 6 secs) once a minute. These have to be stored in a database. At the moment I'm using MySQL with InnoDB tables ...
3
votes
1answer
470 views

Index Key Column Order

I have created a joining table for many-to-many relationship. The table only has 2 cols in it, ticketid and groupid typical data would be groupid ticketid 20 56 20 87 20 ...
0
votes
0answers
35 views

optimize this query [duplicate]

Possible Duplicate: Slow query performance My database contains 20,000 rows and the following query is slow. Please help me to speed this up. SELECT r.report_id, ...
2
votes
1answer
249 views

Slow query performance

My database contains 20,000 rows and the following query is slow. Please help me to speed this up: SELECT r.report_id, r.user_id, u.user_name, u.user_mail, ...
1
vote
1answer
2k views

MySQL cannot start

I try to start MySQL /etc/init.d/mysqld start but a get the following messages in mysqld.log 130130 12:12:53 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql 130130 12:12:53 ...
0
votes
2answers
110 views

How to create two database copies in two users from same dump file

I have a database dump file with me, I need to make two copies of the database using the same dump file in two users. Is it possible?
1
vote
1answer
381 views

Possible to query all SQL Server Indexes which have page locks enabled?

Is it possible to run a SQL Server Query in order to view all SQL Server Indexes which have page locks enabled?
1
vote
1answer
253 views

mongodb heartbeat - unicast, broadcast or multicast?

I can't find any good doc or article (except http://docs.mongodb.org/manual/core/replication-internals/) about this in the internet. Anyone knows how mongodb heart beat signal operates? The reason ...
0
votes
1answer
1k views

one trigger for multiple tables

i have a trigger in PostgreSql 9.1 that i want to fire on inserts of several tables. is it possible to have it affect all these tables instead of creating the trigger for all these tables? i have 58 ...
1
vote
1answer
1k views

Show processlist / Max concurrent connections seem to max out at 131

When I put my database under a load test (basically just a basic write and basic read from our app), and run show processlist; in the middle of it, there is always 131 rows in the set and that's it. ...
4
votes
1answer
2k views

Qcache_free_memory not full yet I get alot of Qcache_lowmem_prunes

I just started dabbling with the query cache for our CMS. Can anyone tell me (or at least give a good guess) why I get a lot of Qcache_lowmem_prunes when more than half of Qcache_free_memory is free? ...
2
votes
1answer
1k views

Dump of a mysql table on import replaced existing records

I took a dump using mysqldump.. mysqldump -u... -p... mydb t1 > mydb_table.sql Then I imported the dump in another database having same table, but different records.. mysql -u...-p... mydb < ...
-1
votes
1answer
70 views

Select query from two tables which only specified rows [closed]

I want to try querying two tables, like this: Table A user_id primary_indicator ------- ----------------- 9012445 Y 9012445 N 9012442 N 9012332 Y 9012332 N 9012445 9012332 Table B ...
11
votes
3answers
4k views

Is there a way to determine if SQL Server queries are running in memory or going to disk?

I came across a set of stored procedures in an application today that are called repeatedly within a long running process. Within each procedure I found multiple different select statements, some ...
1
vote
1answer
538 views

ERROR: Error 1005: Can't create table 'progetto.museo' (errno: 121)

I've found on the web that: You will get this message if you're trying to add a constraint with a name that's already used somewhere else and If the table you're trying to create includes a ...
2
votes
2answers
633 views

Slow MySQL query with Order and Group by

I have a query that is taking a long time to execute (1.13s). The two tables user_articles and articles have around 25,000 records. This is the query: SELECT `user_articles`.* FROM `user_articles` ...
2
votes
1answer
1k views

InnoDB temporary table location

I have a busy InnoDB table that expands and contracts regularly in size on a daily basis based on it's load. Typically, we'd see the table grow to 80GB in size (50/50 data and indexes) and then shrink ...
5
votes
2answers
656 views

Oracle View Ignoring External WHERE Clause

Good day, This one has me stumped. I have a rather nasty developer query that I would like to store in a non-materialized Oracle view. The text for the view itself is a bit long to list here, but ...
1
vote
1answer
432 views

Use GIN to index bit strings

I'm trying to extend PostgreSQL to index bit strings up to 1000 bits. (These bit strings are created by quantization of high-dimensional vectors, so for each dimension up to 4 bits are assigned). ...
1
vote
1answer
162 views

How can I use mongoDB efficiently in this scenario?

I'm trying to build a system of documents that have hundreds of tags assigned to them, but each document-tag association has a certain condition it has to also meet so the document would be returned: ...
0
votes
1answer
218 views

postgresql out-of-memory

I am running postgresql 9.2 on a 32-bit machine running windows xp with 4 gb of memory and I am getting out of memory errors. I suspect it has something to do with these two parameters I have changed ...
1
vote
0answers
436 views

Transactional Replication Over Domain

I am trying to setup transactional replication in SQL Server 2008 R2 on two servers on separate domains. I am able to create the distributor, create the publication, and create the subscription, ...
2
votes
2answers
151 views

One database per company for “security” reasons [duplicate]

Possible Duplicate: Is that a good idea to use one database for 50.000+ shops? We are developing an internet application in C# with MVC 4. It's connected to a database which will contain a ...

15 30 50 per page