0
votes
1answer
85 views

assistance with mongodb setup on windows server

I am currently setting up Mongo DB on a dedicated web server. I am not experienced with Mongo so I have some questions around its setup. I have done research in to Mongo etc but would like some ...
5
votes
2answers
1k views

T-SQL Purpose of MAX in this Group By Query

I have run into some pre-existing SQL that I'm having a hard time uderstanding. SELECT MAX(I.Symbol) Symbol , MAX(I.Ticker) CUSIP , MAX(I.Name) Name , SUM(H.Quantity) TotalQuantity , ...
1
vote
1answer
1k views

How to determine SQL server version install history? I.E. When it was updated last

I have various SQL server installs across several machines, and a different IT staff will sometimes randomly update each machine with different service packs and cause version issues. Is there a way ...
0
votes
1answer
74 views

Facebook generates a Post record when I rename a group's name or just an ActivityItem?

My question is more about relational database scheme. I have in mind two tables for it: Posts Activities Where when I post a a status message it probably creates a record for a Post and an Activity ...
2
votes
0answers
15 views

Real-Time SSAS cube status notification [duplicate]

Possible Duplicate: Real Time SQL Server Analysis Services Cube Processing Report I would like to know if there is a way to generate a report to determine which SQL Server Analysis Services ...
2
votes
1answer
720 views

MySQL Dump/Import progress on Windows

I'm going to dump a considerable big datatabase (7gb) from a MySQL 5.1 instance running on Windows into a .sql script and import it into a MySQL 5.5 instance, also on Windows (another machine). I'd ...
4
votes
1answer
813 views

Is it possible to use the same directory for 2 MySQL servers?

I have 2 OS-es on my machine: Windows XP and Linux Slackware. Both of them have mysql installed: Windows - 5.5.25 Linux - 5.5.27 Is it possible to use the data directory from Windows on Linux? So ...
2
votes
1answer
2k views

SQL Server recommended MAXDOP settings for NUMA

I have an OLTP SQL Database running on SQL 2008 R2 Enterprise Edition that may be fairly busy (5000 batches/sec) in next couple of months after going live production. Looking into server configuration ...
2
votes
2answers
2k views

Oneway sync of two SQL Servers via FTP

I need to replicate data from a ‘master’ SQL Server out to a number of replicas. Luckily the data only flows from the ‘master’ to the replicas. I need to replicate both schema and data. Data size ...
3
votes
2answers
1k views

Database space doesn't match ibdata1 size

I'm using InnoDB database with a single file configuration (in /var), so no innodb_file_per_table. In the MySql workbench, when I query for the databases used space, with this query SELECT ...
2
votes
4answers
2k views

Update many-to-many relationship table

I have three tables: task, taskmembers, members. Each task may have up to five people associated to it. Currently, when someone updates a task I delete all the current members and insert them as a ...
1
vote
1answer
361 views

mysqldump, preserve update_time and modify_time attributes as listed by show table status from

Does mysqldump preserve the create_time and update_time attributes that are output by show table status from? If not, is there an option that does this? From the manual it looks like mysqldump ...
2
votes
1answer
3k views

Remove sql server service from windows 7

I had installed and later uninstalled SQL Server 2005 . I used registry cleaner tools and deleted all files related to SQL Server . Still the services console shows entry for previous installed ...
1
vote
1answer
595 views

import data from csv to mysql - good database structure

I have a collection of csv files with measurements with the following 54 columns: SITE (string) TIME (integer as yyyymmddhh) PROD (double) EST.0 (double) ... EST.50 (double) I want to read this to ...
7
votes
1answer
4k views

What are the practical limitations on a column family in Cassandra?

In Cassandra, it's not recommended to have more than a few thousand column families, let's say 2,000 for the sake of argument. In cases where more than 2,000 types of data need to be persisted, one ...
0
votes
1answer
3k views

MySQL: Can't find record in tablename

After crash: mysql> repair table lot_not_sold; +------------------------+--------+----------+---------------------------------------------------------------+ | Table | Op | ...
2
votes
1answer
706 views

How to know when to scale RDS MySQL instance? How to scale it?

I'm running 1 single medium RDS instance for my websites. How do I determine when I will need to scale it up? Is there a way to scale it horizontally or I can only upgrade it to a bigger instance?
1
vote
2answers
553 views

Is a Secondary Index in MySQL the Same Thing As a Non-Clustered Index in SQL Server?

I am assuming that a secondary index in MySQL is the same thing as a non-clustered index in SQL Server. Is this true?
2
votes
1answer
450 views

Group activities in activity feed by users and products

On my website I'm building an activity feed where I got the basics done and are now making some improvements here and there. One of them is the grouping. I've built it so that if multiple users buys ...
9
votes
2answers
3k views

How do I know what indexes to create for a table

Is there a way I can figure out the best way to know which indexes to create for a table?
5
votes
3answers
807 views

Is a surrogate key better than a natural key in this case

I copied this code from here: CREATE TABLE records( email TEXT REFERENCES users(email), lat DECIMAL, lon DECIMAL, depth TEXT, upload_date TIMESTAMP, comment TEXT, PRIMARY ...
0
votes
1answer
967 views

“connectivity libraries needed are not found” error in IBM Data Studio

UPDATE I am getting the following error when I try to create a new database in IBM Data Studio v3.1.1.0. The connectivity libraries that are needed for local or remote non-JDBC operations were not ...
-1
votes
1answer
195 views

How to get Sum and put condition in SQL Server database?

I have two tables, Timesheet and Overtime Timesheet : Card_No Name 1 2 3 4 5 TotalA 123 GGG A H P F P 1 123 GGG A H A F P 2 123 GGG A P P F P 1 123 GGG A ...
0
votes
2answers
782 views

How can I simplify this query?

I have written the following SQLite query: SELECT sum(amount) / (julianday('now', '+1 day') - julianday('2012-08-11')) * 14 AS 'Cost Per Fortnight' FROM ( SELECT "transaction".transamount AS ...
4
votes
1answer
109 views

Select columns from 4 tables

First thing, I am totally new to SQL. I saw some tutorials, videos, tried searching but didn't find what I needed. I know it has asked before, but I couldn't find it. What I need to find is basically ...
4
votes
2answers
2k views

Limit memory used for mongoDb

Is there any way to limit using RAM for mongodb on Debian? I'm looking for a solution fo about 8 hours, but have no results.
2
votes
1answer
359 views

How to scale MySQL transaction wrapped queries?

So I'm working on an app that wraps many of it's SQL queries in a transaction for it's SQL usage and I'm trying to think of some ways to scale the DB layer up.... Up until now we've been throwing ...
1
vote
1answer
1k views

Slow MySQL query with float using BETWEEN and ORDER BY

Trying to figure out whether it's the BETWEEN being used on a float or the ORDER BY and the lack of an index that is making this query slow. First the tables used in the BETWEEN and ORDER BY: ...
0
votes
1answer
56 views

Basic Question on input to PostgreSQL

I have installed PostgreSQL on a Windows XP laptop so I can learn about using PostgreSQL. My problem is that the PostgreSQL tutorial starts of with the instruction To create a new database, in this ...
6
votes
4answers
6k views

SQL Server script to delete accounts no longer in Active Directory

We have a SQL Server 2000 that will shortly be migrated to SQL Server 2005. It has years of Windows Authentication accounts created that no longer exist in Active Directory, which prevent the Copy ...
0
votes
1answer
1k views

How Count Row Value in SQL Server database?

I have a table called TimeSheet : Card_No Name 1 2 3 4 123 GGG A P P P 123 GGG A P A P 123 GGG A P P P 123 GGG A A ...
1
vote
1answer
9k views

How to check for null in column? and use other column instead?

How would I write a query that involves the following check: if colA is null then colB = colB1 + colB2 if colA is not null then colB = colA
2
votes
2answers
554 views

Schema design for privacy settings in MongoDB

I have a set of documents that can have various privacy settings around them: They can be completed public (any registered user) can view them They can be viewable only by people following you (this ...
5
votes
4answers
9k views

Moving rows from one table to another

I am moving records from one database to another, as a part of archiving process. I want to copy the rows to destination table and then delete the same rows from the source table. My question is, ...
3
votes
3answers
3k views

Is it a good practice to apply Vertical Partition to a newly created model?

Suppose you are modeling the ER model for a new Object Oriented Web Application. There is a table with 20 columns, and there are going to be a lot of INSERTs populating 10 columns, and a lot of ...
4
votes
4answers
8k views

Restore SQL Server database using Windows Powershell 3.0

I'm trying to restore a SQL Server database with a PowerShell script, but I'm having problems. Here is the error I'm getting: Exception calling "SqlRestore" with "1" argument(s): "Restore failed ...
4
votes
2answers
1k views

Right Trimming Binary Data in SQL Server

Scenario: I am inserting a string into a binary field (CONTEXT_INFO) and then later attempting to pull it out and convert it back to a string. When I do, the resulting string has a length of 128 ...
2
votes
1answer
177 views

Can I normalize my experimental data table further?

I am attempting to get a MySQL database to 3NF, but I'm unsure as to how to get there. I'm new to database design, so please correct me if my understanding is incorrect. I have 6 columns: ...
3
votes
1answer
2k views

How can I find out the last time a MySQL table was analyzed?

I'm interested in this for InnoDB mostly, but also for MyISAM. I looked around in information_schema and did not see this data anywhere. I'm using MySQL 5.5.16.
2
votes
1answer
2k views

How can I set a default session sql_mode for a given user?

I want to have a default session sql_mode that is different from the global sql_mode. I can set it manually, but I'd like to do it automatically. I thought I could add it to .my.cnf, but that ...
0
votes
1answer
114 views

mysqlbackup mysql enterprise utility issue

I recent took a backup using mysqlbackup. While restoring it, I noticed that the files that were copied into datadir are with root:root (user:group) instead of mysql:mysql. Is anything wrong with ...
0
votes
2answers
193 views

SQL Server 2008 - How did I solve the need to check the column definitions quickly?

Another tool I developed for myself, with regards to making the creation of various DML operations easier in a large database of hundreds of tables, is a nifty user defined function to easily show ...
0
votes
1answer
810 views

SQL Server 2008 - How would I create a dynamic query for finding relationships and references to the primary key?

Since I'm new and I've never shared, and yet there are a few useful scripts that I need on a daily basis, I thought I should. As a new DBA, some data fix DML operations and simple business logical ...
4
votes
2answers
220 views

MySQL - Creating a user and specifying a password

How do I create a user and specify a password in one line: I thought CREATE USER 'foo'@'2.2.2.2' IDENTIFIED BY 'bar'; would do it but apparently it doesn't. Any thoughts? I'm on version 5.1.49 of ...
5
votes
2answers
719 views

BCP stops after the last “1000 rows sent to SQL Server. Total sent: …”

I ran SQL Server 2005's bulk copy program BCP like this: bcp mydb.dbo.mytbl in myfile.blk -c -S mysvr -U mylogin -P mypass And it ran and produced output like so: Starting copy... 1000 rows sent ...
2
votes
1answer
3k views

SQL Server - how transactions and transaction log work (simplified)

I have a theory on how transactions work, but I would like if someone could verify it or correct some points if possible. Let's consider we have a database with full recovery model. Now, everything ...
1
vote
1answer
179 views

SQL Server 2005 Blocking Issue

I am experiencing a blocking issue in sql server 2005. An end user executes a query (e.g. select statements) and seems to get into a never-ending blocking until i kill the process e.g. for hours on ...
1
vote
2answers
1k views

How to create unique index for month and year column?

Does anyone have any idea how do i create unique index for both month and year column? As in: JAN 2012 should be an unique index and also to aid in searching and retreiving of results by month and ...
1
vote
3answers
76 views

Contains statement Query

I need to check the string with the column if the column contains that string or not. example:String 'how to make pizza' and the column if has 'pizza' i need to fetch that.. like SELECT * FROM ...
2
votes
3answers
16k views

which mysql version to use - 5.1 or 5.5?

I am designing a new database. There are going to be around 1000 write queries per second. There may be as much as 10000 read per second. Which MySQL version is recommended? I came across a post on ...

15 30 50 per page