2
votes
0answers
111 views

MySQL MEMORY table has high Lock Wait Ratio [duplicate]

Possible Duplicate: Mysql Memory table getting many locks on my site I log every pageview (date,ip,referrer,page,etc) in a simple mysql table. This table gets very little selects (3 per ...
0
votes
2answers
2k views

Access ODBC reserved error 7711

I have user who is trying to access some tables from our Microsoft SQL Server 2008 R2 system (which very recently got moved to a brand new hardware/software stack) using Access 2007 via an ODBC ...
1
vote
1answer
131 views

Why is replication attempting to distribute NULL values into Identity columns

We are sporadically getting this error: Explicit value must be specified for identity column in our replication environment. I have checked the transaction command that is reporting the error and it ...
0
votes
0answers
424 views

MySql shell command not replicated to slave - “LOAD DATA INFILE” [duplicate]

I have a shell script that looks something like that: #!/bin/bash mysql -udb_user -pdb_password -e "LOAD DATA LOCAL INFILE '/srv/some_file.csv' INTO TABLE db_name.db_table FIELDS TERMINATED BY ...
0
votes
1answer
215 views

MYSQL - 'Select distinct' - different results on two exact versions of Mysql, databases synced

Same versions of Mysql and the OS (Ubuntu), Databases synced fully. Even the replica gives different results. One mysql instance is showing 11 results (from a Select distinct statement) and all the ...
0
votes
1answer
138 views

oracle local partition index

I have a table like this: CREATE TABLE employees (employee_id NUMBER(4) NOT NULL, last_name VARCHAR2(10), department_id NUMBER(2)) PARTITION BY RANGE (department_id) (PARTITION employees_part1 ...
2
votes
3answers
1k views

MySql shell command not replicated to slave

I have a shell script that looks something like that: #!/bin/bash mysql -udb_user -pdb_password -e "LOAD DATA LOCAL INFILE '/srv/some_file.csv' INTO TABLE db_name.db_table FIELDS TERMINATED BY ...
2
votes
2answers
5k views

SQL Server Management Studio generates error, can't start

On my development machine, SQL server 2008 R2 was running fine previously. But after formatting OS and re-installing the OS and SQL server, it generates the following error when I want to start SQL ...
15
votes
4answers
6k views

Determining how a schema change occurred?

Something bad happened yesterday. A view that was created sometime back ago was modified by someone which eventually broke the reports. Unfortunately. somebody (knowingly or unknowingly) did this ...
0
votes
1answer
374 views

InnoDB table vs MEMORY table for a mysql environment with many inserts

I run my sites all on InnoDB tables which is working really well so far. Now I like to know what is going on in real-time on my sites, so I store each pageview (page, referrer, IP, hostname, etc) in ...
0
votes
1answer
271 views

FTS - Index rebuild causing CPU issues (SQL Server 2008 R2)

I am encountering some critical issues on SQL Server 2008 in a production environment; We have a database that contains a FTS index; we also have a maintenance job that rebuilds the FTS index and ...
1
vote
3answers
499 views

Should I split a single table with an AUTO_INCREMENT PRIMARY KEY into two tables that can be joined on that PRIMARY KEY?

I have a table that has 46 fields with an AUTO_INCREMENT PRIMARY KEY. It's hard to look at a table that has this many columns, so I frequently use a SELECT statement to look at 34 of the fields that ...
2
votes
0answers
533 views

Is it normal for the SQL Server Profiler SP:StmtCompleted event to give 0 duration?

I'm trying to diagnose a slow running stored procedure in SQL Server. The procedure is quite long and complicated. I have been trying to figure out which statement is causing the issue. I have run a ...
5
votes
3answers
2k views

Setting up Mongo with clustering

I'm going to start using Mongo as a database but I will not have it clustered at first. Can I use Mongo on a single machine, then later come back, cluster it and capitalize on the sharding? Or can I ...
9
votes
4answers
6k views

Adding an index very slow…is there a mysql cmd to get an ETA or show progress?

I'm currently running an alter query on my table (20M entries) in order to add an index. it's running for more than 3 days already (stuck on 'copy to tmp table'). is there a way I can see the ...
7
votes
6answers
2k views

Best way to document database mappings for migrations [closed]

I'm working on a project that includes mapping database elements for a migration and I wanted to know what tools others were using to do this? Excel is a very flexible way to document simple ...
0
votes
1answer
439 views

Boyce Codd Normal Form understanding

I have a knotty (at least for me) problem to solve. Normalize, with respect to Boyce Codd NF, the relational scheme E(A, B, C, D, E, F) by assuming that (A, B, C) is the unique candidate key and ...
5
votes
2answers
466 views

SQL Server index reorg

While index rebuild will require at least same amount of space in the data file as current index index (as a copy of the index will be created) My reading on SQL Server BOL related to reorg it only ...
22
votes
4answers
22k views

Pattern matching with LIKE, SIMILAR TO or regular expressions in PostgreSQL

I had to write a simple query where I go looking for people's name that start with a B or a D : SELECT s.name FROM spelers s WHERE s.name LIKE 'B%' OR s.name LIKE 'D%' ORDER BY 1 I was wondering ...
6
votes
1answer
704 views

Loyalty reward - record for every day of a week

I have a table that contains every login a user makes. I am trying to make a loyalty system that rewards users if they've logged in every day for a week. So, the real question, how do I get every ...
4
votes
2answers
2k views

Separate tables or partition one huge table?

I'm building a rather large table that includes a particular column, my_column. There are a small-ish number of possible values for my_column, and each unique value of my_column should have the same ...
4
votes
2answers
3k views

How to handle deadlock issue sql server 2008?

I have a simple application.This application update data of a table (B) from another table(A) which is changed every 60 sec. User may read data at any time so creating deadlock. How is this sort of ...
2
votes
1answer
474 views

Restoring a postgres8.3 backup with postgres8.4

I'm trying to restore a backup dumped from a postgres 8.3 server in a server with postgres 8.4 with this command: pg_restore --host host --port 5432 --username username --dbname my_db ...
2
votes
1answer
195 views

Is dimensional modelling useful for modelling tables of calculations?

I have a set of tables that look a bit like this: Key 1 | Key 2 | Key 3 | Var 1 | Var 2 | Var 3 | ... | Var 200 ------------------------------------------------------------- X | Y | Z | ...
6
votes
4answers
27k views

Call a stored procedure from a trigger

I have created a stored procedure in mysql using the following syntax. DROP PROCEDURE IF EXISTS `sp-set_comment_count`; DELIMITER $$ CREATE PROCEDURE `sp_set-comment_count` (IN _id INT) BEGIN -- ...
3
votes
2answers
314 views

SQL Server Configuration Manager changes effected via Central Management Server

When using Central Management Server (CMS), under Central Management Server Actions, SQL Server Configuration Manager (SSCM) is an option. When launched, the GUI reflects the information of the ...
25
votes
4answers
2k views

Is NOLOCK always bad?

I am a Report Developer who wants to make my queries as efficient as possible. I used to work with a DBA who told me - I believe because I was always dealing with reports on a Production Server - to ...
4
votes
1answer
458 views

Would appreciate some suggestions on how I should model this data

I am setting up a website that will have users. Users can search for songs and (if signed in) save them to a playlist or their library of songs. I want it to be like iTunes in that all the songs on ...
4
votes
1answer
241 views

DB Master Key Encrypted By *Correct* Service Master Key?

My client has frequently run process where we move databases from a prod environment to lower environments (refresh QA with prod database, etc). These DBs have database master keys on them. We have ...
4
votes
1answer
3k views

How do you create a relationship to a non-primary key in SQL Server?

I have a Users table which has two columns a primary key called UserID and another column called UserName. UserID (int) PK UserName (varchar(256) They are both unique but I decided for reasons to ...
1
vote
1answer
2k views

MySQL - MySqlDump uses \n instead of null

Using Windows with MySQL 5.1. I am running a script that uses mysqldump to backup a database. The mysqldump syntax used is: mysqldump --user=root --port=3306 --password=topsecret some_database ...
2
votes
2answers
444 views

MySQL: Slow log; append CPU usage

I have the MySQL slow log feature enabled: http://dev.mysql.com/doc/refman/5.1/en/slow-query-log.html But sometimes the query_times are high simply due to high CPU load. How can I append the current ...
4
votes
1answer
587 views

How can I escape XML field in XML-output query?

I have following request: SELECT XMLAGG(data) FROM (SELECT XMLELEMENT(name item, XMLFOREST( title, body as description, date_created as date, 'http://example.com/news'||id as link )) AS ...
3
votes
1answer
2k views

Copying the database from SQL Server to PostgreSQL

I currently have SQL Server 2005 and I want to make a copy of the entire database into PostgreSQL. I don't want to migrate to new PostgreSQL but just a entire copy. I almost have more than 1 TB of ...
1
vote
2answers
357 views

What are the disadvantage/consequences of moving updated column to separate table to prevent table lock on the original table?

I have a table p with a column points. There are a couple of million of records in the table and i need to regularly calculate and update the points for each row. This process takes a couple of ...
1
vote
2answers
4k views

Why are breakpoints not being hit in SQL Server Management Studio?

SQL Server Management Studio allows debugging of SQL (breakpoints and stepping through the SQL). It is possible to step in to a stored proc being called and to see a call stack. However I cannot ...
9
votes
1answer
4k views

Deadlock error isn't returning the deadlock SQL

Transaction (Process ID) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. I am getting this error randomly when one of my ...
2
votes
1answer
320 views

Rewriting a query

I have a database with the following structure (star schema): facttable: pros integer mena integer me integer vahet double precision slutttp timestamp without time zone Structure of each ...
4
votes
2answers
2k views

How to optimize the my.cnf of a MySQL server that mixes InnoDB and MyISAM tablespaces?

I have a database that, because of some issues, I needed to convert some tables from MyISAM to InnoDB. I basically did this: set sql_log_bin = 0; set sql_mode = 'STRICT_ALL_TABLES'; ALTER TABLE ...
0
votes
1answer
195 views

Why mysqld server service gets aborted when i start mysql client service? [closed]

I am installing mysql-5.5.7rc from source code. After installation when i start mysqld service is being run but as soon as i run mysql client service server service gets aborted.. And also ...
2
votes
3answers
2k views

How to detect a running mysqldump?

Here are the things I can't change: We got a mySQL myISAM replication running a master and some slaves. One slave is being used for nightly backups using mysqldump. The backups is using heavy locks ...
6
votes
3answers
2k views

Why performance degradation with query hint FIRST_ROWS(1000)? [closed]

I have a query with user supplied arguments that can produce a very high amount of rows depending on the user's input. In case the user supplies very unselective arguments, the query takes a lot of ...
4
votes
1answer
264 views

can i backup multiple db2 databases at the same time?

in db2 9.5 LUW i have one db instance to which i just added a second database. we don't have TSM or multiple partitions which is what all the documentation seems to be about when i search the web for ...
1
vote
1answer
1k views

oracle global index vs local index on a partitioned table

I have a table that has range partition by month on a date column (created_time). I was wondering what is more efficient of creating a global index on this column or creating a local index on this ...
2
votes
1answer
649 views

SQL Server 2008 r2: What events/queries hit tempdb

We had a slowdown on a db server this morning. Checking the logs, the only thing that happened during the 2-minute slowdown worth noting was an object being created and deleted in tempdb over the span ...
2
votes
2answers
558 views

SQL Server 2008 R2 Query For Failed Email Notifications

Is there a SQL query I can run to see if there has been any failed attempts to send database mail in the last X Minutes?
4
votes
2answers
254 views

Backup VLDB replicated database in SQL Server?

I have a problem with my backup strategy. Currently I'm doing a Full Backup every night and transaction log backup every 2 hours to TAPE. This used to work without problems, but the size of the DB ...
3
votes
2answers
2k views

What is the right time to use an ENUM versus a normalized types table in MySQL? [duplicate]

Possible Duplicate: Advantages and Disadvantages to using ENUM vs Integer types? Considering MySQL only... I'm curious to know what the community thinks the proper use-case for an ENUM ...
1
vote
1answer
887 views

Mysql Impossible WHERE and enum

I'm using enum as an alternative to check constraint which is still not supported by mysql. Could you clarify why optimizer doesn't take into account allowed values for enum ? For example, CREATE ...
-1
votes
1answer
1k views

DBCC Checkident doesn't work for reseeding tables

I want to reseed all of my tables. I delete all the values from them and then run this query: But then when I populate this database again, id starts from the maximal id of the deleted entries. Why ...

15 30 50 per page