0
votes
2answers
268 views

Using MySQL InnoDB as an Archive

My site has a main MySQL InnoDB table that it does most of its work on. New rows get inserted at a rate of 1 million per week, and rows older than a week gets moved over to an archive table on a daily ...
3
votes
1answer
97 views

Sequential joining of tables in order

Table albums has (among other field) field id. Table photos has column id, field album which is a foreign key referring to album id and some other fields (which are irrelevant for the question I ...
5
votes
1answer
1k views

Type conversion in expression may affect “CardinalityEstimate” in query plan choice?

I maintain an archive database that stores historical data in partitioned views. The partitioning column is a datetime. Each table under the view stores one month of data. We constraint the events on ...
1
vote
1answer
479 views

TSQL DateTime DataType - fractional seconds vs milliseconds

Wanting to get all records from a single day. So everything between 2013-03-05 00:00:00.000 and 2013-03-05 23:59:59.999. We're getting overlap at the backend with things that happened at 2013-03-06 ...
3
votes
0answers
382 views

SQL Server Database Hot Backups: Which Technique(s) to Use for Multi-Level Replication?

I'm reading the many other posts here about mirroring vs. replication, but I'd still appreciate it if someone with some experience would weigh in. My small development team needs to have local ...
5
votes
2answers
1k views

Manually moving SQL instance to another node causes immediate database mirror failover

I have a two-node SQL cluster (2008 R2). Some of the databases within that SQL instance are mirrored to another server on a remote site, using the High safety with automatic failover. The mirroring ...
3
votes
2answers
486 views

Can I programmatically generate reports that are emailed as Excel docs from SSRS?

I've searched already and don't see (or can't decipher) a solution for my issue. I have SSRS emailing a report for 1 district (with 12 retail stores). However, each Region has over 8 Districts, and I ...
1
vote
0answers
53 views

Migration advice from SQL server 2000 bak

A small and old Windows 2003 server, just crashed; from the backup only the .bak files are available. A new server will be built, however, as the database is very small (20MB) and the Windows server ...
5
votes
3answers
3k views

Write differences between varchar and nvarchar

Currently in our SQL Server 2012 database, we're using varchar, and we'd like to change that nvarchar. I've generated a script to do that. My question is are there any differences in how SQL Server ...
1
vote
2answers
159 views

Can I configure MySQL's typecasting to consider 0 != 'foo'?

This article points out the following security problem with MySQL: USERS id | email | password_reset_token 1 | one@example.com | QTlXww)uV!Hdg3U6aGwKV2FPvAqzVgPx 2 | two@example.com | ...
3
votes
1answer
254 views

Backing up a 400-500 GB database on MySQL/Amazon RDS?

We have an Amazon RDS small instance for a MySQL datawarehousing database. Database size will be around 400-500 GB very shortly. What is the best way to backup our database? Can it be done ...
2
votes
0answers
368 views

Can PostgreSQL's COPY create CSV with Locale-specific number formatting?

I want to create a CSV with PostgreSQL 9.1 COPY that directly opens correctly with a double-click in crazy German Excel 2010. Using ";"-Delimiter is easy. The encoding is solved, but Excel only ...
2
votes
2answers
554 views

Check if row exists

I need to write a query that will insert a row only once, even if the query is run multiple times. Being new to SQL (well new-ish), I did an if not exists(...) but a friend said he preferred deleting ...
1
vote
1answer
2k views

MySQL: Create multiple tables with one query

Can you list multiple table names in a MySQL CREATE TABLE query? CREATE TABLE table1, table2, table3 LIKE table_template; If so, can you do it with the IF NOT EXISTS clause? CREATE TABLE IF NOT ...
1
vote
1answer
494 views

Killing idle pooled connections

On SQL Server, I'm trying to prevent connection from staying open. From here I understand that Connection Lifetime allows a connection to stay alive for a certain period of time since it was opened. ...
0
votes
3answers
169 views

Select MaxDate where hh:mm:ss makes the difference

How to select the maximum date from a table where hh:mm:ss is selected? My query is the following, and returns the latest date, but if there are different times recorded, the date will be returned ...
2
votes
1answer
442 views

ORA-16000 when trying to perform select on read only Oracle database

My application's SQL encounters an ORA-16000 error when trying to access a read only Oracle database. ORA-16000: database open for read-only access ORA-06512: at "SYS.XMLTYPE", line 272 ORA-06512: ...
6
votes
2answers
2k views

SQL Server alter table to change TEXT to NVARCHAR(MAX) greatly increasing database size

I need to update a SQL Server database thats about 18GB in size to change a significant number of TEXT columns to NVARCHAR(MAX). The problem I'm having is after executing all the alter table ...
0
votes
0answers
16 views

Mongo replication lag slowly increasing [duplicate]

I am running a replica-set in production with slaveOk = false using mongo 2.0.7 in AWS The replication lag on one of the servers is close to 58 hours. This replication lag is sometimes decreasing ( at ...
0
votes
2answers
2k views

MS Access ER diagram

I have database scheme for Microsoft Access. I'm interested how I can convert the scheme into an ER diagram? Is there any tool that can do this based on scheme relations?
4
votes
1answer
164 views

Materialized View PostgreSQL

Is there any possibility of having built-in materialized views in PostgreSQL ? I don't want Gardner version or somehthing like physical table populated by triggers. I've read that was/is something ...
4
votes
4answers
3k views

Handling a big table in mysql

I have a really big table (approx. > 100.000.000 rows and a size of > 50GB) and it's getting a big performance kill right now. Beneath the primary key (id) it uses a fulltext key on a varchar(500) ...
1
vote
1answer
152 views

Mongo replication lag slowly increasing

I am running a replica-set in production with slaveOk = false using mongo 2.0.7 in AWS The replication lag on one of the servers is close to 58 hours. This replication lag is sometimes decreasing ( at ...
3
votes
2answers
247 views

Running a TPC-C Benchmark Without sleep() i.e. key-in + think time

We are running a TPC-C benchmark against a PostgreSQL 9.2 server using JdbcRunner-1.2 implementation. During first few tests we were not getting a smooth (that is, without sudden spikes down to almost ...
6
votes
5answers
14k views

How to properly kill MySQL?

I have CentOS 64bit with CPanel installed and I use service mysql stop However, it keeps doing ..... for minutes and it never stops. It used to be instant. Any idea why it does that and how to fix? ...
0
votes
0answers
56 views

How to properly kill MySQL? [duplicate]

I have CentOS 64bit with CPanel installed and I use service mysql stop However, it keeps doing ..... for minutes and it never stops. It used to be instant. Any idea why it does that and how to fix? ...
5
votes
2answers
2k views

RSExecRole missing

I have multiple servers and 4 of them have reporting services installed with the ReportServer & ReportServerTempDB databases. A few days ago I was setting up security for a new login and I found ...
0
votes
1answer
130 views

Run job in agent based on table data

Is there a way to start a SQL Server agent job if a table is not empty? Basically, first I want to check a table, and if the table is not empty then start the job. If it is empty, then check every 1 ...
0
votes
0answers
60 views

Database too slow after CHARSET Conversion

I have an Oracle database which runs on version 9.0.1 with WE8859P1 charset and i'm trying to migrate it to the version 9.2i which has the WE8MSWIN1252 charset. The conversion is made without any ...
0
votes
2answers
529 views

Error while connecting SQL Server management studio 2008

I have installed SQL Server 2008 management studio. When I connect, it shows an error. Also when I go to the SQL Server configuration manager and click on SQL Server SERVER services, this message is ...
0
votes
1answer
473 views

Configuring Postgres 9.2 streaming replication with Redhat Clustering Suite for High Availability

I'm in the process of configuring postgresql 9.2 streaming replication with Redhat Clustering Suite for high availability. I have 1 master and 1 hot standby configured to replicate the data from ...
1
vote
1answer
564 views

What does the bit data type map to in a Java Domain Object

When you have a column of the bit data type what Class would be used to represent that in a Java POJO mapping that table to an object which is using javax.persistence annotations? I tried Boolean, ...
0
votes
1answer
854 views

MySQL Fulltext match with forward slashes

I'm trying to run a fulltext match against a product database, where the product names have forward slashes in them. These are staple sizes, so it's quite important that they get matched. However, ...
0
votes
2answers
1k views

MySQL Table not repairing

Table info: Database name: user_motiva Table name: wp_options.frm wp_options.MYD wp_options.MYI wp_options.TMD when I do a mysqlcheck -r --all-databases it gets hung on that table even if you ...
3
votes
0answers
339 views

How do I get more details on a full text catalog error?

I have an error that is repeatedly generated on a SQL Server 2005 instance running the databases for MS Team Foundation Server. 'Severity 16' occurred on INSTANCENAME Looking in the SQL Server ...
1
vote
1answer
549 views

Optimizing an audit table for inserts and deletes

I'm trying to identify the best way to design a table for audit purposes. Basically I log several last events for many users in one table. There's a limit on the number of records for each user. The ...
0
votes
1answer
3k views

Error 1044 Access denied to user

This is driving me crazy. When I try to create a few tables from my Workbench model I get this error 1044. I've been trying to find a solution but nothing works for me. Curiously when I run ...
3
votes
1answer
103 views

Creative workaround for granting edit rights to individual jobs for a group?

We have two developers that say they can not function without full rights to a few jobs on our database server. They both want rights to the same jobs. Given that it seems that MS doesn't seem to be ...
1
vote
1answer
374 views

How do I understand this deadlock?

I have two threads doing inserts into a table at the same time, causing a deadlock. The interaction with the table is in a new transaction, so I'm pretty confident there is nothing else going on here. ...
3
votes
1answer
2k views

Slow Queries Not Logging

I am attempting to enable slow query logging on our server in order to identify any queries that could use optimization. Sounds simple enough, however my file is not being written to. I get no errors ...
1
vote
1answer
5k views

How to fix “The OLE DB provider ”MSOLAP“ has not been registered”?

Here's the code I'm using to register a linked server to SSAS: USE [master]; GO EXEC master.dbo.sp_addlinkedserver @server = N'ServerAlias', @srvproduct = N'', @provider= N'MSOLAP', ...
2
votes
1answer
265 views

SQL Uniqueness Across Multiple Tables

I have two SQL tables: Users and clients. Every row in the users table has a set of clients in the clients table, linked by the users table id field and the clients table user_id field. The users ...
0
votes
1answer
101 views

Sleep Processes are Running Longer Than Allowed

From time to time my mysql server will run into a "too many connections" error. I believe part of the problem is large amount of sleep processes that are running, some over 1000 seconds. When ...
1
vote
2answers
193 views

Multiple database servers for performance vs failover

If I have two database servers, and I am looking for maximum performance vs high-availability, what configuration would be best? Assuming the architecture is two load-balanced web/app servers in ...
4
votes
1answer
1k views

Join To a @Table Variable is running ineficiently

Alright so I have a report sproc that was running incredibly slow. Customers were complaining that the report would not run so I started investigating exactly where in the sproc the problem was and I ...
0
votes
2answers
794 views

Need a way to query a table, and JOIN it with the TOP 1 related record from an other table

As a follow up to this question, I'm wondering if there is a better and/or more efficient way to gather the data in question. As stated, this query does return me 95% of the data I need -- SELECT ...
0
votes
0answers
154 views

SQL Server 2000 database attach error to SQL Server 2005

I have a SQL Server 2000 database (mdf and ldf). When I try to attach it, using SQL Server Management Studio Express 2005, I get this error: Attach database failed for Server 'XXXXX\SQLEXPRESS'. ...
1
vote
2answers
199 views

Oracle Case when problem

I Have a table like fallowing work_id group effort ----------- ----- -------- 1 A 10 1 B 5 2 A 7 2 ...
2
votes
1answer
733 views

How can I configure SQL Server 2012 to use multiple NICs?

How can I configure SQL Server 2012 to use multiple NICs? I've a server with 4 NICs. I want to use 2 NICs to query my databases, and 2 NICs to retrieve results from them. I want them to work in load ...
0
votes
3answers
479 views

Fixing a query that returns failed job information

I' using a SQL Server 2008 Sp3 environment. I have a query that returns information about failed jobs from the last 10 minutes. If a job has two schedulers (for example - a job that runs every 10 ...

15 30 50 per page