1
vote
2answers
520 views

New login is created but 'sa' cant assign grant/deny permissions to user in SQL Server 2008 R2?

I created users with login option in security tab in SQL Server 2008 R2 running on windows 7 successfully and grant permissions to : Use dummydb Grant REFERENCES ON OBJECT::vuUser TO nvp GO Use ...
2
votes
4answers
650 views

Backup and restore “mysql” database

I use the following command to backup some normal databases: mysqldump --host=host --user=user --password=passwd --result-file=result.sql -R --single-transaction database_name My question is : do I ...
0
votes
1answer
183 views

Where is my old partition in mysql show create table?

I am keep adding daily base partition for a table as e.g. ALTER TABLE tblData PARTITION BY RANGE (to_days(`dataInsertDateTime`)) ( PARTITION p20 VALUES LESS THAN (to_days('2012-12-25')), PARTITION ...
1
vote
0answers
309 views

jTDS + stored procedures + prepareSQL = nesting level error?

Situation A (Tomcat) Java web application using jTDS to connect to a MSSQL 2008 database. This Java application for 99% executes MSSQL stored procedures using user input. Problem The jTDS driver ...
1
vote
0answers
415 views

Cannot remove .bak file

I have a java application that: Reads a .bak file from a windows fileshare and restores it in SQL Server on a remote windows server Does various modifications on the database restored from the .bak ...
5
votes
1answer
442 views

LOCK error after creating a clustered index

I just created a clustered index on a 1MM row table (page and row locking turned on). I now try to run queries and I get this error: "The instance of the SQL Server Database Engine cannot obtain a ...
1
vote
0answers
324 views

What's complexity of select * from table order by id desc limit a, b?

I'm displaying about 1,000,000 records separated by 10 records per page. select * from table order by id DESC limit a, b; In this query id is indexed, and b is 10. The querying time is fast when ...
2
votes
3answers
742 views

MySQL, wait_timeout, Mac OS X Mountain Lion - how do i set it?

I need to change the wait_timeout for my MySQL database, but when I set this parameter in the my.cnf class (either in /etc or in /private/etc, because one of them is a link to the other), I still get ...
2
votes
1answer
5k views

Multiple “GROUP_CONCAT”s with WHERE clause

In a table as id name type info 1 BMW car yes 2 Reno car no 3 IBM electronics no 4 Sony electronics yes 5 Mazda ...
1
vote
2answers
325 views

mysql_select_db() very slow on a busy server

I have a MySQL Server with about 30 Databases and 1500 Tables. Overall size of the data is 2 GB. The Server has 16 GB RAM and an AMD FX-6100 CPU. Most tables are myisam. On average the server answers ...
0
votes
2answers
4k views

MySQL incredibly slow on WAMP and XAMPP

I've installed WAMP on my new Windows 8 machine and for some reason when I use PHPMyAdmin to import an sql file (it's only about 5mb), it takes several minutes before timing out. And then when I check ...
0
votes
0answers
320 views

Getting UserInfo data out of Sharepoint via OPENROWSET

The query below returns most of the data from the SharePoint list that my customers want: SELECT * FROM OPENROWSET ('Microsoft.ACE.OLEDB.12.0', ...
8
votes
3answers
707 views

I'm using the SQL Server Agent to schedule even non-database tasks - is this a bad idea?

Since I'm a DBA (and in many cases, the de-facto sysadmin), SQL Server is installed on pretty much every server I have to work with regularly. I realized recently that I've been using the SQL Agent as ...
2
votes
2answers
176 views

What's the best practice for representing set operations in a relational database?

I have a simple database representing collections of entities and sets of those collections. Sets contain multiple collections and collections contain multiple entities. Currently, when I query all ...
2
votes
1answer
2k views

How soon after updating expire_logs_days param and restarting sql will old binlogs get deleted?

MySQL 5.1.x | InnoDB | Windows My mysql data directory is starting to fill up with bin logs. I currently have the following settings configured in my windows mysql server: [mysqld] log-bin ...
5
votes
1answer
361 views

Inline table-valued function vs inline sql

I'm seeing some odd behavior in trying to tune an inline table-valued function. Specifically, if I take the guts of the function and it with the same parameters as I'd have called the function with, I ...
5
votes
1answer
145 views

Practical application of EXISTS vs. LEFT JOIN to find addresses for delivery

Our end users have many ways of shipping product to our customers. They can use the customer address in one table ([customer]), a specific delivery address in another ([dropship]), or yet another ...
2
votes
1answer
2k views

Is there a progress indicator for OPTIMIZE TABLE progress?

MySQL 5.1.4x (Windows) | Innodb I recently purged data from a mySQL DB (a few hundred thousand rows) and I'm planning to use OPTIMIZE TABLE LOGTABLEFOO1,LOGTABLEFOO2,LOGTABLEFOO3; to reduce the ...
0
votes
3answers
723 views

Postgresql 9.2 won't start after rerunning installer

All, I made a fatal mistake and accidentally ran the core installer for postgresql rather than the stackinstaller. I didn't go all the way through the install process but it still set something that ...
2
votes
1answer
292 views

SQL Server table appears locked for no reason

My database was running just fine this morning, up until it wasn't. This query: SELECT TOP (1) * FROM tblTask; comes back in no time at all, while this query: SELECT * FROM tblTask this_ with ...
0
votes
1answer
252 views

Why doesn't more memory necessarily make Postgres more performant?

The Postgres resource consumption docs state, under the shared_buffers: ...it is unlikely that an allocation of more than 40% of RAM to shared_buffers will work better than a smaller amount. Why ...
3
votes
1answer
650 views

Normalized Table Structure for Logging

How can I normalize a table that has four columns for logging the latest activity for a single record: Created On Created By Modified On Modified By We have dozens of tables, all with these 4 ...
1
vote
3answers
2k views

Computer restarted and Postgres 9.2 service cannot be started?

My firewall is down and when I tried to start the Postgres service it gave me an error that said: the service started and then stopped. Some services stop automatically if they are not in use by other ...
1
vote
1answer
696 views

How do I use the unload command to export a table to a IXF file

For a table T in schema S, how do I use the unload command to export T data into a IXF file? The IBM DB2 documentation isn't very helpful for this simple case. I am trying to compare performance ...
1
vote
1answer
235 views

Set up replication and migrate to InnoDB with low downtime

Current situation is this: I have a large legacy DB using only MyISAM tables, the size of whole DB is 4GiB, one of the tables contains over 10 million rows, so it is pretty large. The database is ...
1
vote
0answers
146 views

Distribution Agent running but subscription does not exist?

I have an issue where in my replication topology, the distribution agent is running, and says there are no commands to distribute. However, checking the undistributed commands, it shows there are a ...
1
vote
3answers
376 views

MySQL replication - some values are not being replicated

MySQL Replication issues I might sound clue less here as i am :) , I am having problem with mysql replication, i.e. replication seems to be missing in some random occasion. My structure looks like: ...
1
vote
1answer
96 views

Monitor Sql Server 2000

I was wondering if there is a free tool to monitor state of SQL Server 2000. I would prefer a web tool. I would like to see if some database is accessible, or are there any problems on server, etc. ...
0
votes
2answers
583 views

How to mix pairs of rows without JOIN (in a temporary table)?

I have a TEMPORARY table containing pairs of key/value as id col1 col2 type pair 1 key1 key2 key 1 2 value1 value2 value 1 3 key3 ...
16
votes
5answers
2k views

Best cloud platform for PostgreSQL [closed]

Currently, in our project, we use dedicated servers for our PostgreSQL database. In theory, we can run anything on some cloud platforms. However, PostgreSQL configuration is strictly related to ...
0
votes
1answer
65 views

Oracle database migration or copy

I need to do migrate or copy the oracle 10g database from sun solaris to another sun solaris server (oracle 11g). I was tried with SQL Developer tool. But It is not able copy all the objects in the ...
0
votes
1answer
45 views

How to save mongodb data sub data more properly in this case?

I have a business collection. The businesses are reviewed by users. Each user can only review a business once. Future reviews will simply replace the former one. This is how we store it: ...
2
votes
1answer
386 views

SQLite or CouchDB for Locational Data Mining Project?

I am currently designing a Data Mining Project where I am going to harvest rather large volumes of Twitter data in order to analyse locational data (geocoded tweets) and do some machine learning with ...
3
votes
2answers
638 views

Cannot generate reports from SQL Management Data Warehouse

I'm running SQL Server 2008 R2 and have installed the MDW on one server and have a Data Collector collecting and uploading the server activity, query results, and Disk activity data to the MDW. When I ...
1
vote
2answers
327 views

Size of TempDB Microsoft SQL Server 2005

Are there drawbacks to having a large tempdb in a SQL Server database? Assuming the disk is not full. I am creating large temporary tables in a couple of queries. Once I am finished running queries, ...
2
votes
2answers
466 views

How well, if at all, does Oracle NoSQL database integrate with Oracle RDBMS?

I currently have an application which runs on Oracle RDBMS and an area of new functionality which would be better supported by a NoSQL store. I am wondering if Oracle NoSQL Database may be a good ...
16
votes
2answers
2k views

Optimising plans with XML readers

Executing the query from here to pull the deadlock events out of the default extended events session SELECT CAST ( REPLACE ( REPLACE ( XEventData.XEvent.value ...
1
vote
2answers
6k views

Connect to Postgresql 9.2 from Eclipse Data Tools Platform

GOAL: My goal is to write sql code within Eclipse to query a Postgresql database. The reason I want to write my queries within Eclipse is to then write R or Python code to perform statistical analysis ...
3
votes
1answer
6k views

MySQL stored procedure: loop through table, delete rows. Logic problem: won't exit loop because of LIMIT option in query

I've created a procedure to loop through large InnoDB tables and delete a chunk of rows, then pause and repeat until max field value allowed is reached. Binary logging is enabled, but I'm leaving it ...
1
vote
1answer
262 views

MySQL Stalls and stops all queries

We occassionally have our servers stall and back up queres for 3-5 minutes. then back to normal but locks up all users. We made a new server with binlogs and log fiels on seperate disk from data. ...
1
vote
3answers
415 views

moving a 13 gb table to amazon rds

I am moving our current database server from a regular EC2 instance running mysql to a RDS instance. I moved all the databases using the amazon-suggested method, simply piping the mysqldump output to ...
9
votes
1answer
554 views

query optimization: time intervals

In the main, I've got two kinds of time intervals: presence time and absence time absence time can be of different types (eg breaks, absences, special day and so on) and time intervals may overlap ...
0
votes
1answer
406 views

Optimising MySQL query with lots of self-joins

I have an entity_relationship table that describes relationships between entities. Each relationship will have 2+ entities involved. In some cases it can be said that one entity is a constituent of a ...
5
votes
3answers
343 views

Reducing the size of a database

SQL Server newbie here. I'm a MySQL guy. I'm having a look at something for a client in their 2008 SQL Server, and need some advice. Whoever designed the database chose to log insane amounts of stuff ...
0
votes
2answers
536 views

how to select * from XML where id=1?

declare @xml xml, declare @num int set @num = 1 set @xml = ' <row> <Id>1</Id> <name>reza</name> </row> <row> <Id>2</Id> ...
2
votes
1answer
193 views

Generating an arithmetic sequence

I would like to generate a named table in a WITH clause which will contain this arithmetic progression: ╔══════════╗ ║ mynumber ║ ╠══════════╣ ║ 0 ║ ║ 30 ║ ║ 60 ║ ║ 90 ║ ║ ...
0
votes
1answer
476 views

MySQL Workbench table organisation

Well, I'm interested is there a way to (someway)automatically organize database tables when you make EER Model from existing database. In my schema I have 30(and something) tables and 50(and ...
2
votes
2answers
151 views

Query taking too much time

My query is taking too much time to execute. Please help me here. mysql> explain select pcm.catalog_id from cat_produ_catal_map_defer pcm, cat_catal_catal_map_defer ccm, cat_catal_defer c ...
2
votes
3answers
635 views

Backup a sample of a PostgreSQL database

Is it possible to back up a PostgreSQL database with only a fraction of the data (1000 Rows from each table)? I am able to back up that database using pg_dump. In some case I need db with minimum ...
2
votes
0answers
105 views

Riak Key spaces and Indexes

I wanted to know how riak handles two queries when the data set starts getting really large. Since riak buckets are just key space, everything seems like it lives in one massive index well bucket. I ...

15 30 50 per page