1
vote
1answer
448 views

How can I stop SQL from validating an OPENROWSET query when its not going to be executed?

I have a problem where a stored procedure is throwing an error because it's trying to run/validate an OPENROWSET query inside it that it doesn't actually have to execute. The stored procedure that ...
4
votes
1answer
1k views

Firebird monitoring tables

I am working with a Firebird 2.1.1 database and I started reading about the Monitoring tables. I am trying to see somehow in real-time what queries does each client performs in the database. I had ...
1
vote
0answers
404 views

SQL Server: Collation of the resource database

I'm trying to use stopwords so that some words are skipped by the Full-Text Indexer. I can add those stopwords in the table sys.fulltext_stopwords. When trying to get a list of stopwords and ...
3
votes
2answers
152 views

In-memory and hard-drive hybrid

I'm going to start my Master of Science degree work. My goal is to implement (and test in various scenarios) hybrid database environment: my application will communicate with two databases. One will ...
3
votes
3answers
2k views

InnoDB insertion faster

I'm a graduate school student researching OLAP with Mondrian OLAP. So I want to insert data into InnoDB (MySQL 5.5) faster at the initial loading. In this environment, the only user is me, so I think ...
2
votes
2answers
108 views

Joining 4 tables and 2 counts

I have four tables. UserMaster ---------- UserKey - PK UserName UserID - UNIQUE UserLogTransaction ------------------ UserID - FK:UserMaster.UserID LoginTime LogoutTime CallCenter ---------- ...
2
votes
1answer
172 views

Deriving formulas for input/output

I'm currently enrolled in a DBS class and am having problem with an assignment. I've searched around and have been unable to understand what it is I'm meant to be doing with this derivation formula. ...
5
votes
2answers
2k views

Logins aren't syncing across Availability Groups

We have 2 servers in an AlwaysOn group. While the user accounts within each synchronized database exist on both servers, the database instance level logins only exist on one of the servers. Ie ...
3
votes
1answer
958 views

query to identify all data types used in postgresql database tables

I don't want to know all data types, just all data types used in my database. Can this information be queried? PostgreSQL 8.4 and 9.x versions I currently need to know all data types for over 200 ...
3
votes
1answer
2k views

DB2 Defining remote database alias

I'm using DB2 9.7.0.3 for AIX. I want to select data from a remote database, also running DB2 9.7.0.3 for AIX, and insert it into the local database I'm connected to. I believe the query for this ...
1
vote
1answer
479 views

How can I restore the sql_variant_property of baseType back to a table variable in SQL Server

Ok, I know the title is confusing but here it goes. BTW I am using SQL Server 2008 I have a table that I am trying to use as a storage container. It has 3 columns: reportID integer, dataLabel ...
1
vote
1answer
166 views

Is there a way to write intelligent queries against a merge table in MySQL that represents a bunch of tables partitioned by date?

I have a set of MySQL tables that are partitioned by date, with a merge table representing all of them. For the query I am writing, the results are joined by date, so rows in table A_2012-12-05 will ...
2
votes
3answers
1k views

Incredibly slow query performance

I have a query that is used to populate an aggregate table for reporting purposes. The query comes from another developer here at the company I work for but is my job to make it run fast. So far all ...
2
votes
1answer
2k views

What are SQL Server Securables?

I migrated two applications to the new server. One of the them works without any issues but the other ran into back end sql permission problems like The EXECUTE permission was denied on the ...
5
votes
2answers
2k views

Advantages of using PgBouncer vs HAProxy?

Are there any advantages for using one over the other? I'm only looking at options to hide the actual IP address of the master and slave servers from my processes, and not having to restart them if ...
2
votes
2answers
258 views

Execution plan flips Filter and Execute Scalar when using the PK, causes cast to fail

I have some data tables that where imported in from a flat file source so everything is varchar(max) except FileRecordID which is a int that hold the row number the data came from in the flat file ...
1
vote
1answer
289 views

SQL Server Replication tools

We're trying to create an exact copy of our prod database to later use it for reporting. I was told that some of my colleges tried to use the out of the box replication tools that SQL Server provides ...
3
votes
1answer
169 views

I need help to migrate denormalized table content to normalized form- MS Access

I have a staff database where we are storing information in Normalized form. There are 3 entity tables and 2 mapping tables connecting these with m-n relationships However, for ease of collecting ...
3
votes
1answer
1k views

halt on error in a sqlplus script

I am deploying pl/sql code using several sql files that are called with @@file. If a package got a compilation error the script continues to the end. Is there a way to stop on every compilation ...
4
votes
1answer
142 views

PostgreSQL replication for archiving

I've looked around a bit and haven't found a very clear strategy or method for what I'm trying to do, which is surprising because I would think it would be a fairly common practice. I currently use ...
8
votes
1answer
1k views

SQL Server Index vs Statistic

What are the differences between CREATE INDEX and CREATE STATISTICS and when should I use each?
3
votes
2answers
158 views

Tablestructure for fast inserts/deletes with foreign keys

Current Situation We have a table called c with ca. 300,000 rows. In this table we store the competitors for a specific product. Example: id | competitors | some infos about competitor | ...
5
votes
1answer
483 views

Cross Database transactions with Availability Groups

Recently we are working on a POC to get Always on work and happened to see this article in BOL http://technet.microsoft.com/en-us/library/ms366279.aspx This article suggests that there would be ...
0
votes
1answer
227 views

Any advantages if we use multiple database instead of only one in PostgreSQL?

I would like to get the suggestion for my usecase. We have a database in our production machine.We are doing continuous writes in that database since we are doing crawling,parsing and it is being ...
2
votes
1answer
934 views

How to determine the read / write ratio of your server?

When looking at the read / write ratio of your server would you look at the NUMBER of reads and writes or the number of BYTES read and written? For example, consider the following numbers from ...
6
votes
1answer
3k views

MySQL INNODB corruption after server crash during concurrent truncate command

My server crashed today I think due to a concurrent truncate table command on one of our INNODB tables. The server could be restarted, but after it starts up, everytime I try to issue an SQL command, ...
2
votes
1answer
214 views

Pattern similarity in time-series [closed]

I have a PostgreSQL database and my data-set include time-series of temperature for two stations. I would like to look their pattern's similarity in similar time sequences. For station number 1: ...
3
votes
1answer
1k views

Generate insert statements for table AND related data

I'm looking to move data from tables and related tables between 2 databases. The trouble is the primary keys are out of sync. Is anyone aware of a tool which can generate insert statements for a ...
2
votes
1answer
445 views

What is the purpose of session pool_mode in pgbouncer?

Since in this mode pgbouncer creates outbound connection for each inbound connection it seems to me that pgbouncer doesn't work as pooler. It's just 1 to 1 mapping. Where am I wrong?
2
votes
1answer
200 views

Removing duplicate entries for each hour

I recently asked the same question about MySQL, which has since been migrated to Postgres. Old question. To sum it up: I have a table with an id (type UUID), a timestamp, and some text (row3). How ...
5
votes
1answer
203 views

Walking a BTREE index as far as possible in MySQL

Suppose one has a column of words on which one builds a BTREE index: CREATE TABLE myTable ( words VARCHAR(25), INDEX USING BTREE (words) ); LOAD DATA LOCAL INFILE '/usr/share/dict/words' INTO ...
3
votes
1answer
2k views

Get week/month data

There is a table (MySQL). It's simplified structure: day DATE val INT UNSIGNED I need the average val for: every week containing a date from the table; every month containing a date from the ...
1
vote
1answer
651 views

Is this partial dependency?

I have this relation: R = ABCDE F: AB->DE, AC->B, DE->C, AE->C, C->AB. Is AC->B a partial dependency in F? I'm guessing it is, because C->AB can be decomposed to C->A C->B ...
1
vote
1answer
150 views

Binding errors with dependent stored procedures

We are getting strange errors on one of our stored procedures. This stored procedure calls other stored procedures & we are getting errors relating to columns that cannot be found in the sub ...
2
votes
1answer
727 views

error in Execute SQL Task with parameter

I have an Execute SQL Task object in the Error handlers section of a SSIS package. What it does is inserting a record to a table using OLE DB connection. There is a value in the insert statement that ...
4
votes
1answer
232 views

I need help using hierarchyid datatype and requiring a unique constraint on a varchar field

I want to resolve a bunch of tables that had parent->child->grandchild relationships into a single table using hierarchyid identifiers. Here is what I came up with based on what I had. CREATE ...
49
votes
2answers
42k views

Why Does the Transaction Log Keep Growing or Run Out of Space?

This one seems to be a common question in most forums and all over the web, it is asked here in many formats that typically sound like this: In SQL Server - What are some reasons the ...
1
vote
1answer
237 views

SQL Server 2005 merge replication failure

We have a customer who, when trying to sync a client (subscriber) to the server (publisher,) receives the following error: 2012-11-30 21:03:33.334 Percent Complete: 18 2012-11-30 21:03:33.334 Data ...
2
votes
1answer
993 views

MySQL Slave Relay Logging but not logging Binary Log

I have a master slave setup both mysql 5.5, the setup is fine except that the slave won't Binary log to the standard mysql-binlog only to the relay logs. I fear this may be due to my lack of ...
3
votes
2answers
529 views

How to concatenate a column after x rows?

I have a table with columns object varchar(255), frequency tinyint(3) unsigned, I want to concatenate the objects if the sum of frequencies reach a value. Currently I am doing this in PHP as .. ...
0
votes
1answer
60 views

Grabbing data from a query with specific criteria, then the data around it

The title may be slightly vague... however, this is the basis of what I want to do: I have people in a database ranked on a statistic, for example, 'Kills'. I want to order the kills by highest to ...
0
votes
2answers
495 views

Slow query with straight_join for small result

I have a performance-problem with a query in my application and I don’t understand the behavior of mysql. The query consists of different joins, especially the join to the mentioncache-table. If the ...
3
votes
3answers
460 views

High insert rate on MySQL

I have a project at the moment that is close to be finished. I have been asked (at the very end) to log a specific event. The event will occur very often (easily a few times each 5sec). Each event ...
1
vote
1answer
134 views

Is there a major RDBMS that DOESN'T allow column name quoting/escaping?

The title basically says it: Are there any major DBs that don't handle column name quoting/escaping? For instance, suppose I want to have a column called FROM (and let's assume I have a really good ...
2
votes
2answers
1k views

SQL set allowed values for a column

I want to make an ALTER TABLE expression which adds a new column and sets a default value and additionaly defines the allowed values for that column. It's a text column, and allowed should be only ...
2
votes
1answer
9k views

Access denied when trying to run an agent job

Can someone please point me in the right direction. I keep getting the below error message when I try to run a job that executes a package I created and saved on the SQL Server. 12/03/2012 ...
3
votes
1answer
129 views

Backup and off-site restore setup

I've been reading a lot of threads about different backup options for MySQL and was hoping for some more insight so I can settle on one. Our current situation is ~100 GB of InnoDB and MySAM data in ...
2
votes
2answers
2k views

Could not continue scan with NOLOCK due to data movement SQL Server 2008 R2

I have SQL Server 2008 R2 installed on a Windows 7 laptop. I create a new database via SQL Management Studio and when I right click and select Properties, I get the following message. Cannot show ...
2
votes
2answers
2k views

Oracle 11g: “With Clause” very slow

I have written a query utilizing Oracle's with clause. I have identified one particular with clause in a larger query to be really, really slow. Here are three versions of the same query, they all ...
3
votes
2answers
2k views

How group with min(date) and select an another column in the same table

I have a query who return something like it : Name Gender Job date of hire John M mechanic 2012-05-08 John M electrician 2010-01-01 Vicky F scientific 2012-11-11 Bob ...

15 30 50 per page