0
votes
0answers
9 views

Create an XML Schema collection in SQL Server 2012?

I want to create an XML schema collection to validate some XML in a column for the following XML: DECLARE @xml as xml SET @xml=' <R C="firstName" O="" N="Fred" /> <R C="lastName" O="" N=...
0
votes
0answers
4 views

help me to migrate single myslq5.6 server to mysql5.6 Cluster, follow this error!

I try to migrate a single myslq5.6 server to mysql5.6 Cluster. I do not understand why I get the follow this error: ERROR 1297 (HY000) at line 1 in file: 'load_dept_emp.dump': Got temporary error ...
0
votes
1answer
12 views

SQL Query error drivning me crazy!

I'm wondering if anyone can find the mistake in my SQL-Query which I can't seem to find.. Been starring at the same lines of code for like 2 hours and it's driving me nuts! So, here's the query... (...
0
votes
0answers
10 views

All queries are so slow on mysql cluster

Here is my situation: I got over 10G of web logs (around 30 million rows) and I mainly search it with various conditions. e.g.: select * from tbl where ip = '123.123.12.3' and agent = '...
0
votes
0answers
4 views

Fluctuative number of rows when importing table

I'm currently importing table with the size about 17 million rows on MySQL. What catches my attention is, the number of row seems to be fluctuate. I use command show table status when my importing ...
1
vote
0answers
18 views

Restrict access to Edition- or instance-specific databases

I have the following issue with SQL Server. On my Windows Sever, SQL Server 2008 Express Edition is running. Now I have installed SQL Server 2008 Web Edition on the same server. My problem is, when ...
0
votes
0answers
20 views

Issue with SQL server cluster

I am having an issue with my SQL server cluster. We have 2 server SQL cluster. The 2nd node got shut down and I turned it back on. After joining both of the nodes in the cluster, the 1st node status ...
-2
votes
0answers
7 views

ignore some values using awk in shell script [on hold]

I'm writing a script which should sum of a columns entered by user.In the columns there is one row which is date(dd/mm/yy). Now awk doing sum of all values including value of dd.How to ignore date ...
0
votes
0answers
9 views

localhost:port_number/em (what is my port number)?

I am new to SQL databases. I have started learning SQL databases from SQLZOO, where they told me to use Oracle. I have installed Oracle Database 11g on Windows 10 with the help of this video. I have ...
0
votes
0answers
23 views

How to sort the data fetched from horizontar partitioned tables

I have a billing software system. In which there are daily call logs of users stored in horizontal partitioned database by date (month). There is a UI on which operation user can sort on any field ...
0
votes
0answers
8 views

Windows Domain User with Admin privileges cannot access a drive with full permissions in psql

I have installed the standard PostgreSQL 9.5 from Enterprise DB with a domain-level postgres user who has domain-level admin group membership. I have explicitly added full permissions for this user to ...
3
votes
0answers
22 views

Optimizing “WHERE x BETWEEN a AND b GROUP BY y” query

SELECT SUM("intCol"), "textCol" FROM "test_table" WHERE "timestampCol" BETWEEN '2016-06-12' AND '2016-06-17' GROUP BY "textCol" Please correct me where my understanding is incorrect. In Postgres, I ...
0
votes
0answers
10 views

Create custom JSON response from PostgreSQL table

Consider the following table: CREATE TABLE IF NOT EXISTS trips ( trip_id SERIAL PRIMARY KEY, start_location TEXT REFERENCES locations(label), end_location TEXT REFERENCES locations(label), ...
0
votes
0answers
16 views

OraOLEDB.Oracle not showing up in Providers in Linked Server

Im trying to link the Oracle database to our SQL Server database. However OraOLEDB.Oracle is not in the Providers list on the Linked Servers. I have installed Oracle Database Client (12.1.0.2.0) for ...
0
votes
0answers
16 views

In Oracle how do I put certain tables or partitions in a different group so the rest of the db can be brought up with OR without them?

I've done this with MS SQL Server in the past where data that is not required for disaster recovery for instance is in a separate file group and file and not cloned to save significant space and ...
0
votes
0answers
21 views

Determining whether a MySQL column is ever used

How can I determine whether a particular column in a MySQL table is ever SELECTed or explicitly UPDATEd or INSERTed or referenced in a WHERE clause? It'd be nice if I could determine the db user who ...
0
votes
1answer
12 views

Mysql will no longer start after DB import and password change

I'm running Mysql5.6 on RHEL 7. I had managed to get the mysql service up and running, and imported a database into it with no issues. However, after attempting to reset a user's password, the ...
3
votes
2answers
44 views

SQL Server- Limit to Concurrent table queries?

In SQL Server, or RDBMS systems in general, is there a limit to the number of concurrent queries that can be made against a table? How is it that N number of users can access the same physical data ...
0
votes
0answers
24 views

SQL 2016 Installation Error

I am trying to install sql 2016 standard on a windows server 2012 standard edition, and I am running into an odd error, hopefully someone can point me in the right direction. I am getting account ...
1
vote
2answers
22 views

How can one identify if FK's needed to be indexed apart from the NC indexes already residing

I was going through many articles, which said indexing the FK's is beneficial for good performance, specially for the environment where most of the reporting is done. I have a similar env where there ...
0
votes
0answers
20 views

Top Recommended Books/Courses For Learning Mid-Advanced Database Programming Beyond Basic CRUD Operations [on hold]

I have been a SQL DBA for the past two years and am looking to learn more indepth database programming to up my skill set and make me more attractive to potential employers. Currently with my day to ...
0
votes
0answers
6 views

error After upgrade datastax to version 5

After upgrade datastax to version 5 i get this error in log (Insufficient permissions on directory /hints) and node is down where the location for this directory?
0
votes
1answer
36 views

How do I remove first line from text and only the first?

I have a tables "Table1" in this table I have a Text NOT null field - "value". the value field is populated like so: value: 1.2.3.4 [cookie] : butter - 1 cup. 1.2.3.4 [cookie] : flour - 2 ...
0
votes
1answer
35 views

Use of nonclustered index [duplicate]

I have a table that does not have a primary key. This is because there is no unique field. So I created an index on SerNum, ScanDate so I could look at the table in SerNum, Scandate order. It appears ...
0
votes
0answers
15 views

How do you find the VPC IP address of an AWS RDS instance

I'm trying to copy a table from my test server to my production server. Both are hosted on AWS in RDS instances. I found this thread which has the following post *second last at the time of writing): ...
0
votes
1answer
38 views

What exactly happens during Database Mirroring? What about during a fail over?

So I am trying to configure a two server setup, both containing SQL with independent storage. We're using windows server 2012, and I have a question about mirroring. If the server's data bases are in ...
0
votes
0answers
39 views

Problems caused by SQL Server 2016 Query Store

I have been testing SQL Server 2016 (Standard) on an Azure VM and have encountered a problem. In my SQL logs I am seeing SQLExceptions and eventid 1001 and this is happening every 15 minutes. 2016-...
0
votes
0answers
24 views

Internals Viewer for SQL Server [on hold]

back in 2009, I learned a lot from the Internals Viewer for SQL Server. http://internalsviewer.codeplex.com/ https://intview2.codeplex.com/ Unfortunately, the project is not active since 2012. Is ...
0
votes
2answers
19 views

Set Login User as database Onwer

What's the query to set a login user as db_owner during the creation of database. Following is the set of queries, which I'm using right now, Create database Test1; ALTER AUTHORIZATION ON DATABASE::...
1
vote
1answer
38 views

Why can not user set current schema to SYS?

See the example bellow. User is created with dba (but not sysdba) privs. He's allows to access v$session (which is public synonym to view in schema SYS, having different name). When executing alter ...
1
vote
1answer
42 views

Update all tables containing column name

In SQL Server, I can find all tables containing a COLUMN_NAME: SELECT * FROM INFORMATION_SCHEMA.columns WHERE COLUMN_NAME = 'COLUMN_NAME' How can I update all of these columns like: UPDATE <...
7
votes
0answers
83 views

Is it legal for SQL Server to fill PERSISTED columns with data that does not match the definition?

I'm following up on this question about strange values in a PERSISTED computed column. The answer there makes a few guesses about how this behavior came to be. I'm asking the following: Is this not ...
1
vote
0answers
5 views

Plpgsql function array plus replace

Please be indulgent to my question, 'cause I am newbee at plpgsql/sql. :) I need to do a replace in table and the insert 'replaced' data in the same table. How to replace some values using array with ...
0
votes
1answer
28 views

When Execution Plan Cost Differs From IOPs and Time

Generally, the query execution plan's overall cost aligns with the statistical IOPs. However, I've run into a situation where this isn't the case; one plan, which uses no throttling of CPU, shows it'...
-1
votes
1answer
26 views

SELECT rows according to another table

Table A (Id, Value), Table B(AId, Value). I need to select only rows from A, for which the pair (Id, Value) is not in table B. Solution with "JOIN" would probably better, because of performance.
0
votes
1answer
34 views

A short way to execute a dynamic SQL string

I have a table, and a column with a query in it. And I want to update this table, converting the value to the result of it's execution. This is a well known example of such table actually: ...
0
votes
1answer
19 views

Trying to get password has for a login through PowerShell

I've trying to get the password hash for a SQL authentication login via powershell. The code I'm executing is something like this Invoke-Sqlcmd -Query "SELECT LOGINPROPERTY('$LoginName', '...
0
votes
0answers
11 views

BDR Syncing Logs

I am making use of 2ndquadrant's BDR. Syncing always worked smoothly except for one day when I would make data changes on node 1. The data was confirmed to be on the node and committed successfully ...
1
vote
0answers
12 views

Median absolute deviation for time series outlier detection in Amazon Redshift

Context I am tasked with trying to detect outliers in time series data in an Amazon Redshift (PostgreSQL) system. Also known as a public holiday detector around the office. The method I have been ...
2
votes
1answer
33 views

How to Load Balance Availability Group

I have 2 Servers under SQL Server Cluster (Server 1, Server 2) 2 Databases configured with Availability Group (Database 1, Database 2) Server 1: Database 1 PRIMARY REPLICA Database 2 PRIMARY ...
-1
votes
0answers
23 views

Create Login on SQL Server 2008 R2

I want to create a login from windows and also set network location. Same like we do in UI i.e. click on search button select location and then add login. Currently, I'm using the following code ...
1
vote
0answers
10 views

Postgres latency issues during memory compaction on EC2 (Ubuntu 14.04)

We've recently upgraded our EC2 instance that hosts our Postgres database to an i2.8xlarge with 244GB of memory (this is to utilise the large amounts of ephemeral storage it comes with). Since ...
1
vote
4answers
58 views

Update data of one table from another with comparing columns have same initial strings

I have two tables: NewData: EName Job Sal smith clerk 2000 allen sales 2000 jones.domain.com Manager 6000 OldData: EMPNO ...
0
votes
1answer
24 views

MySQL .ibd file is too big

I got a memory issue while in linux. When i checked memory allocation by using df -h i found a path /dev/sda1 and it is used 100%. When i dig more i found that /var/lib/mysql file ate almost all ...
0
votes
0answers
26 views

How to minimize locking / maximize update throughput on small table

I have problem on SQL Server. I have a very, very small table which has a very high update frequency. CREATE TABLE [dbo].[counters]( [id] [int] NOT NULL, [val] [bigint] NOT NULL) Table has ...
0
votes
1answer
17 views

How to import long strings at different column positions with SSIS?

Our provider stores our survey data in the following format Columnnames for each survey Example: |v1 |v2|v3|t1 |CompanyName|v1|v2|v3|t1| Data for each person One dataset for ...
0
votes
0answers
16 views

Error creating foreign key on (check data types)

Very weird problem. I need help, I can't figure out and I don't know how to trace the specific errors in phpmyadmin. I have 2 tables and I want to create FK between them. The first table is keywords:...
0
votes
1answer
33 views

Database extensions vs migrations [on hold]

When using of database specific features (instead of 3rd party solutions) is justified, especially on the beginning stage of the project? Example: Postgres has full-text search, which do not support ...
0
votes
0answers
5 views

GridFs size limitations [on hold]

Recently my team published a service that saves documents in Gridfs. After a few weeks, we already reached 6gb and we are unable to delete old files. My question is if i have to be worried about ...
0
votes
0answers
21 views

Replication after Master down in Master-Master schema in MySql

I have set up a Master to Master replication scheme. I have 2 Master server: server A and server B. Server A is configured as follow. my.ini server-id = 1 binlog_do_db = example log-bin=mysql-...

15 30 50 per page