All Questions

0
votes
0answers
2 views

Postgresql 9.3: Add Unique constraint using an existing unique index

I would like to add a unique constraint to a DB field in one of my production databases. Unfortunately, the following statement is blocking: ALTER TABLE package ADD CONSTRAINT unique_package_id ...
0
votes
0answers
5 views

Re-posting schema

I'm building a social network very similar to Twitter, in which users can see a feed with content posted by users they follow. Users can like and re-post (i.e. "Retweet") posts. Re-posted content ...
0
votes
0answers
2 views

Properly reload MySQL Cluster Management Server Windows Service configuration

I'm writing a little utility to manage MySQL Cluster and have to know how to reload config.ini sometimes. I'm faced with mysterious problem when MySQL Cluster Management Server installed as Windows ...
0
votes
0answers
4 views

NoSql vs Sqlite in terms of crossplatform application

I've been planning development of simple application mimicking facebook wall, but private to user, unless decided to share it. Something like facebook offline, to post something on somebody's wall ...
1
vote
1answer
10 views

How to index a query `WHERE field IS NULL` (postgres)

So I basically have a table with lots of inserts, setting one of the fields (uploaded_at) to NULL. Then a periodic task selects all the tuples WHERE uploaded_at IS NULL, processes them and updates, ...
1
vote
0answers
9 views

Transaction speed benchmarks for mySQL v5.6 replication - seems very slow

I'm trying to select the best configuration for our new infrastructure but got a bit confused about the results. I used sysbench v0.5 for the tests: prepare data sysbench ...
0
votes
1answer
15 views

Calculating storage requirements of individual fields based on actual usage and properties?

I am attempting to determine if anyone has built a handy utility to query a set of fields and estimate a range of expected data usage of the set of fields. I have looked at the Microsoft Article ...
0
votes
1answer
6 views

Lost Connection to mysql server at 'reading authorization packet', system error 0"

OK, this has been bugging me all afternoon now, I have a new MySQL Database '5.5.40-0+wheezy1-log' running on Debian Linux. It is to all extents and purposes a clean install. I have created two ...
2
votes
1answer
17 views

SQl Sever Backup Exclude Users

I have a database on SQL 2012 that I need to backup and send to someone on a different network / domain. Is there a way to create a full backup file that will not include the users / security ...
0
votes
0answers
5 views

PostgreSQL buffer page size limitations - rebuild with larger size?

We just ran into a limit on indexing due to the 'index size cannot be more than 1/3 of page size (2712)' error. This indicates the buffer page size is 8192 (8k). This seems awfully small during the ...
0
votes
2answers
22 views

Update statistics for all databases all tables in a server

Hi I have been working on a script to update statistics of all tables on all my DBs. The idea is to parametrise it later on, but just as a quick fix, and not wanting to implement Ola's scripts today, ...
1
vote
0answers
18 views

HOW to Solve this Error [on hold]

Microsoft OLE DB Provider for ODBC Drivers error '80004005' [Microsoft][ODBC SQL Server Driver][SQL Server]Transaction (Process ID 114) was deadlocked on lock resources with another process and has ...
0
votes
0answers
7 views

How to insert values in junction table for many to many relationships?

I have three tables in database: trips(trip_id(pk), trip_name(unique), user_id(fk)) places(place_id(pk), place_name(unique)) trips_places_asc(trip_id(fk), place_id(fk)) Since, many trips can ...
0
votes
0answers
4 views

Following mysqltuner suggestions: query_cache_size and join_buffer_size

So I am following the suggestions of mysqltuner, and so far I've had great results, the server is performing well (dedicated VPS running a large Magento eCommerce store) There is only two issues left ...
3
votes
5answers
99 views

A query that lists all mapped users for a given login

When looking at the properties of a particular login, it's possible to see a list of users mapped to that login: I profiled SQL Server Management Studio (SSMS) and I see that SSMS connects to every ...
0
votes
0answers
7 views

MySQL Crash due to “InnoDB Assertion” after Query

Current setup: Ubuntu 12.04 LTS MySQL 5.5.31 Current Use: Slave - Only ETL queries 64 GB RAM Intel(R) Xeon(R) CPU X5670 @ 2.93GHz - 12 Cores - Hyperthreaded (24 Logical) MySQL Main Settings: ...
0
votes
1answer
24 views

Help in Automating Database Restoration in SQL Server

This question is a continuation of my last question How to use variables with RESTORE FILELISTONLY. Every two months, I have to clone about 50 databases from production to a development environment. ...
0
votes
1answer
34 views

Using Case in SQL

I want my query to fill in information where results are null. Particularly I want the PlanFirmSpecCode.SpecialCode to = the FinancialPlanner.LastName when the special code field is null. And when my ...
0
votes
0answers
5 views

Efficiently relating simple dimensions to fact table in Tabular Model

I have a SSAS Tabular model that has a fact table that joins to many simple, descriptive dimensions. FactA DimA DimB DimC ------- ------- ------- ------- DimAKey DimAKey ...
1
vote
1answer
22 views

System Health Extented Event - Security_Ring_Buffer_Error_Recorded

I've recently upgraded a Production SQL instance from 2005 SP4 to 2012 SP2 and have noticed a large amount of the following entries in the system_health extended event:- I've been looking into this ...
0
votes
1answer
45 views

how do i join two different tables in mysql

This is table1: id name m1 m2 m3 total 1 raj 10 10 10 30 2 ram 60 60 60 180 3 kumar 70 70 70 210 4 kanna 50 50 50 150 5 vivek 64 ...
0
votes
1answer
19 views

Connection through listener stops working after VPN client is active on DB machine

I have an Oracle 11g2 64bit database instance running on my Win7 developer machine. Normally everything works fine, I can connect to the DB with or without listener. (Normally all connections are ...
2
votes
0answers
101 views

SQL Server 2012 Standard using too much memory

For the past few months I have had a SQL Server 2012 Standard edition installation using up all the RAM in the server, up to 190GB (I'm not kidding). About every 3 to 4 days I end up having to restart ...
1
vote
1answer
14 views

Move a MySQL 5.5 database to a server running MySQL 5.1

I have a backup of a MySQL database (using InnoDB) from a Windows machine that was running MySQL 5.5. The Windows machine is no longer available and now I need to import the backup into an Ubuntu box ...
3
votes
1answer
54 views

Overlapping indexes

I have two non-clustered indexes on one of my dbs and their definition are: CREATE NONCLUSTERED INDEX [NC_Index1] ON [dbo].[anyTable] ( [X] ASC, [Y] ASC, [Z] ASC ) INCLUDE (A , ...
0
votes
1answer
28 views

How to create a relationship between one table and multiple other entities

(PLEASE NOTE: I am aware that in a few cases there are one-to-one relationships where one-to-many should be present. It's not intentional, it's just a mistake on my side. Take no notice.) I am ...
0
votes
2answers
20 views

Need help about giving relationships in database design

I am developing a simple blog application in which users can write posts and others can like, comment, share etc. i am facing difficulty in designing database. What I have tried is: user ...
0
votes
1answer
16 views

Multiple queries and a report

im fairly new to databases. I have multiple query's that i normally run individually at the end of loading data to my table doing simple integrity checks like length ,char types and so on (see ...
0
votes
0answers
25 views

How to determine a schema version at runtime

Is there a portable way or best practice to access a version number for a schema at runtime? Rationale: you have multiple systems (development, QA, etc.) where you push schema changes from one system ...
1
vote
2answers
58 views

Create/Alter stored procedure without compiling

Is it possible to create or alter a stored procedure in SQL Server 2005* that doesn't compile the procedure? (* - yes, unfortunately, we still need to support 2005 as our minimum standard) I have a ...
0
votes
0answers
16 views

ORA 00933 SQL command not properly ended, WHERE function

I've made a query that works perfect but when i add the sentence below it gives the error ORA 00933 SQL command not properly ended Could anybody tells me why following addition to script gives ...
0
votes
0answers
38 views

How much minimum RAM and number of physical hard disks needed for SQL Server to handle a million records per day [on hold]

I am building a Real-time BI solution which will basically consist of an ETL and BI Engine - mainly based star schema/measures-dimensions. I also have to build Reporting/Charting into it. I can't ...
0
votes
1answer
28 views

unique constraint violated

I have code create table CREATE TABLE OFPHONE ( PHONEID INTEGER NOT NULL, HOTLINE VARCHAR2(20 CHAR), EXT VARCHAR2(20 CHAR), PHONE VARCHAR2(30 ...
0
votes
0answers
9 views

Mongo Replication with VIP

Have anyone implemented Mongo replication using replset arbiter. At the time of fail-over from Primary to Secondary, Arbiter should bring down VIP on primary and enable on secondary when Arbiter ...
0
votes
1answer
14 views

fn_trace_gettable Error SQL Server 2008

When I Execute SELECT * FROM FN_TRACE_GETTABLE(N'E:\Trace_Files\trace1.trc', 1) It says "You do not have permission to run 'FN_TRACE_GETTABLE", What type of permission on server required to execute ...
0
votes
0answers
13 views

MySQL performance_schema not working properly?

I have MySQL 5.6.19 community server running on my Ubuntu 14.04. Lately I have been trying to monitor MySQL server using performance_schema. Previously I used to do this by running SHOW FULL ...
4
votes
3answers
276 views

Why SQL Server 2008 R2 do full installation for just adding another instance on the same machine

Why SQL Server 2008 R2 does a full installation for just adding another instance (only database engine) on the same machine? I thought it will be quick a installation, but it's not. What is SQL Server ...
0
votes
1answer
26 views

How does one know when to stop normalizing?

Alright, so basically I feel that I tend to over-normalize things, and maybe I am doing it at the cost of performance. So, to illuminate on the problem, I have created the following schema to use as ...
2
votes
1answer
33 views

Can autoshrink permanently damage a database? [duplicate]

I've been given the task of finding out why our server is slow. I ran a stored procedure I downloaded called sp_Blitz. It let me know that our database had auto-shrink enabled, and to disable it. So, ...
1
vote
1answer
16 views

mongodb shard chunk migration 500GB takes 13 days - Is this slow or normal?

I have mongodb shard cluster, shard key is hashed. It has 2 shard replica sets. Each replica set has 2 machines. I did an experiment by adding another 2 shard replica sets, and it starts to ...
0
votes
2answers
37 views

Is there anything wrong with creating a very large log file?

I've been given the task of finding out why our server is slow. First of all I did not set this server up. Is there anything wrong with setting the initial log file size to 70GB? That's what ours is ...
1
vote
0answers
6 views

MariaDB Galera Cluster - nodes fail to start

This is a new installation (fresh VM and MariaDB install). For some reason, the nodes are having trouble joining the master server. The master server would pause at Preparing binlog files for ...
0
votes
0answers
12 views

Is database sharding done on a table level or database level?

I'm new to sharding databases, so I'm trying to wrap my head around it. Let's say we have a database that has 3 tables: Customer, Suppliers and Orders. Each table has 10 million records. I want to ...
0
votes
2answers
14 views

Effects of monolothic databases on performance and security?

Please note: although I'm specifically calling out MySQL here, I would also appreciate/entertain generic answers that apply to all/most relational systems. As a developer I don't see the design ...
1
vote
1answer
23 views

Preventing duplicate data when usual normalization only makes sense for some of the records

Background I have two tables, one called issues and the other called status_checks, which both contain (among others) the field comment (VARCHAR). An issue is raised by a user when something needs ...
1
vote
0answers
13 views

What does a high level overview of the logic backing database queries look like?

explanation i.e. At the database driver level of abstraction you may invoke API methods for compiling and executing some kind of query language, which can be expressed as a string sometimes (SQL ...
0
votes
0answers
28 views

Where statement involving isnull/case

Here is my query: [SuggestedRetailPrice] > 0 AND (ISNULL( CASE WHEN [AdEnd] < GETDATE() THEN [AdPrice] END, [BasePrice]) )/[SuggestedRetailPrice] > 0.8 ...
0
votes
1answer
33 views

Sum(Case When) Question

I'm trying to get the syntax correct on my query but I'm having issues. Currently my query will show the Household Total Value (HHValue) and then the NationalValue on one row, then the second row ...
1
vote
1answer
29 views

Breaking down by minutes in between two dates

In MySQL, I've got a data model with a "visit" table that has start and end datetimes. How can I get a breakdown of the number of visits that are active per minute? e.g. | visit_id | start | end ...
0
votes
1answer
18 views

What permissions do I need to grant on service accounts on SQL root path when relocating?

During a Win2012 with SQL Server 2012 two-node cluster installation, I accidentally set the system root to be the mount point volume hosting folders for the various attached LUNs for the system and ...

15 30 50 per page