1
vote
3answers
286 views

xtrabackup prepare - after dump or before restore?

i have doubts about xtrabackup --apply-log. is there any difference when use it? should it be done right after dump or before restore (even few months later)? seems stupid, but maybe i missing ...
0
votes
2answers
260 views

Oracle - Clause where in case when

all! I want to know how wrote this code of SQL, I already trying but i get message error. I wrote two way different this SQL. See you below SELECT * FROM tabela WHERE coluna IN (CASE WHEN 1 = ...
0
votes
1answer
1k views

What is the best practices to backup and restore full and partial database with SQL Server 2012 and C#?

How can I do the following with C#: Completely backup an existing database. Partially backup an existing database. Completely restore an existing database from a backup file. Partially restore an ...
3
votes
1answer
3k views

Recover the disk space after deleting rows from table

I deleted millions of rows from one of the table with innodb engine. I know that I need to run optimize table to recover the space. But running that will cause lock on the table, which will affect the ...
1
vote
1answer
183 views

Stored procedure to validate xml content against dtd

I have a stored procedure which creates xml content and then is stored to a xml file. Is it possible to validate the generated xml content against a dtd file? Thank you in advance!
1
vote
2answers
2k views

SQL Server db user mapped to windows login not in SQL Server logins

I am on a SQL Server 2008 where i login with DOMAIN\USER_A On my database i can see this login is mapped to the user dbo of that database. What i don't understand is that DOMAIN\USER_A is nowhere to ...
0
votes
2answers
268 views

Find missing indexes

tool available to find missing indexes in mssql 2008 ? can we find the missing index using Database Engine Tuning Advisor
1
vote
3answers
149 views

in-memory SQL database system [closed]

In an application, I am using mysql's TEMPORARY TABLE. Since this application does not need permanent tables, I wonder if I can find an alternative RDMS designed for memory tables. I hope to find an ...
1
vote
2answers
2k views

Freeing space after deleting rows [duplicate]

I have a SQL Server 2008 instance and one table is quite large (log data) so I delete old logs. Now I start to read articles on this problem, here is one. As I see it there is no solution! If I ...
0
votes
3answers
80 views

Oracle Data Guard - redo logs not in chronological order?

The disadvantages section of the Wikipedia entry for Oracle Data Guard says: If the network link connecting primary and standby is over-subscribed, the redo logs are not applied in chronological ...
3
votes
1answer
125 views

SQL Server 2008 - How to check FK integrity?

I'd like to pull a partial dataset from production for test environments - e.g. Copy the production database with only the first 100 rows of each table or 5% of the data - which ever comes first. ...
1
vote
0answers
109 views

Are duplicates ever acceptable in a database

A warehouse system I am working on allows inwards consignments [type = 0] and outwards consignments [type = 1]. The user selects multiple products for each consignment and then multiple warehouse ...
6
votes
2answers
506 views

What to do after deleting a million records

We are implementing a new feature in our system that will cause about a million records (each record is tiny, basically a GUID, a date, and four smallint fields) to be purged from a table every night. ...
3
votes
1answer
15k views

MySQL 5.6 DateTime Incorrect datetime value: '2013-08-25T17:00:00+00:00' with Error Code 1292

I'm using MySQL 5.6 and I have a program that runs the following SQL statement: UPDATE m_table SET s_time = '2013-08-25T17:00:00+00:00' WHERE id = '123' against my database. Unforutnately, I get the ...
3
votes
1answer
327 views

MySQL / Fusion IO Configuration Question

I need a little configuration optimization. I think what I have is pretty good but feel like there's still room for improvement. Current Config [mysqld] user=mysql datadir=/var/lib/mysql ...
6
votes
1answer
131 views

Is there a way to implement a cross-database task on SQL Server 2012 with the Availability Groups feature?

We use SQL Server 2012 and its new Availability Groups (AG) feature. There is a task for moving old data of some tables from one database to another database. Both databases are included into ...
1
vote
0answers
69 views

MySQL probelm in port: 3306

All websites on my VPS getting very slow, after dedcting the problem found that there are a line take 99.9% of the CPU: /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql \ ...
1
vote
0answers
72 views

Dynamic form from a database [closed]

I am considering to develop a dynamic form so all the fields and validation type can be stored on the database. For example I could do table design something like this: Field ID | Field title | ...
1
vote
0answers
49 views

Restoring a database to a point in time: Database I want not showing up in dropdown list

I want to restore to a point in time from a database that is already attached. When I try to do this using SMSS I cannot find the database I want in the dropdown list, but oddly it has a couple ...
1
vote
0answers
84 views

Mysql encrypted database contents by proxy?

Forive the amateur nature of this question. I work with Wordpress, often transforming the vanilla flavour into custom made versions for clients. Increasingly clients require more and more marketing ...
2
votes
1answer
166 views

Sphinx: Indexer causes MySQL to hang

Not sure what's going on. I run indexer --all --rotate When it finishes mysql hangs and not accepting new connections. from my observation as soon as indexer finishes, all update,insert,delete ...
1
vote
0answers
153 views

UPLOCK to avoid multiple reads

Given the following table structure... Orders ====== OrderId int PK OrderEvent =========== OrderEventId int PK OrderId int FK EventTypeId int FK I've got multiple concurrent processes SELECT-ing ...
1
vote
0answers
22 views

How do I configure MySQL to store specific entire InnoDB tables on a different drive in Windows ( Server )?

After skimming the MySQL ( 5.5 ) docs on Partitioning, that seems to deal with breaking parts of the same table off onto other drives. I'm struggling to find information on how I pinpoint an ...
0
votes
0answers
126 views

Is STRICT_TRANS_TABLES required for replication?

Is STRICT_TRANS_TABLES required for replication? Particularly, I need to know about it for Percona Cluster.
2
votes
1answer
829 views

What is the difference between COUNT(*) and COUNT(*) OVER()

Take the following code example: SELECT MaritalStatus, COUNT(*) AS CountResult COUNT(*) OVER() AS CountOverResult FROM (schema).(table) GROUP BY Marital Status COUNT(*) ...
2
votes
2answers
290 views

how to create an incremental database copy in postgresql?

Virtual machine software like VirtualBox allow one to make incremental VM clones. That is data, once "touched" (opened writable), will be copied and stored in the incremental cache of the new clone. ...
1
vote
1answer
2k views

Why do large tables slow down queries in databases?

Kind of a generic question; but I have noticed that large tables in certain CMS's can slow them down to a crawl. The solutions for this I've seen are to just truncate those tables. Why do large ...
2
votes
1answer
74 views

Is there a way to auto resume an incomplete job after sql server restart?

I ran into problem of job stopped after the sql server restart. Is there a way to auto resume an incomplete job after sql server restart? Thanks!
4
votes
2answers
1k views

Comparing binary 0x and 0x00 turns out to be equal on SQL Server

It seems that SQL Server considers 0x and 0x00 equal values: SELECT CASE WHEN 0x = 0x00 THEN 1 ELSE 0 END This outputs 1. How can I get true binary bit-for-bit comparison behavior? Also, what are ...
3
votes
1answer
656 views

Finding swap causes of MySQL

In my centos 6.3 server I have a MySQL 5.5.33 database. It has 17 tables (15 InnoDB, 2 MyISAM) and total records 6.7M rows. I refactored my schemas and added indexes for my slow logs. My average query ...
4
votes
5answers
38k views

How to access a SQL Server database from other computer connected to the same workgroup?

I have created a C# application which uses a SQL Server database. I have other computers connected to me and to each other in a workgroup. I have shared my C# application with others. When they open ...
3
votes
4answers
2k views

Query to find GUID's “not in” null containing subquery returns no results

When I have a query that checks if a column of type uniqueidentifer does not exist in a table that has a null value then I get no results back. If the subquery does not return a null it works fine and ...
3
votes
1answer
4k views

Get result of joining multiple tables as one row

I have these 2 tables: table1: id | name --------- 1 | john 2 | jack table2: id | profile_id | institution ----------------------------- 1 | 1 | SFU 2 | 1 | UBC 3 | 2 ...
1
vote
2answers
135 views

Optimize Query of Count Less Than

I would like to optimize querying in SQL Server of a table to know whether it has a count of records less than a certain amount. I don't need to know the complete count, just whether it is less than, ...
-1
votes
1answer
472 views

Problems migrate database from 4 to 5.5 mysql

I have a server with 4.0 mysql version innodb engine. I need to migrate to other server with 5.5 version (linux) ok I dump the full database using mysqldump, when i try to restore on the 5.5 ...
0
votes
1answer
858 views

Unable to drop non-PK index because it is referenced in a foreign key constraint

I have a table named MyTable. The primary key is an identity int column named MyTableID. There is a unique clustered index on the PK column MyTableID named PK_MyTable. I noticed there is an ...
2
votes
2answers
425 views

Optimize simple query using ORDER BY date and text

I have a query to a table in Postgres with an order based on a date field and a number field, this table has 1000000 records The data types of the table are: fcv_id = serial fcv_fecha_comprobante = ...
3
votes
1answer
143 views

Mysql Fragmentation. How bad is too bad?

I ran a table status for my companies production site and its showing close to around '49085939712' for just about every table in my database and we have around 400 tables. I am not a DB ...
-1
votes
1answer
206 views

Restrict access to rows by usename

In my database i store data of different users (e.g. addresses or invoices) in the corresponding tables. I want to make sure that a logged in user only has access to it's own data in the tables (so ...
1
vote
1answer
149 views

How big should I make a column in an audit table for storing the output of COLUMNS_UPDATED()?

I have a stored procedure which creates a complementary trigger and audit table when a table name is passed into it. The SP filters out all the calculated columns and other stuff that stops you doing ...
1
vote
1answer
615 views

DBCC checkdb showing failure after a restore

We restored a backup into a new database. After running a few delete queries we received the following message: Msg 824, Level 24, State 2, Line 1 SQL Server detected a logical ...
2
votes
1answer
80 views

Correct database solution?

So I work for a smaller company and currently we need to do our data processing with a desktop solution. We're running into memory limitations and the overall solution in most people's eyes ...
1
vote
1answer
1k views

What is the difference between TABLESAMPLE(10) and TABLESAMPLE(10 PERCENT) in SQL SERVER 2012

My understanding of the use of TABLESAMPLE is that it returns the top n percent of rows in a result set where TABLESAMPLE(n) So I wrote the following queries to just check (as I'm learning T-SQL) ...
0
votes
1answer
996 views

mysql replication for certain dababases

I am new to mysql and I have a query in regards to mysql replication. Currently, I have a master database that replicates to four slave servers at the moment. I would need to set up a few ...
3
votes
2answers
545 views

SQL*Plus default output format

I have noticed that using the same SQL*Plus client to connect to different Oracle database result in different outputs for the same SQL query. Database 1: C:\Oracle\instantclient_10_2>sqlplus ...
1
vote
1answer
390 views

Replication is missing a specific set of rows on subscriber

So I've got two servers, we'll call them Server A and Server B. Server A has a table, Table 1, which gets replicated to Server B. Server B has a table, Table 2, which gets replicated to Server A. ...
3
votes
3answers
114 views

Find numbers not used in a column

How can I find in a column filled with numbers, the ones that are not used. Table_A: 'id' int(11) unsigned NOT NULL AUTO_INCREMENT, 'client_code' int(4) unsigned NOT NULL, 'client_name' ...
3
votes
1answer
53 views

How is ORDER BY logically Processed

Take this example: SELECT SalesOrderID, CustomerID, SalesPersonID, OrderDate FROM Sales.SalesOrderHeader ORDER BY OrderDate, SalesOrderID DESC OFFSET 0 ROWS FETCH NEXT ...
2
votes
3answers
217 views

Trace and analyze logs on SQL Server

I am using an SQL Server 2012 on windows datacenter 2012 I have encountered a situation where i think some virus/sql injection had heart my database, Some data on my table had changed to weird ...
1
vote
1answer
1k views

What are the ports and directionality of the TCP connections used in MySQL replication?

I wanted to know how replication works in mysql. Both slave and master have mysql server running say on port 3306. Slave acts like a client and master acts like a server. Does slave always bind to ...

15 30 50 per page