3
votes
2answers
2k views

pt-table-checksum with slaves using non-standard ports

Trying to run pt-table-checksum to detect slave drift in MySQL replication. My slaves are not using the standard TCP listening port however, and so when I run the tool I get an error: Cannot connect ...
1
vote
1answer
65 views

Reading and writing the common data

I have a couple tables and application service that intensively inserts, updates its. From the other hand some client application have to read data using those tables. Sometimes client application ...
9
votes
2answers
612 views

How many Sproc Parameters is too many?

I've just started writing a Stored Procedure in SQL Server 2008 and have 30+ parameters. I've never written one with more than ~10 parameters, and that got me thinking... At what point are there too ...
2
votes
3answers
882 views

do oracle redo logs need to be copied when all other data is copied to a new disks?

I have to migrate all data for an Oracle server from the present SAN to a new SAN. It is an 11g database in production on a Linux server. Database software is on local disk but all data (including ...
3
votes
3answers
5k views

How do i set up an Alert that tells me when a replication of data failed?

I've got Database Mail setup and tested fine. Alerts do work when I stop and start the replication agent job, but I cannot get it to throw any alerts when data moves from a publisher db to a ...
16
votes
3answers
4k views

Painless way to create a clustered index on a huge table?

So we have a customer site that is complaining about some seriously slow performance. I took one look and it's obvious that the problem is because Somebody Else (grrrr) designed a table holding some ...
1
vote
2answers
2k views

Installing SQL Server Express instance so common users can access

I need to install a SQL Server Express instance (as an admin) which can be later on read and modified by regular users. I run into http://msdn.microsoft.com/en-us/library/ms254504.aspx, and I'm ...
6
votes
2answers
2k views

When is a result returned deterministic and when not?

if you execute a statement like this: select first field1, field2 from exampleTable where field1 = '1'; then you get a warning like this: The result returned is non deterministic SQLCode=122 ...
0
votes
1answer
401 views

enable agent XPs

I am trying to run the following script on SQL 2000: sp_configure 'show advanced options', 1; GO RECONFIGURE; GO sp_configure 'ave enabled' 1; GO RECONFIGURE; GO sp_configure 'Agent XPs', 1; GO ...
0
votes
3answers
532 views

Is any tool for taking MySQL Dump Automatically with a particular time?

I am using VS2010 and MySQL for my project. My Client want to take MySQL Dump Every Day like Daily Backup. So I want to give a tool for Taking MySQL Dump with a particular time. Do you know any tool ...
0
votes
2answers
2k views

Time to import an sql dump

I'm currently uploading one of Wikipedia's dump files. It has 1GB compressed and ~7GB uncompressed. It has been importing it for 6 hours already. The size of the imported table in MySQL is at the ...
3
votes
2answers
225 views

Database size increases after creating a partition

I have just partitioned an existing table. The database size was 5GB with 14 million records prior to the partition operation. After the partition operation moved rows to the new FileGroup, I ...
5
votes
1answer
849 views

Quick MySQL Backup (1 file per table)

I asked a relevant question few months back and got answer with wide variety of options for backup. But this time I have different scenario and I have got a database with 7 tables and 1 of them has ...
0
votes
2answers
199 views

Inputs on handling large volumes of data for specific tables in SQL Server standard

I have large OLTP ERP database with 10 million records in few tables. The database size is as large as 10GB. I have few critical transaction tables like this: 1. Payments 2. Cheques etc., and each of ...
1
vote
1answer
1k views

SQL Server 2008 R2 Most Efficient Full Text Search Field Type

In SQL Server 2008 R2, what is the most efficient column type to store data enabling full text search? I can currently see two options, nvarchar and varbinary. Which one performs better and why? ...
3
votes
2answers
8k views

Questionnaire database design - which way is better?

I have ONE long html page, several sets of questions divided into small sections (approx. 15 sub-sections in one page), the total of questions are about 100 questions: varies from input, multiple ...
1
vote
1answer
502 views

Optimization: Delete with Top and minimize the where clause date range

I have a delete statement that get run repetitive until all the data are removed. Delete TOP (1000) From Log Where CreationDate < '2011-Dec-31' AND pKey NOT IN (...) I am considering of ...
6
votes
3answers
5k views

What is the best and easiest way to turn off SQL Server when not in use?

Situation: developer workstations that typically just use the client tools to connect to other non-local sql servers. However, there are rare times that having the full version of sql server to do ...
4
votes
2answers
614 views

how to get unique records

Table structure CREATE TABLE [dbo].[Order Details2]( [OrderID] [int] NOT NULL, [ProductID] [int] NOT NULL, [UnitPrice] [money] NOT NULL DEFAULT (0), [Quantity] [smallint] NOT NULL ...
2
votes
1answer
2k views

CREATE DATABASE Permission denied in database 'master' error

I'm working with a tool that as one of the automated steps will attach databases from my file system to my local SQL Express 2008 instance. The tool requires a login in the sysadmin server role, for ...
1
vote
2answers
2k views

How to keep one query from slowing down entire database?

Using MySQL 5.0.x, we have a process to generate benchmarks for our business that consolidates a bunch of data, then pull out data based on certain criteria. This process used to take 18 hours, it's ...
5
votes
3answers
3k views

How much memory will a MEMORY table take up?

Let's say I have a MyISAM table with a data length of 4.8GB and an index length of 6.2GB. So, a total data size of eleven gig. How much memory would this require, were I to convert it to a MEMORY ...
2
votes
3answers
1k views

SQL Analysis Services - SSAS

Do you know what the best practices would be regarding SSAS and having real-time reports. I am not sure if we should be pulling data off our live database or using SSIS to move data periodically to a ...
4
votes
2answers
7k views

In a trigger, how to check if no fields have changed?

If we receive an update statement that does not check if the value has changed in the where clause, what are the different ways to ignore that update inside a trigger? I know we can do a comparison ...
0
votes
1answer
151 views

Columns are added in wrong order

I have a encountered strange behaviour adding columns to an existing table. I run those scripts using osql several instances. Let Table a_table have initially three columns A_col, B_col and C_col. ...
0
votes
3answers
1k views

Oracle returns different results when executing a sql with bind variable or with a fix value

The following two statements (strongly simplyfied) returning a different result: with a fix value for rownmun: select * from table where rownum <= 12; with bind variable for rownum: select * ...
20
votes
2answers
16k views

Force drop db while others may be connected

I need to remove a database from a PostgreSQL DB cluster. How can I do it even if there are active connections? I need sort of a -force flag, that will drop all connections and then the DB. How can I ...
4
votes
1answer
2k views

Not enough space for MySQL optimize; do new rows overwrite existing data?

My MyISAM table consumed most of my disk space. I deleted a significant portion of the table, but the optimize command (to clean out the deleted data) does not have sufficient space. Is there any ...
1
vote
1answer
2k views

Heterogeneous queries error using stored procedure

Stored procedure ALTER PROCEDURE Proc_DayShift AS insert into #Punching_History SELECT * FROM SERVER2.MARS.DBO.TABLE1 GO SET QUOTED_IDENTIFIER OFF GO SET ANSI_NULLS OFF GO SET ANSI_WARNINGS OFF ...
0
votes
3answers
11k views

How to add linked server SQL Server 2008 R2

I have two SQL Server 2008 located in different cities. I have physical access to one of them and I can exec SQL Server Management Studio there. For second server I have following parameters: ...
1
vote
1answer
267 views

mysql event running at wrong time

I created an event to run every 24 hours and be run at 14h. Its selects some data from tabels and writes it as to a file (csv format) The query and writing to file goes ok. The event is triggered. ...
1
vote
1answer
571 views

how to transfer data from table to table

I have two tables Table1, Table2. From Table1 want to transfer data to Table2. Suppose I have the following query: Select * from Table1 where UserID between 5 and 10 I want to store above ...
2
votes
1answer
295 views

Rman not replacing logs with same name on networked drive

Historically, rman saved logs by replacing files of the same name so that the most recent set was always there, and logs from backup of older than the most recent set simply went away. Rman is ...
2
votes
1answer
4k views

RMAN & Archivelog Deletion Policy confusion

Never been able to fully grasp the notion of delete input/delete input all when backup up Archivelog with rman. Tied to the same issue is the configure Archivelog deletion policy to backed up X times ...
3
votes
1answer
653 views

mysql change schema on the fly

Recently I faced the problem that my Db became very huge and I cannot allow to myself downtime every time when I want to change the schema. This caused me to start looking for solution that do schema ...
9
votes
2answers
7k views

move data folder and drive mysql centos

i need to move the data to a different folder and drive on my cent os db server. i added new hard drive (since we ran low on space), i have a 1tb of hard drive and i have a new 2tb i want to put the ...
3
votes
2answers
2k views

How does name resolution work in Oracle 10g?

In Oracle 10g (10.2.0), there are 4 types of names resolution: Easy Connect(10g added this new method) Local naming Directory External naming It is said that if Easy connect is used by the ...
3
votes
2answers
565 views

read before write transaction

Talking about transactions (db transactions), does a read operation have always precede a write operation? That's obvious, isn't it? Thanks in advance *Of course my question doesn't take into ...
0
votes
2answers
50 views

Failure to log in using just the server name

I have more than one PC connected by LAN that I access from Server Management Studio. When I try to connect with the DB server, if I place the server IP instead of the server name in the serverName ...
2
votes
1answer
450 views

How to get server event notification

I'm just getting into sql-server, so forgive me if this is a basic question. I'm building an application using .NET 4.0 and VS 2010 and ms-server2008. For my application I need to detect the server ...
0
votes
1answer
347 views

Which file is PostgreSQL log file 0?

In my PostgreSQL logs, I find this message: LOG: invalid magic number 0000 in log file 0, segment 1, offset 16121856 Which file is log file 0? Here is my pg_xlog directory: -bash-4.1$ ll ...
3
votes
2answers
1k views

Should arrays of IDs stored in Postgres use varchar, int, or another type?

What is proper convention for creating a field that will hold an array of foreign keys? In this particular case, I'm creating a field called "owners" that will hold an array of user IDs. I want to ...
3
votes
1answer
3k views

Postgresql: Move database to new tablespace

I'd like to completely move a database (tables, indexes, etc.) to a new tablespace. I know how to move each item individually but is there a way to move it all in one go? I'm using postgresql 9.1.
0
votes
1answer
135 views

Help me to better design my query so I can gain more performance

I need to find so called first entry in database for items regarding their partners. I wrote query and it is giving me correct results but it sucks with performances. I suspect that I have missed ...
1
vote
1answer
397 views

ERDs: How do you indicate mutually-exclusive encounters?

If you have a character_instance and character entity in an ERD for a video game, and you want to indicate that something happens when a character entity encounters a character_instance entity, how do ...
4
votes
2answers
1k views

How can I speed up a query that orders by a calculated field?

I will try and give an example - this is not my table structure - I'm simply trying to outline the issue in order to find a solution... Person Id, Name BrothersNames Id, Name SistersNames Id, Name ...
7
votes
3answers
6k views

Executing Stored Procedure that accesses another SQL instance

I apologize if this question repeats another already asked. I have searched for hours and have not found one that fits my situation. Desired Outcome A user using SQL authentication has execute ...
1
vote
1answer
359 views

SSAS -> MDX -> Create a price comparision against resellers

I want to write an MDX query that will do a price comparison for a product against each re-seller and return a count which a 'greater', 'lesser' or 'equal' for a given month. Measure: ...
1
vote
1answer
731 views

MySQL Cluster: cannot start the management node

When I try to start the management node of MySQL Cluster on Windows platform, I get the following error: Could neither create or open key ...
1
vote
1answer
913 views

I am getting an error while trying to download binary for mysql 5.5.11

I am trying to upgrade MySQL 5.1 to 5.5.11 on Ubuntu 10.10. Everytime I try the wget command I get this error: wget ...

15 30 50 per page