0
votes
0answers
4 views

group by id with sum of file size - PostgreSQL 9.2

I got the query below, that selects some information and put them into a temp table. CREATE TABLE results AS WITH accounts AS ( SELECT id FROM clients WHERE NOT ( (price ...
1
vote
0answers
3 views

Multiple Filters for Databases on SQL Server Server Level Audit

I am attempting to create a Server Level Audit to track Database Level events in SQL Server 2014. I know I can create them at the database level but I want the audits all databases at the server ...
1
vote
0answers
4 views

How did you setup MySQL Replication with autofailover that is app transparent?

Recently told MySQL is shelving MySQL Fabric. Interested how others have implemented a MySQL replicated environment that is app transparent. I am considering using HA Proxy to host virtual IP ...
1
vote
1answer
13 views

MySQL data types for common columns

I have been a frontend programmer for a while and moving to making some applications on my own and becoming a full stack engineer. I have worked with plenty of databases for applications and sites but ...
0
votes
0answers
22 views

Unable to remove the database name

One of the databases is getting to suspect mode. Since I have backup, I restored the same database with different name and then take the SQL SERVER and remove the data and the log file of the ...
0
votes
0answers
10 views

Mysql scaling up vs scaling out

I have an application where each client gets their own database. This is for security, backup ease, and portability. It provides great flexibility and performance has been fine. I am up to 300+ ...
1
vote
1answer
31 views

Trace flag 2861 and what a 'zero-cost' plan actually means

I'm trying to get my head around trace flag 2861 and what it actually does with trivial queries? The blurb says: SQL Server typically won't cache plans for these trivial queries because the cost ...
3
votes
1answer
29 views

What are the “GDR” vs “QFE” hotfixes for SQL 2008 R2 SP3?

I'd always assumed that higher patch numbers were necessarily later releases, but now I'm not so sure. Looking at the SQL Server Build List for SQL 2008 R2 SP3, there are two possible ways to apply ...
2
votes
1answer
25 views

Count instances of value in multiple tables

I'm attempting to write a query that returns the count of a given value across multiple tables. Right now, I'm using the following query SELECT COUNT(*) AS SL, ( SELECT COUNT(*) FROM [Sales Line ...
0
votes
1answer
28 views

Querying a date range

i query this SQL query: SELECT * FROM [DB].[dbo].[Table] WHERE [DATE] BETWEEN '01-01-2016' AND '31-03-2016' AND ([TIME] >= '00:00:00' OR [DATE] > '01-01-2016') AND ([TIME] <= '00:00:00' OR ...
1
vote
0answers
19 views

Quorum Questions For An FCI And AlwaysOn in a WSFC

I was reading the white paper on FCI + AlwaysOn as well as several other resources on quorum voting differences in Windows Server 2008 and 2014 and had 3 questions. 1- Will giving a node in the ...
0
votes
0answers
28 views

Deadlocking on two update statements

Server Info: Microsoft SQL Server 2005 - 9.00.5057.00 (X64) Standard Edition (Build 7601: Service Pack 1) I have a table called LAB it has about 38 million rows in it. The primary key is a single ...
1
vote
0answers
8 views

Conditional relationships? One-to-many relationship using a pivot table for only a type of entity

I have the following tables: users: - id - name - user_type_id (references id on user_types) neighborhoods: - id - name homes: - id - house_number - neighborhood_id (references id ...
2
votes
1answer
14 views

PowerShell Pipeline Binding examples on SQL server?

I am learning PowerShell, my training machine (VM) is a Windows Server 2012 R2, with SQL 2014 and PS 4.0. I am try get a handle on the two Pipeline Binding methods ByValue & ByPropertyName. I am ...
1
vote
0answers
14 views

Why is Server Configuration in Pgadmin3 inaccessible for me?

My Postgres server is running (localhost:5432), but Tools > Server Configuration is greyed out for me as below. I was attempting to access it to edit/locate my postgres.conf file.
1
vote
1answer
13 views

Storing email inbox information

I am working on a webmail client. I want to store the remote mailboxes information in a Postgres database. As a general rule of thumb, most IMAP servers will have a similar default folder structure ...
0
votes
0answers
11 views

How to set up repl_distributor for data access

I need to run queries on the distributor server from the publisher during deployment in a transactional replication setup. I see repl_distributor is set up as a linked server, but am having trouble ...
1
vote
1answer
59 views

Scheduling index rebuild jobs

I have a MS-SQL 2014 SP1 - two node AlwaysOn AG (One Primary and an read-only secondary) with about 10 databases sizing 20-30GB in total. I have some queries regarding scheduling index rebuild and ...
0
votes
1answer
17 views

Select MySQL with 2 tables conditions, Is this right?

Tables: agencia (nome_agencia, cidade_agencia, fundos) cliente (nome_cliente, rua_cliente, cidade_cliente) conta (nome_agencia, numero_conta, saldo) emprestimo (nome_agencia, numero_emprestimo, ...
0
votes
2answers
30 views

Update Grouped records

I have the following query that returns duplicate values: SELECT [t].[Field1], [t].[Field2], COUNT([t].[Field2]) FROM [dbo].[Table1] AS [t] WHERE [t].[Field2] <> '' GROUP BY ...
0
votes
1answer
24 views

Why does SQL Server truncate my nvarchar(max) string in an expression?

It looks like a 2nd variable in an expression is determining the maximum length of my 1st variable. An example is easier to explian: DECLARE @MyDest AS NVARCHAR(MAX) = 'Some long text, for testing'; ...
0
votes
0answers
10 views

Is there any way to automatically keep data in a table in sync with multiple other tables without materialized views?

I would like to create some materialized views in Redshift to aggregate the information stored in several tables and keep the data in the views in sync with the source tables. Unfortunately, Amazon ...
1
vote
1answer
22 views

Login in Alwayon Availability

I am new to always on availability groups. I am little bit confused with creation of logins. Let assume an environment NODE1(Primary) & NODE2(secondary) & NODE3(Stand by) & ...
0
votes
0answers
21 views

Oracle 12c cannot start up after having failed to enable Extended Data Types

I upgraded my single instance oracle to 12c on CentOS 6.7 for the benefit of having 32767 bytes varchar2 and I followed below nice article until stopped half way when executing utl32k.sql script. ...
0
votes
0answers
14 views

MySQL 5.5 to 5.7 doesn't work, apparently this is a feature?

Has anyone found a way yet of circumventing MySQL 5.7s insistence that it's Master must have a server_UUID. I currently have multiple instances of MySQL 5.5 over various sites, and want to look at ...
1
vote
1answer
66 views

Troubleshooting extremely long running query (SQL Server 2012)

We have a purchased reporting application that executes a query that just recently is taking an extremely long time (>2 hours). A week ago, this same query completed in less than a minute. I've ...
2
votes
2answers
40 views

RMAN DUPLICATE from backup without Target or Catalog: How is the aux instance created?

I am trying to duplicate an Oracle database based on backups to test if they can be used in case of complete system failure. Hence, I want to do this without a connection to the source database. I'm ...
0
votes
0answers
5 views

Security on MongoDB

I have been reading up on the security of MongoDB. If my web app lives on the same server as the DB, can I just set the bindIP to 127.0.0.1? I'm not sure what the best practices are, but this should ...
-2
votes
0answers
9 views

specified @job_name doesnot exist and system cannot find the drive specified [on hold]

Msg 14262, Level 16, State 1, Server ABCDEF, Procedure sp_verify_job_identifiers, Line 67 The specified @job_name ('AB_CDEF_TEST') does not exist. The system cannot find the drive specified. ...
0
votes
2answers
17 views

Filter date and less and show column data - 1

and sorry for the title of the thread, I really don't know how to call this else I'm working on an view where I need to get a little tricky data. I'll try to explain it as easier and better ...
0
votes
0answers
6 views

Not able to find add listener IP dialogue box for AOAG set up

Somebody please let me know if you faced issue similar to this while setting up AOAGs.
0
votes
0answers
16 views

Getting count mismatch for output records

I want count of incorreclty routed task .first query count is correct 1. select * from statuschanges where incorrectlyrouted='t' count=388 and when I modify it according to requirement as ...
0
votes
1answer
27 views

Accessing computed column in a nested query

I am using nested sets to represent tree-type date in SQL-Server and basing what I'm doing on this article: http://mikehillyer.com/articles/managing-hierarchical-data-in-mysql/ by Mike Hillyer. In ...
-2
votes
0answers
18 views

Get the output of a stored procedure into a table [on hold]

Can anyone help me with a table that takes the output from a stored procedure. It should not be a temp table or table valued parameter. I am able to insert values to the table, but when I use select ...
0
votes
0answers
12 views

Postgres LEFT JOIN with recurring dates and users

I'm trying to get a query to show me if users have a record on a particular day, and if they don't it would return a NULL. What I have so far is a I create a sequence of days, then LEFT JOIN it, if I ...
1
vote
0answers
7 views

Operational issue for scheduling mongodump as backup method

For production backup, MongoDB recommends mongodump instead of mongoexport for accuracy of data. However, a few operational issue remain unclear to me, appreciate if anyone can advise on this matter. ...
0
votes
0answers
5 views

Postgres archive_command on Ubuntu 16.04

Ubuntu 16.04: Postgres 9.5: When i start psql -c "select pg_stop_backup();" command to execute for hot standby replica. It gives me warning as archive_command as: NOTICE: pg_stop_backup cleanup ...
0
votes
1answer
27 views

MySql timeouts waiting for table lock, no apparent deadlocks

I started having the following error on two different applications that write to the same database and table: Lock wait timeout exceeded; try restarting transaction At the beginning I thought it ...
0
votes
0answers
24 views

Would SQL Replication prove to be a FASTER option than downloading compressed DB files every time from servers at different geographic locations?

My requirement of synchronising two DB servers in different geographic locations is as follows synchronise some DBs on 2 servers in regular intervals (manual). One in US is an intermediate release ...
0
votes
0answers
24 views

Managing large database tables, large tables VS seperate databases

In my project I have a system where users sign up and perform daily tasks. Note that I am not a database expert, none the less I am trying to solve a potential issue that may arise. A problem has a ...
0
votes
1answer
26 views

Database Log 3 times Data File [duplicate]

I have a set of database on full recovery model, my backup schedule looks like this: 1 Weekly Full Backup 1 Daily Log Backup Full backups are about 10GB, log backups are about 500mb per day. What ...
0
votes
1answer
19 views

SQL Server Msg 2812, level 16 state 62 line 30

i want to make automatic backup and restore my database on SQL Server 2012. i have made automatic backup with script in my windows server. now, i want to make auto restore with script, i have found ...
0
votes
1answer
21 views

Upgrading SQL Server 2008 failover cluster node to SQL Server 2012 failover cluster node [on hold]

Please I want someone to help me with step by step method of upgrading SQL Server 2008 with failover cluster node on two different machines to SQL Server 2012 without losing the existing ...
0
votes
0answers
30 views

Using a trigger to check whether a matching record exists

I have a database model set up as in the picture above, modelling a student's enrolment into a unit with an associative entity to facilitate the m:n relationship. I wish to code a trigger that will ...
1
vote
0answers
7 views

mysql replication and GRANT that doesn't quite grant

I am trying to set up mysql replication. All's well, but I see an error 1045 for the slave: mysql> show slave status\G *************************** 1. row *************************** ...
0
votes
0answers
10 views

What are the best settings of InnoDB for FULLTEXT queries?

This question has been asked before, but I was unable to find the right answer for my situation. We have a local server with Quad core and 32GB RAM dedicated for a single InnoDB database, which ...
2
votes
1answer
22 views

Extended events vs SQL Audit - performance implications

I would like to setup a audit trial kind of system on my database to monitor for UPDATE/INSERT statements on a specific table. I have two options infront of me i.e. Using SQL Server Built in audit ...
2
votes
1answer
19 views

Fail to start sql cluster role

I have installed SQL Server using Failover Clustering on 2 nodes, running Windows Server 2012 R2 Enterprise Edition and SQL Server 2008R2 Standard SP1. Shared storage is provided by an iSCSI NAS ...
-3
votes
1answer
36 views

How to make a DBADB? [on hold]

I recently seen a database server and it had a DBADB database. I asked the dba what it was for and he said he uses it to hold scripts so he has a central spot for them instead of using a network share ...
1
vote
1answer
15 views

Why does updating a large VARBINARY break replication (MSSQL_REPL21100)?

We have replication set up on a VARBINARY(MAX) column that stores image data (yes, yes, I know - don't blame me, I didn't design it). Recently, we started inserting larger images (around 200kb) and ...

15 30 50 per page