2
votes
1answer
441 views

Need to suppress rowcount headers when using \G

Is there a command to suppress the rowcount headers and asterisks when using '\G' to execute a SQL statement? I am executing mysql with the -s and --skip-column-name options, but these don't suppress ...
0
votes
0answers
53 views

Checking of one specific element of one array is in another array?

Suppose I have two arrays. One looking like (3, 9, 10, 39), and one looking like (4, 10, 9, 48, 391, 2). How would I (through pure MySQL) check if one of the elements in the first array is inside the ...
2
votes
1answer
196 views

MySQL monitor prompt does not return for slave

I'm trying to fix a replication error (or an ongoing failure to replicate) between our master and slave MySQL databases. The procedure I have asks me to use MySQL Monitor to stop the slave. stop ...
0
votes
4answers
1k views

How can I replicate some tables without transferring the entire log?

I have a mysql database that contains some tables with private information, and some tables with public information. I would like to replicate only the tables containing public information from one ...
22
votes
6answers
11k views

In what data type should I store an email address in database?

I understand that an 254 character email address is valid, but implementations I have researched tend to use a varchar(60) to varchar(80) or equivalent. For example: this SQL Server recommendation ...
1
vote
1answer
581 views

Create database on new partition

I use postgresql 9.1, on ubuntu 12.04. I had installed the depot package. I have added a new partition to my system, and I would like to create a postgresql database on this partition ( which will be ...
12
votes
3answers
24k views

Difference between database vs user vs schema

I'm really confused with the terms database, user and schema. Can anyone explain how they are different from each other (if they are)? If they are same then, what are the similarities between them? ...
0
votes
1answer
1k views

How do I check if a constraint exists on Firebird?

I'm about to publish a script which will update a lot of Firebird databases all at once. Some will not have this constraint, so I would like to check for the existence of a constraint before I try to ...
0
votes
1answer
171 views

READ_COMMITTED_SNAPSHOT support in SQL Server 2005 Express

I wonder if SSE 2005 supports the READ_COMMITTED_SNAPSHOT database option. What I found is this article: Features Supported by the Editions of SQL Server 2005. It states that SSE 2005 supports ...
-1
votes
1answer
197 views

How can I move 5 GB data from one database to another faster?

I'm using MySQL as database with Windows server. I'm having 5 GB of data in database. Now I need to change my server and the question is that how can I transfer complete 5 GB data to one mysql ...
0
votes
0answers
387 views

Create Log file for insert,update and delete records and retrive the log details

How to create/update log file for each modifications(insert,update,delete) in my database. i cant find any feasible methods to achieve so. can anybody know how to implement this.? if so then please ...
1
vote
2answers
280 views

Why would splitting up a query make it faster, and can I/should I fix this?

The following query is for a web-based game. It sets the isTiedForHighScore column to true for all solutions that tied the score for a given "map." UPDATE solutions INNER JOIN ( SELECT mapID, ...
0
votes
0answers
121 views

SQL Server in a state of confusion: Does the database exist or doesn't it? [duplicate]

Got a really weird, annoying problem.. Somehow the instance of SQL Server 2008 R2 running on our server has gotten somewhat corrupted. First, we noticed that the database we created yesterday was ...
6
votes
5answers
3k views

SQL Server in a state of confusion: does the database exist or doesn't it?

Got a really weird, annoying problem.. Somehow the instance of SQL Server 2008 R2 running on our server has gotten somewhat corrupted. First, we noticed that the database we created yesterday was ...
1
vote
1answer
582 views

Segmentation fault (core dumped) with self-complied mysql-5.1.9-beta.tar.gz

I am compiling mysql-5.1.9-beta.tar.gz source code under Ubuntu 12.04. My steps are following: tar -xzf mysql-5.1.9-beta.tar.gz cd /home/gaoyu/mysql-5.1.9-beta ./configure ...
0
votes
1answer
248 views

Retrieving all PK and FK

I have a big database that I need to extract all primary keys and foreign keys from each table. I have pgAdmin III. Is there a way to do this automatically and not go over each table manually?
0
votes
2answers
165 views

Is there any way to find out when particular view was compiled?

I have an Issue with a view, recently I made changes to the view and committed the code (in SVN). Code was moved to another repository and compiled, but my modifications are not reflected. I searched ...
2
votes
3answers
896 views

get account activity in postgresql

I have a old DB with bunch of accounts. One of them is used for sure but for 5 of them or so there is no information. Is there any info in the system table in Postgresql when was the last login or ...
1
vote
4answers
155 views

How to determine if a postgres database needs to be vaccumed?

Given a PostgreSQL database what command can be used to determine if the database needs to vacuumed? UPDATE I am working with client who is evaluating postgres but I am not a DBA, I just happen to ...
0
votes
2answers
1k views

MySQL data too long error

One of the column in my table was initially created as a varchar(1000). Now there is a need to increase the size of that column to hold around 5000 characters. I used the alter statement to increase ...
2
votes
1answer
480 views

Best practice around sys.dm_db_missing_index_group_stats in SQL Server

I have a fairly simple query using sys.dm_db_missing_index_group_stats that identifies missing indexes in my SQL Server database. This is pretty commonly used. My question is how do I identify which ...
5
votes
3answers
1k views

What type of SQL Server Replication fits our scenario? Merge or Transactional?

Background In our current setup, we have a single SQL Server 2005 instance on our remotely hosted web server. We additionally have another (non-MSSQL) database which we use for our POS system, which ...
6
votes
1answer
151 views

What is a good way to determine the performance I should expect from a PostgreSQL server?

Trying to figure out how I should expect my database to perform. Basically, I need to determine when the server I have set up is reaching its performance limits - which would help me plan server ...
1
vote
1answer
332 views

Postgresql: Difference between pg_dump and backup/restore?

Don't they essentially do the same thing by storing all the data in a file and dumping it into another database? Is it that pg_dump just adds the data on to whatever is already there and restore ...
2
votes
2answers
843 views

What does wait_resource LOG_MANAGER mean in SQL Server 2008?

Let's say we have two Stored Procedures A & B within the same database. Stored Procedure A: Executes for a long time Has transactions within Makes Calls over Linked Server Stored Procedure ...
6
votes
1answer
786 views

UNIQUE index key violation

I have a table with a PK and a unique non-clustered index, as follows: CREATE TABLE Table1 ( Id INT IDENTITY(1,1) NOT NULL, Field1 VARCHAR(25) NOT NULL, Field2 VARCHAR(25) NULL, ...
0
votes
2answers
2k views

how to set a row's value from a certain row's value?

I have a MySQL table named "activities" with fields id(int), tstamp(timestamp), amount(decimal) balance(decimal). Decimal fields hold money values. id tstamp amount balance ...
1
vote
1answer
106 views

big db for managing user files and settings

Hi im about to start a project that will hopefully eventually hit milion+ users which is some kind of a site managment, problem is how to set the db in mysql, some people suggest way 1 and others way ...
8
votes
6answers
3k views

Find “n” consecutive free numbers from table

I have some table with numbers like this (status is either FREE or ASSIGNED) id_set number status ----------------------- 1 000001 ASSIGNED 1 000002 FREE 1 000003 ...
6
votes
1answer
1k views

How do you move a SQL Server 7 database to SQL Server 2012?

I would like to move a database from SQL Server 7.0 to SQL Server 2012. They are not compatible for a backup and restore. Is there a way to export from SQL Server 7.0 and import it to 2012? I only ...
1
vote
0answers
364 views

SOLVED: Postgres 8.4.5: Bad query plan vs Good query plan when changing date range on large data table

SOLVED. I was able to resolve this issue by altering the time.date column to allow 1000 stats: ALTER TABLE time ALTER COLUMN date SET STATISTICS 1000; Now the queries are running very fast, down to ...
1
vote
2answers
601 views

How to generate TPC-DS query for sql-server from templates

I know that dsqgen is used to transform the query templates into executable SQL. But when I type in the command line: "dsqgen /directory query_templates /template query1.tpl /dialect sqlserver /scale ...
3
votes
0answers
122 views

Date dimension changes between Test and Production Server

I have a cube deployed into a Test environment and Production environment. I've noticed something strange happen with the date dimension. When deployed into our test environment, the Date Key comes ...
1
vote
2answers
304 views

Performance Counters for SQL Server Related to iSCSI Disk Access

I am planning to my SQL server databases (plus TLogs and TempDB) to a new LUN on our iSCSI SAN. The current LUN's used by these of these files are on their own two disk RAID 1 disk group and I'm ...
7
votes
2answers
411 views

Best relational database structure for this data

I'm in the process of creating a database scheme for the following scenario: There are users Users have roles (such as "Developer" or "CEO") Roles have applications (such as "Topdesk") Applications ...
0
votes
1answer
100 views

Accessing a SQL Server Denali CTP1 database with Management Studio 2012 SP1 Express

I had Management Studio 2011 Denali CTP1 installed before but I have uninstalled it. Now I have installed the Management Studio 2012 SP1 Express without any database instances. I have a webserver ...
2
votes
3answers
636 views

Database Design Relationship for Patient Visit in MS Access

I am designing a database to store records for research purposes, and I am having trouble picturing how I can create a relational database based on the information I have. There are a total of 6 ...
1
vote
1answer
336 views

SQL Server 2008 R2 database mirroring - is it possible to have a slave server for multiple master servers?

Scenario is that I have two servers running SQL Server 2008 R2 (64-bit), let's call them DB1 and DB2. I have set up database mirroring for all the databases on these servers so that DB1 is the ...
1
vote
1answer
246 views

Structuring data in MongoDB for a to-do list type application

This is a fairly high level question as I am in the initial stages of planning this application, and am also very new to MongoDB and document-based databases in general. Disclaimer aside, I am ...
0
votes
1answer
3k views

Import data from Oracle to SQL Server [duplicate]

I have an Oracle database in a remote server. I want to import data from it to SQL Server on a local machine using a stored procedure or job shedule but I don't know how can I do it.
1
vote
2answers
2k views

Issue with ROW_NUMBER and DISTINCT

I have following query SELECT Dept ,ID FROM (SELECT TOP (@RowTo) ROW_NUMBER() OVER (ORDER BY Dept) AS ROWID, Dept ,ID FROM Department ...
2
votes
1answer
327 views

I have multiple sources INSERTing into a MySQL innodb table. My periodic aggregation script never makes accurate aggregates. Why?

I apologize in advance if this is a repeat. I'm not really sure how to properly ask for what I'm running into. I have a large InnoDB table set up. I have 3 sources that all INSERT concurrently at a ...
5
votes
2answers
378 views

Defining constraints in `CREATE TABLE` statements

Recently I have been using a Database Abstraction Layer built by a Python web-framework called web2py (click for their DAL syntax). They include the option to include your constraints within the ...
-4
votes
1answer
308 views

where can I get mysql-5.1.7.tar.gz or mysql-5.1.9.tar.gz? [closed]

I need mysql-5.1.7.tar.gz or mysql-5.1.9.tar.gz, but I can not find them anywhere, who can give me a link to find them, thank you very much!!!
3
votes
0answers
452 views

SSIS Recordset Destination error

I have an SSIS package targeted at SQL Server 2012. I have it deployed into the Stored Packages in Integration Services and then have a SQL Server Agent job which executes it. The first part of the ...
0
votes
2answers
1k views

MySQL Slaves lag behind master

I have one master and four slaves. Sometimes all my slaves lag behind the master. I have implemented the heartbeat for monitoring replication lag. Now I am trying to find why the slaves are lagging ...
2
votes
1answer
875 views

Selecting minimum value using a subquery

I need to write a query to grab the lowest price from each merchant and output the price link (p_link) and some other information such as merchant name + rating. We have a table for prices ...
0
votes
1answer
425 views

MySQL replication between VPS and shared host

I have a VPS where I have ssh access and shared host with CPanel. Both have MySQL. I need to create a master/slave setup among the two server. As per this tutorial: How To Set Up Database Replication ...
1
vote
1answer
170 views

LOAD DATA INFILE on a MyISAM table blocks user read-queries, can we get around this?

I've got a large reference table, 100GB, in a MyISAM table, load it up from scratch goes well (4ish hours) using LOAD DATA INFILE. But we have 1GB each day we want to update in a batch process using ...
5
votes
1answer
313 views

Overview of how MongoDB uses its various threads

On one instance I have MongoDB using ~85 threads. In lieu of having time to investigate directly, I am curious: What are the threads used for? Do they fall into a few high-level usage categories? ...

15 30 50 per page