0
votes
0answers
7 views

Do Queries on a MySQL Federated table lock the remote table?

We are trying to use Federated tables as an experiment where a remote server copies from the Federated tables to a local db with OLAP designed tables. My question is whether the SELECT queries on the ...
3
votes
1answer
249 views

Can see other user's databases in shared hosting

This looks like a security concern but I do not know enough about SQL Server to know. Using a shared hosting service, if I go to restore a database I'm able to see other user's databases. I'm not ...
0
votes
0answers
17 views

Choose Database for financial application. Mongo DB or RDBMS [on hold]

I am converting Excel financial application (dealing with stocks) into web application. I am confused which database I use Relational Database or NoSQL. I will update daily 30K rows from api, also ...
0
votes
0answers
14 views

network Adapter could not establish the connection in netbeans with oracle11g in linux

I am using fedora 23 64 bit. My system is up to date. I have installed oracle 11g xe. I have downloaded the jdbc driver 'ojdbc6" , now i am trying to connect netbeans with the oracle database but it ...
0
votes
1answer
27 views

See if an JSON array in MySQL contains an object whose key holds a specific date

i'm trying to find out if there is a row which contains a specific date inside an JSON array Lets say my data looks like this: Table `applications`: id | application_id | data # Rows 1 | 1 | ...
0
votes
0answers
12 views

Upgrading to MySQL 5.5 from 5.0 looks broken

I was using SLES SP3, and had earlier MySQL 5.0.67. I upgraded it to 5.5.48 (available with the CD) after upgrading my OS to SP4. I edited the /etc/my.cnf file, and replaced skip-locking to ...
0
votes
2answers
12 views

How can I sum values of one columns based on the distinctness of another column in PostgreSQL?

I have a table me id | name | type ----+--------+------ 1 | Ali | a 1 | Sami | a 3 | Kamil | c 3 | Imran | c 2 | Wali | b 4 | Yousuf | d 5 | Kamran | e ...
0
votes
1answer
30 views

List of queries run

I'm looking for a DMV query for SQL Server 2008 R2 which shows me all queries (full history) run by a specific user. I have this code for now: SELECT * FROM sys.dm_exec_query_stats qs CROSS APPLY ...
0
votes
0answers
6 views

How password can be prompted in percona xtrabackup

How password can be prompted while using percona xtrabackup.--ask-pass option is not working with xtrabackup. Thanks in advance.
-1
votes
1answer
15 views

What is considered as a document in mongoDB?

I have been learning MongoDB for the past two days and I've been confused with documents and their limits, and how to overcome the limits. What is a difference between documents and collection?
0
votes
0answers
22 views

MySQL replication/cluster of multiple databases

I looking for a suitable MySQL replication technology. I'll try to explain our use case first. We have several applications: - 1 public web application - multiple customized enterprise web ...
0
votes
0answers
2 views

In PostgreSQL, can you read from an index during a ALTER INDEX … SET TABLESPACE operation?

I have a PostgreSQL 9.3 server, and there's a large index that I want to move to another tablespace on another disk, because I want to free up space on the original disk. However this is a production ...
0
votes
0answers
15 views

Creating mini postgresql dump

My production postgresql database is about 70GB now . so i want to create a mini database dump from it so i could restore it on the development environment for testing purposes . any ideas ?
0
votes
0answers
13 views

Can redo logs contain all the transactions committed or uncommitted? [on hold]

Can redo logs of Oracle database server contain all the transactions committed or uncommitted ? thank you
0
votes
0answers
4 views

MySQL master- master replication

I am in the process of setting up Master - Master replication between 2 servers on a production environment. My settings are as follows, Existing System: Server 1: Status: Master databases: db1, ...
1
vote
1answer
20 views

Display dates not in ascending for To_Char

can i know why and how i can solve the problem whereby if i use To_Char it does not sort the date in ascending. Below is my code select distinct To_Char (attendance_Date, 'dd/mm/yyyy') from ...
1
vote
1answer
24 views

Using SQLCMD with Variables

Im trying to do some general script that i can use to run the same INSERT/UPDATE or DELETE statements on different site databases. This was my first attempt which works just fine, but i have to copy ...
1
vote
1answer
12 views

mysql replication: slave is not getting data from master

here is my problem that all setup is done for mysql replication but the slave is unable to sync the master's data. to understand i am sharing link below please visit. mysql> SHOW SLAVE STATUS \G; ...
-2
votes
0answers
10 views

show invalid object name [on hold]

when this code runs on mysql database then fine but when this code run on sql server that showing error com.microsoft sql server exception invalid object name... private void ...
0
votes
1answer
19 views

Get data from previous years dynamically

I have a table with columns id, fname, date_field. date_field's records are: 2011-03-01 2012-03-01 2013-03-01 2014-03-01 2015-03-01 2016-03-01 I want the data for the past 2 years for each record ...
1
vote
2answers
21 views

Optimizing PostgreSQL with Index

I'm having a hard time trying to get PostgreSQL to use an index that I created. I understand that PostgreSQL is smart enough to determine when an index should be used because in most cases a seq scan ...
0
votes
1answer
9 views

What is the impact of DROP SCHEMA on concurrent read only workloads in PostgreSQL?

I have an ELT process that deals with a pretty small amount of data. I would like to have 1 schema called prod with the results of the previous ELT run and 1 schema called dev where I will perform the ...
1
vote
1answer
18 views

index creation - Slow Query - PostgreSQL 9.2

I've got the following query: SELECT * FROM ( SELECT split_part(full_path, '/', 4)::INT AS account_id, split_part(full_path, '/', 6)::INT AS note_id, split_part(full_path, '/', 9)::TEXT ...
-1
votes
2answers
20 views

Capitalize only the first letter of a name

I have a table Vendors that contains a column VendorContactFname, which is written in lowercase. I want to capitalize only its first letter. I am thinking of concatenating an Upper on the first ...
2
votes
1answer
22 views

Relating 2 tables with possible wildcards?

I am having trouble getting the desired results when trying to relate the following tables. NULL in the following table essentially means that if it is not an exact match with another row then choose ...
1
vote
1answer
27 views

Duplicate key value violates a unique constraint

I've been looking at other posts. It seems many people have had this problem, but I'm somewhat new to Postgres and tried other solutions with no luck. I have ny_stations table: CREATE TABLE ...
1
vote
1answer
32 views

How can I dump all tables to CSV for a PostgreSQL schema?

I have a database with a lot of schemas in it and I want to dump the each of the table contents to CSV. I'm aware of the COPY command but I'm not sure how to script something that will read all of ...
0
votes
0answers
14 views

Create update Trigger

I'm trying to create a trigger that whenever a software package is installed on a PC, the person who installed the software needs to provide data for pack, tagnum, and instdate, and the softcost field ...
0
votes
1answer
20 views

Can mirror and witness have same port number?

When configuring database mirroring, the mirror and the witness have generated the same port number. When I hit next, it errors out with: End points for instances for the same server must use ...
1
vote
0answers
12 views

Wildcard in CREATE grant in MySQL

MySQL allows the use of wildcards for database names, in order to allow an user to operate only on a subset of databases: GRANT ALL PRIVILEGES ON `foobar%`.* TO 'user'@'%' IDENTIFIED BY ...
1
vote
0answers
11 views

Profiling postgres with gprof: no data/gprof folder and 'no time accumulated'

I'm attempting to profile Postgres with gprof. A gmon.out file successfully gets created in both the data directory and in the working directory where I launched the client (pgbench) process from. ...
2
votes
1answer
45 views

Query with Indexes slower than without Indexes

I'm using MySQL 5.6 and my storage engine is InnoDB. I have a table with 1 million rows containing with the columns: ID (primary key) FirstName LastName foreign_key_id (foreign key, NOT NULL) ...
1
vote
0answers
9 views

MySQL Error 111 caused by remote connection

This database has been running for years, such that all connections have came from the localhost address. Recently, I have been using xampp to develop new software, and have been connecting to the ...
1
vote
1answer
28 views

Attach corrupted database

In a little C# tool, I use an a mdf file to save my data. The file became inconsistent, which isn't really a problem as there only a few changes since my last backup. Anyway, I would still like to ...
-1
votes
0answers
7 views

Getting error 1005(HY000) cant create table in MYsql [on hold]

I tried to create the below three tables: CREATE TABLE category ( cat_id INT NOT NULL AUTO_INCREMENT, cat_name varchar(100), PRIMARY KEY(cat_id), UNIQUE(cat_name) ); create table product ( ...
3
votes
1answer
28 views

Security concerns on SMTP in SQL Server

In my company, while I try to get the ports opened to connect to my SMTP server from my SQL Server running on Windows Server 2012, I get a reply saying that it is a security concern to open ports ...
0
votes
0answers
5 views

Find chunk_id for given record in Postgres

Is there a way to find details of the TOAST pointer for given row and column in Postgres (8.3)? Especially the chunk_id?
0
votes
0answers
12 views

MySQL Database delay [on hold]

I've made my TV into a clock using PHP, a dedicated machine, and recently am adding MySQL to the equation to allow editing the settings from my phone. I've gotten this working, however, there is an ...
-1
votes
0answers
14 views

error in parallel query execution-single row subquery returns multiple rows [on hold]

I am getting the error "error in parallel query execution-single row subquery returns multiple rows " sometimes while executing an sql query, while most of the times the same query runs without any ...
1
vote
1answer
24 views

sql getting sum of calculated columns

How can I get the sum of TotalAmount as single value for example Product Name UnitPrice Quantity Discount% Amount SharingCost% ShippingCost CustomsCost TotalAmount pro1 ...
0
votes
1answer
8 views

A different number of AFTER INSERT trigger alarms in SQLite and SQL Server

I have trigger CREATE TRIGGER [Foo] AFTER INSERT ON [Bar] BEGIN UPDATE Log SET count = count + 1; END When i execute query insert into Bar (ColumnName) values ('SomeValue1'), ('SomeValue2'), ...
1
vote
1answer
23 views

Tricky condition for PostgreSQL UPDATE query

I need help with a PostgreSQL query. I have a Django app + pg backend, where users post interesting URLs (or links) and can then comment under such links (called replies). There are two pg tables to ...
5
votes
2answers
231 views

Are cursors/While loops the only way to make administrative changes to multiple databases?

I specifically want a programmable way to change the recovery model of all the databases on a server, and i know this solution can be applied to all 'Alter Database' commands. While I know SMO in ...
0
votes
2answers
23 views

Using Select Statement to get column name and table name from the same table

I have a table containing 2 Columns : Column1 (table_name) and column2 (column_name) like this : (Column 1) (Column 2) |Column_Name | Table_Name | -------------|------------| ...
0
votes
0answers
12 views

MariaDB shows crashed and PID/Program Name shows -

I have setup alpine linux 3.3 on ubuntu 16.04 as a container using lxc/lxd and setting up mariadb. I am done with the installation and all. When I check for the status of mariadb, it shows crashed ...
1
vote
1answer
22 views

Select rows until a condition is met

Given: CREATE TABLE T ( x int not null primary key , y int not null ); INSERT T(x,y) VALUES (1, 0) ,(2, 0) ,(3, 0) ,(4, 0) ,(5, 3) ,(6, 0) ,(7, 4) ,(8, 0) ,(9, 0); The ...
-3
votes
0answers
12 views

3NF For a Weak Entity with no non-Key attributes

Can a weak entity made with no non-key attributes be in 3NF? I'm making a db for an assignment, and I currently am struggling to figure this out, especially since I've introduced auto-increment ...
0
votes
0answers
9 views

Windows 7 service manager thinks postgresql 9.4 is stopped, but database is up

I have several machines running postgresql 9.4 on windows 7. The database is configured to start automatically after a reboot, and it seems to start ok. pgadmin is accessible, and I can run queries ...
0
votes
1answer
50 views

MySQL Query fix and speed up

I'm newish to MySQL and a lot of my query is pieced together from this site and trial and error, so any help is appreciated. If I left out anything, or more detail is needed, I will be happy to give ...
0
votes
0answers
8 views

T-SQL to MySQL conversion for PIVOT [duplicate]

I made a garbage table with garbage data and a PIVOT on it in T-SQL format and I would like to convert it into MySQL but I can't figure out how to get it to work. Table and data: CREATE TABLE ...

15 30 50 per page