2
votes
1answer
433 views

How to prevent high memory, CPU and time consumption by MySQL restore?

I have a local test machine with 2 GB RAM and a dual core processor. I imported a dump on that using mysql -uuser -psecret < script.sql script.sql is a 700 MB file which contains a single ...
5
votes
2answers
2k views

How could one monitor MySQL replication?

I am not a DBA, but I am interested in knowing how replication monitoring is done on MySQL severs. In order to know if a slave is in sync with its master, one would typically check ...
2
votes
1answer
158 views

Profiler: Only want to see Provider Errors

I'm replaying a trace in Profiler, and I'd like to only see the Provider Errors. Granted, there are ~30,000 of them but I'm not concerned at the moment about row update conflicts, foreign key or ...
3
votes
2answers
507 views

Remove nulls from TSQL connection string

I have a bunch of queries, against a couple different databases, that I use to generate delimited reports. I'm trying to create some new reports against a MSSQL database and I'm having trouble ...
2
votes
1answer
1k views

export data from oracle 10g

I installed Oracle 11g on my computer. When I export data from Oracle 10g, I get the following error code. I have translated the error in parenthesis. EXP-00008: 遇到 ORACLE 错误 904 (encouter oracle ...
2
votes
1answer
2k views

PostgreSQL dump/restore from 8.4 to 8.1 in a shell script

I have to restore a DB table every day from a postgresql 8.4 to 8.1. For the backup, I use this code (windows server): D:\PostgreSQL\8.4\bin\pg_dump -U postgres -p 5433 -t my_table myDB > ...
3
votes
1answer
1k views

Migrating Sql Cluster Installation To New Drive

We are migrating from an old SAN to a new SAN and need to migrate our Sql instance to new LUNs. We are able to migrate the data without any problem, but the Sql instance itself is clustered ...
2
votes
1answer
388 views

Table Statistics Affect Index Only Query?

We have a query that was getting poor performance. The root of the problem could be reproduced using a simple query accessing only one index to retrieve one column (the indexed column) from eight ...
13
votes
7answers
21k views

Get the rank of a user in a score table

I have a very simple MySQL table where I save highscores. It looks like that: Id Name Score So far so good. The question is: How do I get what's a users rank? For example, I have a users ...
-5
votes
1answer
559 views

Where will i download denali SSMS from? [closed]

I have read many blogs around praising new features in denali SSMS. I really wanna try but unable to find how to download only SSMS (denali).
25
votes
2answers
9k views

What is the difference between a connection and a session?

What is the difference between a connection and a session and how they are related?
3
votes
1answer
145 views

Table view created with triggers, someone please explain why?

I'm part of a project that inherited a piece of software that has a unique MS SQL database design that I'm trying to understand why they designed it the way they did. Basically for every table, for ...
5
votes
1answer
2k views

How do I resolve this data source connection issue with Cognos?

We have (fairly recently) installed IBM's Cognos 10 as our business intelligence reporting tool. Most of the databases that we report over are DB2 9.7 LUW Enterprise Edition. We installed the DB2 ...
0
votes
2answers
83 views

SQL Server Stored Procs not parameterized, leading to high compilations?

We're experiencing about 300 SQL Compilations per second, and we use very little dynamic SQL. However, I noticed that in SQL Profiler our calls look like: exec cid.dbo.uspCIDLog ...
2
votes
1answer
276 views

Execute Queries Against CMS within SSRS Reports?

Is it possible to execute queries against a Central Management Server (CMS) using SSRS? For example, I know of no way to tell a stored procedure that it is inherently supposed to call the CMS, so it ...
0
votes
1answer
6k views

Remove an instance of “SQL Server 2008 R2” after reinstalling “SQL Server 2008”

I have installed "SQL Server 2008 R2" with an instance name "SQLEXPRESS". Then I found out it cannot restore from my older "SQL server 2008" backup files . So I uninstalled SQL Server 2008 R2 and ...
7
votes
2answers
1k views

Database for building a realtime analytics system

I want to build a system similar to Google Analytics (only used for internal use, less traffic and less feature), and mainly focus on Real time counting of unique URI visit/PV by different ...
5
votes
1answer
2k views

Performance difference between SQL Server Linked Server and direct query

A Management Studio query pane connected directly to a remote sql server executes and displays a simple table query of (SELECT * FROM table) in just under 2 seconds. The same Management Studio but ...
6
votes
4answers
2k views

What is the best approach to parsing a large amount of strings?

I have a table with over 400,000,000 records and I am looking for advice on how to parse it quickly. TheNameTable ( NameID int primary key, TheName varchar(500) ) The names are stored like ...
1
vote
1answer
229 views

MySql cluster data node replication

What I'd like to do is to replicate data nodes within a cluster not only for backup/failover purposes but also for scale-out reasons. Is this possible? If not: why? If yes: how do I do it? Actually, ...
12
votes
3answers
2k views

Does a SQL Server bit column really use a whole byte worth of space?

I was poking around SSMS and noticed the "size" of my INT columns were 4 bytes (expected) but I was a bit shocked to see my BIT columns were a whole byte. Did I misunderstand what I was looking at?
1
vote
1answer
405 views

Design SQL Server 2008 new install … which collation?

A customer has a SQL Server 2005 instance, collation SQL_Latin1_General_CP1_CI_AS, with 8 databases ... for a new application, we have been asked to install a SQL Server 2008 with collation ...
2
votes
1answer
3k views

MariaDB XtraDB Performance Tuning

I believe that innodb has a single read thread. However, with MariaDB you can set multiple read threads. I'm unsure what the recommended value would be. Questions Does anyone have any experience ...
4
votes
1answer
1k views

How to index dynamic attributes in MongoDB

I have following kind of data (simplified a bit from my real case) in MongoDB: { "name":"some name", "attrs":[ {"n":"subject","v":"Some subject"}, {"n":"description","v":"Some ...
1
vote
2answers
673 views

Email notifications in SQL Server 2008

I have set up 2 profiles. I can send a test email ok to one profile. I have set up 2 operators. I have a simple job (select coount(*)) which when it completes should send an email notification to the ...
2
votes
1answer
261 views

Query tuning - SQL Server

One of our developers are trying to run the below query on a development server, which involves pulling data from a linked server, production. The query ran for more than 14 hours before it was ...
2
votes
1answer
104 views

don't want to be able creating stored procedures with incorrect

Right now I can execute a CREATE PROCEDURE or an ALTER PROCEDURE script with incorrect table and column references in the MS SQL Server Management Studio and using ADO.NET commands. The scripts run ...
5
votes
1answer
216 views

Does the transaction isolation level affect indices as well?

Here's one for the SQL Server gurus: if I set my SQL Server 2008 transaction isolation level to READ UNCOMMITTED, does that also affect the index pages? E.g. using ISOLATION LEVEL READ UNCOMMITTED, ...
-2
votes
1answer
932 views

Query database by date, month, year

How can I query order by date. Like this: And the same for week, month, year...?
3
votes
3answers
884 views

Does sp_spaceused data contain more than the sum of each table data?

I wanna monitor the size of each table in my database. After doing so, I was wondering why the sum of the data of each table does not correnspond to the data size of the whole database I get after ...
10
votes
3answers
6k views

Where can I find example databases for MySQL, SQL Server and Oracle?

I want to experiment with the 3 large database management systems. For this purpose it would be cool to have the same database (the same tables, etc.) for each of those. Where can I find sql scripts ...
1
vote
2answers
194 views

Update primary key

I want to update a primary key column, but the change should cascade to all other child tables where this primary key is used as foreign key. Example: table1 has column "slug" as primary key. One row ...
2
votes
1answer
2k views

Save Transaction: Is the name local to the stored procedure or not?

Some foot shooting just occured on a production server. I fixed the problem, but I'm now rather confused. There is a subset of stored procedures that preserve state on failure. That is, if the ...
6
votes
3answers
3k views

SQL Server Primary key / clustered index design decision

Looking for some advice regarding a table / index design decision I've got to make on some tables that I've got to port into SQL server from an existing 4GL based database. I've got a product history ...
2
votes
1answer
3k views

Error importing back a postgres db after dumping

I dumped my postgres db using pgAdmin in plain format because I wanted to search for some text on it. After doing the search, I decided to import the db back from the sql query window but I get this ...
0
votes
1answer
163 views

Connect to a Windows Authentication SQL server in SQL Server Authentication mode?

Is it possible to connect to a SQL server in SQL Server Authentication if the server has been installed with Windows Authentication?
5
votes
2answers
6k views

Taking mysql dump from another machine

I have MySql db on Machine A , I have Mysql credentials. And accessing this MySQL from machine B which I have crdential's. But I couldn't take mysqldump from Machine B. Please help me. Both ae Linux ...
2
votes
2answers
634 views

Tracking of deleted records who delete the transaction in SQL server 2008r2

how can we check who deleted the transaction even after few days in sql server 2008 r2 is there any command instead of logs
6
votes
2answers
5k views

Ibdata usage and Recommendations?

I have a Production server On November 5,2011 the ibdata size was 100G. In Approximate 3 months it is increased to 200G.So it has just doubled its size.So it is a Huge Data.Currently lvm is 251G. I ...
2
votes
2answers
1k views

Slony lib not found

Trying to run the example slony config script in the documentation but getting the following error: postgres$ /tmp/slonik_example.sh <stdin>:8: PGRES_FATAL_ERROR load '$libdir/slony1_funcs'; ...
4
votes
2answers
2k views

Fastest validation query in PostgreSQL

What is the fastest query in PostgreSQL, which I can use as a validationQuery binding a JNDI resource? I though that SELECT 1 is the simplest, but in this document it is said that in PostgreSQL we ...
5
votes
2answers
3k views

Why do I get leading zeros when converting from decimal to char in a db2 query?

I have a column named length defined as: TYPE_NAME: DECIMAL DATA_TYPE: 3 COLUMN_SIZE: 9 BUFFER_LENGTH: 11 DECIMAL_DIGITS: 5 NUM_PREC_RADIX: 10 When I run the following select: select ...
4
votes
2answers
153 views

Virtual Oracle server for education?

I am currently a College Student and am taking an introduction to Oracle 10G. I cannot seem to make it to class all of the time and am curious to ask if there is any Virtual Oracle Server or something ...
5
votes
1answer
3k views

On-Demand Fuzzy Lookup

We've got a customers table (Who doesn't?), containing many records that are, from a business perspective, duplicates. I've been able to create an SSIS package to perform fuzzy grouping, and report on ...
3
votes
4answers
7k views

Synchronizing data between MySQL and Oracle databases?

I want to sync data between Oracle & MySQL databases. What is the best possible way to achieve this? Are there any tools/software available? This is not a one-time but an ongoing operation. The ...
1
vote
1answer
148 views

Mysql database design with XML

I intend to create a wiki webpage, but it has some few more limitations than regular wikis. The content is completely user-editable, but the structure of the page is determined previously. To make ...
1
vote
2answers
895 views

Very slow performance from MySQL

I have the following procedure: drop procedure if exists deletebatches; create procedure deletebatches() BEGIN declare acount int default 0; declare done INT default 0; declare abatchno ...
2
votes
2answers
2k views

Limit WHERE to MAX() & COUNT()

This is my current mySQL query: SELECT e.*, MAX(m.datetime) AS unread_last, COUNT(m.id) AS unread FROM TAB_EVENT e LEFT JOIN TAB_MESSAGE m ON e.id=m.event_id WHERE ( m.`read` IS NULL OR ...
1
vote
1answer
205 views

Is it possible to schedule table update/refresh in Oracle Application Express?

I have SQL Server data dumped into a text or csv file available via HTTP. Is is possible to schedule Apex to create a table on that data and keep it updated? How?
1
vote
3answers
1k views

SQL Server : Execute as multiple users simultaneously?

I need to query a proprietary database where the software vendor has set tight permissions on each schema (one username per schema), and each schema-user is only allowed to read from their own schema. ...

15 30 50 per page