0
votes
1answer
1k views
Could not start mysql or MariaDB. Permissions were ok, but mysql-bin.index permission error
Using MariaDB 5.5.36. Here's what I got while trying to start MariaDB:
# syslog
Dec 14 09:40:52 vps1497 mysqld_safe: Starting mysqld daemon with databases from /var/lib/mysql
Dec 14 09:40:52 vps1497 ...
2
votes
1answer
22 views
Creating crosstab() pivot table in PostgreSQL 9.0
I have a rather complicated issue for myself which I hope someone can help me with.
I want to use PostgreSQL to enable me to create pivot tables from a geometry-less table.
To keep it simple I will ...
0
votes
1answer
13 views
Export pump all schemas except Sytem related schemas
I have around 111 schemas in one database instance and have to export all the schemas except the system related schemas to a new instance. Is there any way as to exclude system related schemas while ...
0
votes
0answers
9 views
SQL Server thread status
Our SQL is configured to use max of 704 threads,some times we get alerts stating only 10 threads are left,so i am not able to understand whether SQL keeps the thread open ,since again creating a new ...
3
votes
1answer
29 views
SELECTing an optional column, and doing SUM on it
I have two tables (from Request Tracker 4, actually): Tickets, and Transactions.
Tickets.id == Transactions.ObjectID
but there aren't always Transactions for every Ticket.
I'm interested in the ...
1
vote
1answer
12 views
'cmd' Field Definitions sysprocesses MS SQL Server
I am looking at doing some profiling of connections types and volumes across the day.
I am using the sys.sysprocesses to gather the information I require, looking specifically at the 'cmd' field to ...
0
votes
0answers
4 views
Tool for Analytics of the meta data of an organization (meta data science)
I am looking for a tool/method that performs Analytics on the meta data of an organizations' data.
Specifically:
Let us say I have information about the size, statistics of different tables and ...
2
votes
2answers
4k views
SQL Server - backup / restore schema only
We have a DB on over 100 servers of which we want to backup / restore the structure of just 1 at a time to a specific UAT database. They're all called the same thing but vary in terms of schema - ...
5
votes
3answers
34 views
What is lost when I create a Foreign Key using `WITH NOCHECK`?
I know that if I do an EXISTS() call on a FK lookup value, then, if that FK constraint is trusted, the result is immediate.
And if it is not trusted (like when I create the FK using WITH NOCHECK) ...
0
votes
0answers
9 views
Can I do update,insert multiple row like this?
I have a source and a target table. Target table contains 4 extra column- surrogate key, insert_date, end_date,old_address and Flag. I want to reflect data that is in source table in target table such ...
1
vote
1answer
27 views
How to write a procedure which deletes rows from parent table and child table?
I want to make write a procedure which will delete rows from parent table as well as child tables. How can I achieve that.? Or is there any existing way to do that.? In my case I am asked not to use ...
0
votes
0answers
18 views
Reorganize index maintenance plan failed
A 'Reorganize index task' (maintenance plan) failed today with the below error:
Reorganize index task
The Execute method on the task returned error
code 0x80004003 (Object reference not set ...
1
vote
2answers
424 views
Mysql improve Self join performance large table?
I have a task to help identify conflicting IP ranges , I want to highlight when one companies IP range falls within another's ... below is the sample table,
I have converted the IP ranges from .dot ...
1
vote
0answers
5 views
Should I enable binlog binary logging on slave server?
What are the benefits of enabling binary logging in MySQL slave server? I'm thinking that doing a switchover from master to slave and back to master would be easier in this way?
0
votes
2answers
23 views
Restoring Database to a smaller test envrionment [duplicate]
I don't believe this is possible but wanted to check.
I've got a bi-weekly job running to restore the full backup to a test environment so the devs have something fresh to destroy without damaging ...
3
votes
2answers
19 views
Find out what columns are in a trace file
while tackling and unexpected CPU spike that was happening every 10 min one of my colleagues prepared a server side trace as follows:
-- Create a Queue
declare @rc int
declare @TraceID int
declare ...
1
vote
2answers
65 views
What all files are required for restoration process of SQL Server in Full + Diff + Transactional backup policy
I am reading about different types of backup policy in sql server. I am not clear with backup policy for Full + Differential + Transactional backiup
My main attention is towards what all files would ...
2
votes
1answer
376 views
Help with Oracle Pipelined function
I have a pivot where I have a contract with tank numbers separated by ; and I've been given this example to pivot them down into rows (which works):
SELECT oks_c.contract_number,
...
0
votes
1answer
6 views
parse rs.status() output to display one secondary node for mongodump destination
I wish to run mongodump to secondary (not primary). So I need as output hostname and port of one secondary.
# ./mongo -udbadm admin --port 27100 -p --quiet --eval ...
-2
votes
0answers
21 views
how to create trigger after insert in another database? [on hold]
database : dbsms, table : outbox
id reponse | idforward | DeliveryReport |
null | 2 | default |
null | 3 | no |
1 | null | yes ...
17
votes
1answer
73 views
Date range rolling sum using window functions
I need to calculate a rolling sum over a date range. To illustrate, using the AdventureWorks sample database, the following hypothetical syntax would do exactly what I need:
SELECT
TH.ProductID,
...
0
votes
0answers
10 views
How to free up disk space on a drive which has BiztalkMsgBoxDB_log file in it
I have been asked to analyze a issue regarding one of the biztalk servers. I was asked to free up space on a particular drive, where I found the only file BiztalkMsgBoxDB_log.bak is taking up close ...
0
votes
1answer
25 views
Optimize mysql --> 'show global status'
I am working in the optimization of a MySQL Wordpress database running in a RDS instance at Amazon AWS. The instance is a t2.medium machine with 4GiB of RAM and 2vCPU. The size of the DB in a sql file ...
3
votes
1answer
31 views
Two-way replication between SQL Server 2008 R2 and SQL Server 2008 R2 SP3
I know that in SQL Server you can't have two-way replication between different versions.
I wanted to know if SQL Server 2008 R2 and SQL Server 2008 R2 SP3 are considered "different versions"?
Did ...
0
votes
0answers
17 views
SSDT project with working linked server references
I have a VS 2013 solution with two database projects.
One of them, let's call it the "worker" is supposed to get deployed to about 10 different production servers.
The other one, that is supposed ...
0
votes
1answer
133 views
Insert/Update SQL Server Stored Procedure
I have to insert or update into a table depending on a record. I am using a stored procedure to do this. I am very new to SQL Server and stored procedures. I tried to follow various articles and ...
0
votes
1answer
13 views
Explanation for important reserved space
I am analysing a database
I didn't understand why reserved space is more important then used space ?
Any explication ? can I get 400 GO ?
2
votes
3answers
25k views
How can I allow an Oracle database to be accessed remotely?
I have an Oracle database installed on one machine, and I am trying to accessing the same from another machine.
I tried via Oracle SQL developer eclipse, and even via JDBC program, butnothing works. ...
0
votes
1answer
134 views
I keep getting an error 10060 trying to connect object explorer in Visual Studio 2013 to an Azure Database
Using Win 7, Visual Studio 2013, (or Sql management tool 2014)
This is for a class and its all software on the trial period.
In Visual Studio server explorer - I can connect to the Azure Server I ...
-2
votes
0answers
24 views
how to create trigger before insert to filtering values in another table and database? [on hold]
I want to create to a table before insert trigger smsra_sms to check the data, if the condition in ebsms.inbox SenderNumber
value equal to Nohp in the input nohp smsra_blokir_number
...
0
votes
1answer
16 views
MongoDB update object in Array
I have the following document:
{
"name" : "student_1",
"courses" : [
{
"name" : "Algebra",
"grades" : [ 98, 96, 92 ]
},
{
"name" : ...
2
votes
4answers
7k views
How to determine the optimal sort_buffer_size?
I read from a sample configuration file which says the following:
# Sort buffer is used to perform sorts for some ORDER BY and GROUP BY
# queries. If sorted data does not fit into the sort buffer, a ...
1
vote
0answers
39 views
Records not getting replicate from Mysql 5.5.32 to MySQL 5.6
1. I have a MySQL 5.5.32 server (community edition) on one Linux server which is master.
2. I have a MySQL 5.6 server (community edition ) on another Linux server which is ...
2
votes
1answer
714 views
MySQL: Show full processlist has empty Host name. Why?
I am executing SHOW FULL PROCESSLIST and from the response I get the "Host" field is empty.
Quoting from the docs here
Host
The host name of the client issuing the statement (except for ...
0
votes
0answers
4 views
handler socket on tokudb engine
I am trying to setup handler socket to work with tokudb engine. Database I am running is percona server and i have got tokudb enabled and the tables all have tokudb engine.
I was wondering if anyone ...
8
votes
1answer
184 views
+150
Why is my SQL Server query behaving differently on UPDATE than on SELECT?
I've written a SQL Server query that updates records to have a sequential number after partitioning on a field. When I run it as a SELECT statement, everything looks great:
DECLARE @RunDetailID INT = ...
0
votes
1answer
262 views
Data Analysis with MongoDB or MySQL
I have a need for processing some data in order to come up with some statistic. This is the scenario:
Each user can answer several questions from the question list. They pick their answers from a ...
3
votes
0answers
16 views
Low performance, high availability, replicated key/value store with audit trail
I'm looking for a database system with fairly specific specs. I've looked most of the major relational databases and NoSQL products out there and did not find one that even remotely satisfied my ...
2
votes
1answer
480 views
Oracle 11g bug ? not returning the record until I triggered index to invisible and then to visible
We are using Oracle 11g, 11.2.0.3.
We know a record exists in a table but a select is not returning it for some odd reason.
The execution plans the general query, not forcing any index, shows that ...
0
votes
2answers
105 views
How can I remove only consecutive duplicate fields when the id is not consecutive in MySQL
In this table, I have a price change history. The prices are checked regularly and as you can see, sometimes the price does not change. How can I take a specific sku and delete all cases where a ...
2
votes
4answers
13k views
Generate create script for all indexes
I am working on documenting my databases, and I would like to create a list of all of the indexes in my database. The reason I want to do this is so that I can track changes to my indexes overtime. ...
0
votes
2answers
10 views
How do I get a list of all the partitioned tables and partitioning details in my Teradata?
How do I get a list of all the partitioned tables in teradata?
and
How do I get a partitioning columns and details for a table in teradata ?
0
votes
1answer
145 views
Index to fix this query MySQL
We have an extremely large forum running lots of third party software (Most of which doesn't run all that well) and we're starting to optimize things as time allows. This query keeps popping up in the ...
-1
votes
0answers
7 views
Simplest way to write stored procedure in postgresql? [on hold]
I am just willing to learn Stored Procedure in Postgresql. Can anyone send me some links or suggestion?
3
votes
1answer
19 views
How to properly implement compound greatest-n filtering
Yep, more greatest-n-per-group questions.
Given the a table releases with the following columns:
id | primary key |
volume | double precision |
chapter ...
0
votes
1answer
71 views
Analysis Services job step error: The specified file could not be decrypted
We have a daily SQL Server Agent Job that's failing intermittently. Between May 27th and Jun 16th, it has failed twice.
The error message we receive (listed below) references "The file could not ...
0
votes
1answer
426 views
Choosing shard key and friendly URL Ids for my MongoDB
I have decided to use MongoDB as my Database for a web application. However, I have some difficulties to get started and I hope that you can help me out with a few questions.
I am developing my ...
4
votes
2answers
85 views
Listing SQL Server instance startup parameters
I have a server I have just restarted and verified which trace flag are active using DBCC TRACESTATUS:
Trace Flag : 3688 Function: Removes messages to errorlog about traces
started and stopped
...
2
votes
3answers
136 views
How to prevent a PostgreSQL trigger from being fired by another trigger?
I have 2 triggers on one table; one works for INSERTs :
CREATE TRIGGER "get_user_name"
AFTER INSERT ON "field_data"
FOR EACH ROW EXECUTE PROCEDURE "add_info"();
This updates some values in the ...
2
votes
1answer
62 views
PostgreSQL query very slow when subquery added
I have a relatively simple query on a table with 1.5M rows:
SELECT mtid FROM publication
WHERE mtid IN (9762715) OR last_modifier=21321
LIMIT 5000;
EXPLAIN ANALYZE output:
Limit ...