0
votes
0answers
3 views

mysql add a column to a number of tables

I want to add a column to a number of tables: my tables are in the format of No_tmp e.g 1_tmp .. 9999_tmp No = a number 1 - 1000 ... I want to be able to add a column to all No_tmp tables every ...
0
votes
1answer
7 views

How to disable IO timeouts

On my dev box I sometimes need to run very IO intensive queries such as index builds and CHECKDB. This can put so much load on the disk that it hardly can process anything else. This causes enormous ...
0
votes
1answer
8 views

PostgreSQL identifier cross-check returns different results for qualitatively-identical query

Setup: PostgreSQL 9.3.5 I have two tables with a common identifier (propid) that is unique in one table (property) and not unique in the second table (addressstring). There are no NULL propid in ...
0
votes
0answers
11 views

How to configure sql developer with oracle 12c?

I'm trying to connect sql developer to a fresh installation of oracle: I can connect to sys user via sqlplus I can connect to sys user via sql developer when I select Connection Type ...
0
votes
0answers
3 views

What is the difference between XtraDB and TokuDB? And why are there no comparisons?

I'm just getting into DB and doing some search on different MySQL tables. My current company's tables are all old and in MyIsam form. At first, I was going to simply convert to InnoDB, then noticed ...
0
votes
0answers
15 views

Considerations to take into account for moving a big table into another database

In our application, we a have 67 GB table ( very big compared to the rest of our tables ) and it acts almost as an archive table since its record are not modified and the ratio of read operations is ...
-3
votes
0answers
19 views

How link data - delimiter

How can I make script take mydata from mytable instead of providing values like in an example below? SO instead of set values to Code and Location link these to mycolumns in mytables? with data as ( ...
0
votes
0answers
13 views

MySQL - Database Design : Encrypting user id and creating a mask for further internal references

For a food order delivery system that I am working on, I want to make sure my user's private information is well protected; from system admins too. So I thought of coming up with this concept of ...
-1
votes
0answers
11 views

Why only one candidate can be the primary key? [duplicate]

I'm a rookie to DBMS. I have read that only one candidate key can be the primary key. Why not more than one ? Please explain with an example.
-1
votes
1answer
30 views

How to get 2-nd set of data string?

I tried that: SELECT [ConstituentID] ,ColumnName ,SUBSTRING(ColumnName, 1, CHARINDEX('/', ColumnName)-1) AS ColPart01, SUBSTRING(ColumnName, CHARINDEX('/', ColumnName) +1, 100) AS ColPartREST FROM ...
1
vote
1answer
29 views

How to split data from column to multiple columns [duplicate]

I am just starting DBA and curious about how can I split entire column with data like: "1-2/456/£25.00-26.00/56/10+". My delimiter is "/" and I need to get data in 5 columns accordingly. So data to be ...
0
votes
1answer
17 views

Oracle 12c : Unable to install sample schemata on Windows 10

I've gone through lots of trial and errors in installing the sample schemata for Oracle 12c and still can't get it right. I have a pluggable database named PDB01. I also have an instantclient ...
0
votes
0answers
13 views

Speed up SUM() on a result with JOINS in MySQL

I have a query with a combination of 6 left joins and inner joins. The query gives a result of 25000 records in 112ms. When I do a SUM() the query takes 4s. A SUM() another table with 35000 records ...
0
votes
0answers
7 views

Mysql How do I insert multiple table with duplicate key checking?

I hope to this work. When UserAccount table duplicated, Out Parameter put -1. When UserInfo table duplicated, Out Parameter put -2. When all work is succeed, Out Parameter put LAST_INSERT_ID. ...
0
votes
0answers
19 views

Hot Redundant in SQL Server [on hold]

I want to copy all data from one SQL Server database to the same structure in another SQL Server, to achieve hot redundant. Does anyone have any good suggestion to do this??
1
vote
0answers
5 views

Add index to mysql table with ndbcluster engine

I'm having trouble while adding index on mysql table with ndbcluster storage engine below is the error . [mysqlcluster ver. 7.4 GA] mysql> alter table `sks_staff_office` add index `pid_index` ...
1
vote
1answer
11 views

Optimize MySQL Query with multiple subqueries

I have the following Query: SELECT p.id AS post_id, p.status, p.user_id AS post_user_id, (SELECT pl.id FROM postlocks AS pl WHERE pl.post_id = p.id) AS postlock_id, (SELECT COUNT(rn.id) FROM ...
0
votes
0answers
25 views

Group by account_id sum(size) / Postgres 9.2

The below query shows me the account_id, size, name (File name) and also ino (File's id). WITH accounts AS ( SELECT id FROM clients WHERE NOT ( (price = 0) ...
0
votes
1answer
18 views

SQL Server Express 2014: Network Access

I have SQL Server Express running on one (virtual) machine running Windows 8.1, but I cannot connect to it from another. I have followed the instructions on ...
1
vote
0answers
10 views

How to alter replicated column

I want to change the length of a replicated column. I ran this: exec sp_articlecolumn @publication = N'DIONLINE-SQL2014' , @article = N'Valuation' , @column = N'WallConstruction' , ...
0
votes
0answers
5 views

Mongo Schema for large time series data sets

I'm not a DBA but a C# developer, my experience so far is with MS SQL, so please keep that in mind. I am trying to design a scheme to store sensor data and have it organized. Each TestRecord would ...
-1
votes
1answer
22 views

SQL Server 2014 , Login issue

hope that you all are fine i have a little login issue here as i created a new user login the SQL sever 2014 and i tried to connect to my database using this new login and the below error pops up ...
1
vote
1answer
16 views

Statement specific auditing - Oracle

I have enabled default auditing in one of my database. Oracle 11g. Audit_trail is set to DB, other than that for a particular schema 'test' I have set: audit all on test by access With the above ...
-1
votes
1answer
21 views

select columns if a column has a value

I have RegiNum and EmpNum columns in users table. If RegiNum column has a value it's considered as a student. If RegiNum is filled, I want to select Name and ID from that table. I used select ...
-1
votes
1answer
17 views

How to perform multiple checks on same column of same table in Mysql?

Table Structure : +-------+--------+-------------+------------------+---------------+----------------+ | recid | cartid | attributeid | attributevalueid | attributename | attributevalue | ...
0
votes
0answers
18 views

Query that runs lighting fast in Postgres send MySQL to 100% CPU and takes forever [on hold]

I have a query that runs against a database that an industry association puts out every month. The query is complex in that it joins together 26 tables and brings back only 15 rows from among tens of ...
-1
votes
0answers
14 views

Backup whole database including procedures

I'm using MariaDB 10.1. I backup my database using mysqldump. My stored procedure, view, function and event definitions are not backed up. How to backup full database including tables, functions, ...
0
votes
0answers
16 views

Postgresql: Windows Server 2012 R2 or SuSE Linux Enterprise Server 11 SP4

I am given the possibility to chose between Windows Server 2012 R2 and SuSE Linux Enterprise Server 11 SP4, while renting a virtual server. For the needs of the server I want to create, I wish to ...
0
votes
0answers
10 views

Connect to MySQL Webserver (not localhost)

I have a problem. And I hope someone can help me or point me in the right direction. I am working on a project and need to sync a MySQL database (running on PHPmyAdmin) with a MS SQL Server. I ...
0
votes
0answers
12 views

Copy data from one table into other on some condition

I have two table as follows. Table : city city_id city_name state_id 1 Cachar 1 2 Darrang 1 3 Nicobar 1 Table 2 : locality pincode Address ...
-1
votes
0answers
39 views

Which columns need index in recursive table and soft delete

I have a Category table like below : I have a recursive relationship on this Category table. I use soft delete in my project. I have 2000 rows in Category table. When I want to show data in a UI ...
0
votes
0answers
7 views

Recursive Conditional trigger for insert in table MYSQL

user[ user_id, parent_user_id] user_id parent_user_id 1 null 2 1 3 1 4 1 5 1 user_assigned_role [user_assigned_role_id, role_id, ...
0
votes
0answers
2 views

WSREP: Requesting state transfer failed: -11(Resource temporarily unavailable)

We have a 3 node Galera cluster. Only one node has "valid" data (gal-1). The other nodes need to sync from this node. I delete datadir and start MariaDB. 160527 14:28:20 [Note] WSREP: discarding ...
0
votes
0answers
5 views

mongodb compact does nothing - no entry in mongodb.log and nothing in db.currentOp()

We have space problems. The actual data size is only 5 GB, but disk size is 15 GB because of deleted documents. MongoDB (3.0.6) runs in docker container where we can't extend volume. # tail -f ...
0
votes
1answer
25 views

Mixed mode auditing - 12c

Oracle 12c database comes with default Unified auditing enabled even if we set it to FALSE which has ORA_SECURECONFIG policy enabled by default. Apparently, the audit options for that particular ...
0
votes
0answers
4 views

MongoDB ixscan seems to be scanning more objects than expected

I'm using MongoDB 2.6.12 and a collection has the following index {a: 1, d: -1}. In case the types matter a is a Number and d is a Timestamp. From what I can see in the code we are limiting this ...
0
votes
1answer
22 views

RMAN Overhead on the database

What is the overhead of RMAN hot backup (full backup including archive logs) being performed during business hours? Does it actually affect the performance of the database? What is the case when ...
-5
votes
1answer
36 views

Could someone explain how PHP, MySQL, SQL work together?

I feel so confused on what they are and how they work. From what I've read PHP is a server-side language. Therefore, it's a language basically designed to talk with the web server to get it to do ...
0
votes
1answer
15 views

Long queries on PostgreSQL hot standy

Is there a way to convince PostgreSQL to execute long queries on a hot standy? It kills the query with User query might have needed to see row versions that must be removed. I understand that, but I ...
0
votes
1answer
27 views

SQL PIVOT multiple columns [duplicate]

so this: so I need: any suggestions?
-1
votes
0answers
16 views

Update column with different value for multiple rows [on hold]

I often find myself using excel to create update queries. When I need to update multiple rows with different values for a column, I simply use excel to create the update queries (multiple). Here's ...
1
vote
1answer
22 views

Why doesn't Oracle show my privileges?

I have a user that is able to drop, alter, create tables and indexes. But when I list the privileges for my Oracle user it does not show any CREATE TABLE or other such privileges. How am I able to do ...
0
votes
1answer
18 views

How to export own objects using expdp without special privileges?

As per this post on Oracle forums expdp can be used to export your own schema without any special privileges: It all depends on what you want that user to be able to export/import. If all that ...
0
votes
1answer
15 views

PostgreSQL vs MariaDb On Read/Write when table has about 200M Rows [on hold]

I want to build a new web application with my collected data, but I don't know witch DBMS is best choose for my Project, MariaDB or PostgreSQL there is 2 table : categories and data more than 200 ...
0
votes
1answer
15 views

Migrating differential backup restoration

Good afternoon, A little back story about what I'm trying to do: I'm migrating a database environment from one SQL server to another. A simple full backup/restore works fine, but there's a ...
-1
votes
1answer
33 views

Singe database account for all users [on hold]

Welcome everyone, I'm wondering if one common database account for all users of web application is enough or I should create database account for each user in order to carry out some querying? Can ...
0
votes
0answers
17 views

PostgresSql - Flattening nested JSON arrays

Interesting problem trying to query nested arrays stored in JSON... Context I'm using PostGreSQL and Heroku Dataclips to navigate some data I'm pulling from a server. After doing some reading, I ...
-1
votes
0answers
15 views

Grant access schema to user [on hold]

Getting error while writing the following query SQL>grant select, insert, update, alter, delete on schema::schema_name to user; showing as missing keyword –
0
votes
2answers
33 views

Multiple SQL Server instance install question for AlwaysOn

I have a 2 node WSFC cluster with SQL Server 2014 installed on each for AlwaysOn. This is working fine. My question is can I install another instance of SQL Server 2014 on these nodes for another ...
4
votes
3answers
42 views

Clustered Index Scan when using greater than in WHERE clause

I have the following table create table t1( col1 varchar(255) NOT NULL, col2 varchar(255) NULL, col3 bigint NULL, CONSTRAINT PK_t1 PRIMARY KEY CLUSTERED ( col1 asc ) ) CREATE NONCLUSTERED INDEX ...

15 30 50 per page