0
votes
0answers
60 views

Enumerate open oracle connections

How can I troubleshoot which processes are keeping connections open? Background: A QA installation of several software components is generating an ORA-12516 error now and then, and I'm not sure which ...
0
votes
1answer
80 views

MySQL slave seems confused as to just how far out of date it is

I have a slave that claims, in SHOW SLAVE STATUS, to be zero seconds behind the master. However, it also says it's on Master_Log_File binlog.009636, which is 46.9 gig behind where the master is. I ...
4
votes
4answers
10k views

Benefits of BTREE in MySQL

What are the pros and cons of using a BTREE index in MySQL, regarding query speed, disk storage and memory usage? Does BTREE provide easier iteration in increasing order ? What kind of queries would ...
0
votes
2answers
1k views

Some queries slower in MySQL 5.5 than 5.0?

We have an exceptionally inefficient process (1.3 million selects, 232k updates) that I'm now recoding to be 1 select and 50 updates. In the meantime, though, today's process ran. We recently updated ...
2
votes
1answer
4k views

How can I tell if an index is being used to sort in MySQL?

I have a query with an ORDER BY clause which uses a column which is the last column on an index which is being used in the WHERE clause, essentially of the form: SELECT cols FROM tables WHERE ...
5
votes
2answers
2k views

Implementing a Circular Buffer (Sliding window) in MySQL

I intend to store some Java objects in a MySQL database, accompanied by a timestamp. These objects should be kept in a Sliding Window fashion (also known as Circular Buffer), meaning that only the ...
2
votes
1answer
976 views

Data type for protobuf objects in mysql

I would like to store some protobuf objects in a MySQL database. The objects are created in a Java application. The object is accompanied with a textual type identifier and a timestamp. +------------+...
5
votes
3answers
172 views

Schemas and user rights

I have 2 schemas, lets say sch1 and sch2. Each owned by different user. I do want to grant SELECT rights on sch2.MyTable (but just this one object) to sch1 procedures/views AND allow to reference ...
3
votes
3answers
4k views

SQL Server dates - can I get date and hour?

In SQL Server, can I do the equivalent of to_char(date_field, 'YYYY-MM-DD:HH24') in Oracle to get 2012-01-30:23?
7
votes
2answers
900 views

What are the pros/cons of splitting date and time into separate fields vs. using the datetime data type and storing the date in a single field?

My database is extremely large and growing at a rate of ~20m rows/day. I have timestamp data that is important but most of the reporting is based on date ranges and week over week or month over month ...
1
vote
1answer
8k views

€ Euro sign/symbol not showing up on Oracle 10gr2 and aix 6.1

this is Oracle 10gr2 on aix 6100-02 The issue is that I do not manage to see the € sign from Oracle. This is an easy way to see the issue: SQL> insert into prueba values ('€'); SQL> commit; ...
0
votes
1answer
1k views

Select DISTINCT records with extra information

I have a MS Access database full of customer names and addresses. I want to send out a mailing but only one per address. Therefore if there are 3 different customers at the address I want only one row....
0
votes
1answer
3k views

Incremental level 1 backup with no Incremental level 0?

I have done the following steps: Backed up database with INCREMENTAL LEVEL 0 Delete INCREMENTAL LEVEL 0 backup without telling controlfile. So deleted it by hand. And did not make crosscheck. Backed ...
1
vote
0answers
194 views

How to speed up this query

MySQL doesn't have nearest neighbor search so. So I try to come up with a "distance" that's reasonable so the number of returned query is around 20-200. That way innodb doesn't have to compute ...
2
votes
1answer
3k views

Should I use WHERE NOT EXISTS or LEFT JOIN for getting the ids of relationship table?

I have users table: CREATE TABLE `users` ( `uid` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, `email` varchar(70) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, `flname` varchar(60), ...
3
votes
2answers
2k views

Would it be possible/wise to execute 2 parallel restores from a single backup?

Every night I create a backup (to disk) of a particular database. Subsequently that backup has to be restored to 2 different servers. These restores now happen sequentially and take about half an hour ...
0
votes
2answers
1k views

DBA to work from home [closed]

I was wondering is it feasible or doable to work from home as a DBA or Database designer/developer or Business intelligence developer. I have seen developers doing great working from home, but can ...
1
vote
1answer
1k views

uninstalling SSRS and SSIS from clustered SQL Server 2008 R2 SP1

Due to the security recommendation, i will need to uninstall the unused SSRS and SSIS component from a production cluster SQL Server 2008 R2 SP1, so what is the caveats and what do I require to do to ...
2
votes
2answers
209 views

Why is postgresql still consuming space on my other drive?

I am running postgreSQL 8.4 on Ubuntu 10.0.4. I recently needed to import a large amount of data (approx 300G) into a database. I purchased an additional drive, prepared it for use on my machine, and ...
0
votes
1answer
97 views

Tightly coupling tables in postgresql

Our web-application is something like - users can create groups(request for membership of a group also), ask questions, answer etc. It is still in the development stage. What I want to do is tightly ...
2
votes
2answers
476 views

Is a trade-in its own purchase order, or an adjustment on a sales order?

Let's say you're a car dealer, selling cars. When a customer buys a new car, he often trades in his existing car. What data model makes more sense? A) create a sales order record for the sale, and ...
1
vote
1answer
190 views

How to interpret explain sql?

SELECT DISTINCT TB.ID, TB.Latitude, TB.Longitude, 111151.293413 * SQRT( pow( - 6.185 - TB.Latitude, 2 ) + pow( 106.773 - TB.Longitude, 2 ) * 0.988392289802 ) AS Distance FROM `tablebusiness` AS TB ...
0
votes
1answer
906 views

Need a stored procedure to check and update row when it does not already exists.

Need a stored procedure that will check and then update the rows (with username & email) except the id (auto incremented with a unique one). For example, if id = 5 has, the username abc and the ...
0
votes
2answers
579 views

Merge Replication Subquery Filters

I am using merge replication with SQL 2012. I have a number of articles in my publication and will have to come up with quite an elaborate set of filters. If I add a filter on my article it can ...
5
votes
1answer
778 views

Index defrag takes forever to run

We have an Agent job that runs every morning at 2a.m. to defrag the top 5 biggest tables. Usually it takes around 20 mins to complete. It has stayed this way for several years. However, recently (last ...
3
votes
1answer
345 views

Does mongodb automatically move small non-partitoned databases to spread read load?

I have a few hundred small databases, each between 0.2GB and 4.0GB in size. These are sitting on a sharded mongodb environment with 10 or so shards. At any one time, only a very small subset of these ...
3
votes
4answers
188 views

Complete list of possible database “objects”?

When I finished my degree in Programming and Database I remember there being a general list of database "objects" like this: data types (a list unto itself) fields records tables views (sort of like ...
10
votes
2answers
16k views

Suppress SQL Server Management Studio auto complete

Is there a way to temporarily suppress SQL Server Management Studio's auto-complete while typing a query? I don't want to disable auto-complete completely just say hold down some key while typing in a ...
1
vote
1answer
703 views

Rename primary key constraint in Teradata

Does Teradata have a way to rename a primary key constraint, rather than dropping it and recreating it? I'm using SP_RENAME for SQL Server and ALTER TABLE...RENAME CONSTRAINT for Oracle, but I don't ...
3
votes
1answer
713 views

EXECUTE AS does not appear to be changing security context

We have legacy code that still makes use of xp_cmdshell calls. When we migrated to SQL Server 2008, we created a stored procedure that used code after the following pattern: EXECUTE AS 'DOMAIN\ID2' ...
6
votes
2answers
2k views

Should a table have a clustered index even if it doesn't have appropriate fields for it?

If you have a table without a good candidate field or fields for a clustered index (stable, sequential), is it better to have a clustered index on a bad field or is it better to make all table indices ...
6
votes
2answers
3k views

What would cause an orphaned ##MS_PolicyEventProcessingLogin##?

This morning I noticed my SQL Log was filling with the following message. The activated proc '[dbo].[sp_syspolicy_events_reader]' running on queue 'msdb.dbo.syspolicy_event_queue' output the ...
0
votes
2answers
3k views

Is it possible to join derived tables to actual in Access 2007

Is it possible to join derived tables to actual tables in Access 2007 like in SQL Server 2008? I have an example below: SELECT * FROM --MyOtherTable is a "real" table MyOtherTable ...
2
votes
1answer
36 views

How to set the language of a doc to a DB field

Is there a way to set the language of a document body to a value fetch from the DB in SSRS? I tried with a simple expression and I got this error. I wonder what the best workaround is
1
vote
1answer
6k views

How do you load a data file into a specific field?

How can I load data in a text file into a specific field. It's a 30 line log file from some copy operations; nothing fancy. I just want to store it as large text or a blob. The examples I am able to ...
3
votes
2answers
5k views

Will a delete then insert within a transaction cascade?

I had a question about what the expected and actual behaviour for the following scenario is. The scenario is one where a database table ([table1]) is cleared and reloaded every day. The table has an ...
7
votes
3answers
19k views

Why can't this mysql user log in with password?

In phpmyadmin I created a user called "edward" with password and all privileges: Yet when I try to log in via phpmyadmin, it says "Cannot log in to the MySQL Server". When I try to log in on the ...
2
votes
0answers
200 views

MDX Block Calculation Optimisation

I have a query I'm trying to optimise. I have read an article here http://web.archive.org/web/20100823233821/http://www.biblogs.com/2008/03/30/optimizing-countfilter-expressions-in-mdx/ about ...
0
votes
1answer
380 views

Store a small log file as a blob in sqlite

I am utilizing a small sqlite database to keep track of some jobs that run on a linux box. Most of them have small (less than 50 lines) log files... I'd like to store those log files as a record in my ...
0
votes
1answer
5k views

How to Import Data to MySQL RDS Instance?

I have a huge database approx 200GB (Some tables are more than 25GB in size). We are willing to migrate to MySQL RDS Instance.but as it does not provide any ssh access so we can't copy file system ...
3
votes
1answer
278 views

Adding new key(s) to enable partitioning, INSERT performance?

I have a table to storage GPS coordinates with multiple (~30) inserts per second (from 50 different devices) during 12 hours per day, so the table is growing fast, to improve the SELECT speed I was ...
4
votes
2answers
12k views

A Script to insert dummy Data in all tables of Database

I wanted a Script that can loop through all tables and their columns in the database and insert dummy data based on column type and size, so that i can start using the database for testing, and ...
1
vote
2answers
8k views

How to configure postgresql to use multiple cores?

How can I configure postgresql to use multiple cores in a single machine , is it automatically uses it ?
2
votes
1answer
3k views

SQL admin Scripts - Enabling read only access to all databases

I would like a script that will allow our web developers read only access to all databases on our SQL server. Currently we are having to do this manually as we have no SQL expert / DB Admin. Would ...
2
votes
1answer
734 views

How do I connect to Oracle Server without installing Oracle Client on client machines?

I am using Microsoft VB.Net to create a Windows application, and would like some suggestions on how to connect to an Oracle database.
1
vote
2answers
566 views

Merge Replicate and Mirrors

I am preparing some scripts to setup merge replication in our production environment. After completing the export from UAT, I've come across something that doesn't appear like it would work in the ...
4
votes
3answers
7k views

How to compare two SQL Server 2008 configurations

I have a problem with my application that works on my dev SQL Server 2008 (Developer Edition), but not on a production SQL Server 2008. Is there an easy way to export the settings from the production ...
2
votes
2answers
1k views

Table orders regarding Nested loop join in DB2

First I would like to cite the existing post Table order in Join Query so the author is saying that the table order really doesn't make things(result, access plan)different. I have doubt on this ...
9
votes
2answers
5k views

mongodb: replica-set with load balancer

Is there an option for load balancing with mongodb replica sets? I am not asking for a HAProxy or similar, but for a built-in feature from mongodb. Could not find tips for this in the docs.
2
votes
1answer
1k views

Using pgsql_fdw in a function result “ERROR: cache lookup failed for type 0”

Now we want to use pgsql_fdw to select a table of remote postgresql database,When we select the table in a session it is okey ,but when we use the foreign table in a funciton it turns out "ERROR: ...

15 30 50 per page