2
votes
2answers
16 views

Geo localized database RTREE

I'm using MYSQL V5.6.24 GPL I have a database with 200K rows and growing and I'm trying to get the nearest, based on points. I have all the database in InooDB, and to use Spatial data, I create one ...
0
votes
0answers
12 views

How to do updates on all rows at every button click [migrated]

I have a python app that has an admin dashboard. There I have a button called "Update DB". (The app uses MySQL and SQLAlchemy) Once it's clicked it makes an API call and gets a list of data and ...
0
votes
1answer
23 views

Sumed all which has been summed [duplicate]

Is it possible to sum all row which has been summed? For instance I have this query: SELECT SUM(registered) AS `totalOftheDay` FROM table WHERE DATE(ds.register_time) BETWEEN '2015-03-01 ...
2
votes
2answers
168 views

MySQL - How to check whether all values of a given SELECTed row are equals? [on hold]

Using MySQL, how can i SELECT all rows whose values are equals ? For instance, suppose a SELECT of a given table as follows COLUMN_A COLUMN_B COLUMN_C ... COLUMN_N 1 2 4 ...
-2
votes
1answer
34 views

Design database for tournaments

I'm looking around since few days on how should I build my database to support full flexible tournaments. Let me explain my specs. As a user I want to : Create a tournament Let other users register ...
2
votes
1answer
35 views

Help understanding discrepency between sys.dm_exec_cached_plans and dm_os_memory_clerks

We've got a strange discrepancy on one of our SQL Server 2014 instances between the amount of memory being used for cached plans as per sys.dm_exec_cached_plans and the amount of memory used as per ...
0
votes
1answer
21 views

how can I see the arguments passed to a stored proc on Azure?

The query that I'm using: SELECT deqs.execution_count, deqs.last_execution_time, dest.objectid, SUBSTRING(dest.[text], (deqs.statement_start_offset/2)+1, ...
0
votes
1answer
16 views

Student Attendance, null not returning [on hold]

My question is based on the answer given here Attendance: id | student_id | date | ------------------------------ 1 | 2 | 2013-10-24 | Students: student_id | student_name | ...
1
vote
0answers
8 views

Will SSRS User rights be over-ridden by Windows account?

If a Reporting Services user group has all rights on SRS Report Server folder, and one of the group member's Windows Account has been added to the folder with Browse only, will SQL server cause that ...
1
vote
0answers
31 views

Oracle: built in SQL pretty-print?

Oracle has some packages that will dump objects in SQL format, such as dbms_metadata.set_transform_param. One option that can be set is to "pretty print" the SQL. Is there anything in Oracle that ...
0
votes
1answer
12 views

sub and sub-sub item organization system [duplicate]

So I am looking to find the best database design for the following situation. I will refer to my entities as 'articles' as that would best/most-easily describe them. So the articles have already ...
0
votes
2answers
80 views

Storing IP addresses - varchar(45) vs varbinary(16)

I am going to create a table with two fields - ID as BIGINT and IPAddress as either varchar(45) or varbinary(16). The idea is to store all unique IP addresses and use a reference ID instead the actual ...
2
votes
2answers
67 views

How to interpret correlated subqueries?

EDIT: Both answers are great but I think I must clarify my question. NOTE: I must indicate that in the following, by executed, I mean logically. I understand that the actual execution made by the ...
0
votes
1answer
24 views

How to grant insert in a table that is in another database on SQL Server 2008 R2?

On SQLServer 2008 R2 I have 2 schemas: DatabaseA and DatabaseB. On DatabaseB I have a table named TableB. Whenever tableB is updated, a trigger will insert a value in the tableA (that is on ...
1
vote
1answer
32 views

postgresql bdr - adding another downstream server only partially works

I have the following postgresql 9.4 bdr setup: upstream server with db called "bdrdemo" running on 10.1.1.1 downstream server(1) with db called bdrdemo running on 10.2.2.2 (replicates with ...
-3
votes
0answers
30 views

Whats is the maximum size a relational database can handle before considering switching to a NoSQL database [on hold]

Whats is the maximum size a relational database can handle before considering switching to a NoSQL database? How much oracle with partition can store? What should I consider in my analysis?
0
votes
1answer
11 views

Gotchas converting latin1_swedish_ci to utf8mb4_unicode_ci

I have a MySQL 5.5.31 database which has approx 220 tables - of these 220 tables, around half of them are already using utf8mb4_unicode_ci but the "older" tables are still using latin1_swedish_ci. The ...
0
votes
0answers
18 views

Exporting MySql database using jdbc code

I've created a GUI application in java. Where I've created a database name StudentDb and table student_db. I want to export this database in such a file format using java code that when I'll take this ...
0
votes
1answer
25 views

XACT_ABORT ON not working as expected on SQL Server 2012?

It looks like XACT_ABORT ON is not working as expected. Here are a table and a procedure that inserts into it: CREATE TABLE rain ( rain_time DATETIME , location VARCHAR(100) ); GO ...
1
vote
0answers
44 views

SQL Server inserted/deleted tables [on hold]

I have the following logic flow Start transaction insert record 1 into table1 insert record 2 into table1 insert record 3 into table1 commit transaction I have a trigger on table1 that is using ...
-4
votes
0answers
17 views

stored procedure not working

i am running this one on mysql phpmyadmin. DROP PROCEDURE `gettree`// CREATE DEFINER=`root`@`localhost` PROCEDURE `gettree`(in team_id bigint) BEGIN declare count bigint; declare tmp_team_id ...
2
votes
2answers
36 views

Sampling in PostgreSQL

I am looking for possible ways of random sampling in PostgreSQL. I found a couple of methods to do that with different advantages and disadvantages. The naive way to do that is: select * from ...
-1
votes
0answers
17 views

Warm Standby Using Point-In-Time Recovery (PITR) - Was it sucessful?

I've set up a warm standby for a postgres 8.3 production server. I've followed the procedure here: http://www.postgresql.org/docs/8.3/static/warm-standby.html Installed the standby with the same ...
0
votes
1answer
11 views

SQL Server Full txt Search - Thesaurus Entries

I'm thinking of adding a full text search to our product (currently using SQL 2005 Enterprise), so just doing some preliminary research. I read that you can add thesaurus entries, so "Internet ...
1
vote
1answer
34 views

updating same column as in the select query

When I try to do this, I get an error saying I cannot use the same table in where select as the column that I am updating. UPDATE table_name SET quantity = 19 WHERE productID = 148357 ...
1
vote
1answer
39 views

Can't connect to new instance of SQL Server

I was trying to upgrade to SQL Server 2014 from SQL Server 2012, but I kept getting a failure on one of the pre-installation checks saying that I needed to have SP1 or later installed for SQL Server ...
0
votes
1answer
43 views

Subtract next row's datetime with current row's datetime based on condition

It might sound complex - I think it is. I have an output like this: | EmployeeID| DateAndTime | Type | AbsenceID | DateEntered | LastModifiedDate | minutes | DN | | ...
-2
votes
0answers
28 views

How to check state of oracle databse [on hold]

I have error during starting database - corrupted file. I want to chcek state of database if its mount or nomount. V$database open_mode is not avaiable because db is not open. My db is 11.2.
1
vote
0answers
63 views

How is the B-Tree created for a composite PK?

This is a theoretical question in regards to how SQL Server stores the data for a table that has a clustered index over two columns (both columns form a PK). Consider a table with columns PersonID, ...
0
votes
1answer
40 views

Oracle 11.2 restore DB to a specific point

I should execute following tasks: 1. test system and during test change Oracle data and Create New/Remove Old datafiles and tablespace. 2. at the end of test rollback to behviour before of point 1. ...
-1
votes
0answers
31 views

Why connection in sqldeveloper to machine in the same network fails? [on hold]

I have windows machine with Oracle DB XE 11.2. When I start sqldeveloper on the other windows machine, use the same credentials and put as hostname ip of machine with DB, sqldeveloper cannot ...
0
votes
0answers
34 views

Slow running Oracle query caused by unnecessary full table scan

I'm by no means an expert with Oracle, but I know enough in terms of how to analyze explain plans and perform basic optimizations. However, this time, Oracle has stumped me with it's explain plan. ...
0
votes
0answers
33 views

Kerberos and Linked Server

I have been reading through past posts but I am still getting issues with 2 SQL servers connecting using a linked server when querying from a 3rd SQL server. I constantly get the error "Login failed ...
5
votes
2answers
129 views

Hindrance in TSQL SVF Call

I have a simply Products data table with 100k records (just generates some random data): set nocount on create table dbo.temp_Products ( [ProductID] int, [Type] tinyint, [Price] float, ...
-3
votes
0answers
27 views

Please help on “PostgreSQL installation checklist” [on hold]

This task is regarding developing a shell script on checking-up the PostgreSQL installation. I lack expertise in doing shell scripting. So, can you please help me in developing this task please. ...
-1
votes
1answer
15 views

Query issue for login page in asp.net? [on hold]

I would like to create a simple login page in asp.net. here is my code: protected void Button1_Click(object sender, EventArgs e) { SqlConnection conn = new SqlConnection(); ...
0
votes
1answer
41 views

SQL update multiple columns matching a pattern

I have a table in a postgresql database in which I have multiple columns matching a pattern /\w*(?:_open|_close)/g. Those are timefields. I would like to substract 1 hour from all the rows on those ...
-5
votes
0answers
27 views

Why use NoSQL for key-value store, and not the filesystem? [on hold]

Suppose I have a local application that doesnt need concurrent access, is there any reason to prefer NoSQL over just using the filesystem for simple key-value get/put operations? Because NTFS and ...
0
votes
0answers
34 views

Script to automatically Identify tablespaces above threshold and bring it back to below threshold value

I am facing all the tablespaces crossing threshold problem in all most all the databases we have in our environment. Because of this much manual effort is been needed. I am able to identify the ...
0
votes
1answer
45 views

What will be best (for performance) transaction isolation level?

There, are two types of queries that are executed in my app: DELETE FROM tbl1 WHERE user_id = 1; INSERT INTO tbl1 VALUES (...), (...), ...; and UPDATE tbl2 WHERE id = 1 SET ...; DELETE FROM tbl3 ...
0
votes
1answer
35 views

Stack trace of oracle sql execution

Is there a way to get the stack trace of the SQL query that is given in awr, I mean a way to check the flow of the query from which package or procedure that it has been triggered? tkprof and awr both ...
0
votes
0answers
13 views

Best way to insert html content into clob column in oracle [on hold]

I want to write a stored procedure to save html content into clob column of a table. sample html text below: <p font style='font-size:12px;' face='Arial'> Last modified: April 30, 2014 (<a ...
-5
votes
0answers
19 views

A Simple replication Code step by step [on hold]

Simple Replication Code to work in Command Prompt. Please explain step by step. I dont have idea .
-2
votes
0answers
19 views

Simple Mongo DB replication

I need to get things done, quick and fast and now. Later on, down the road, say in a month or less, or more, I will want to have my database replicated in few more machines. I wonder, if I can ...
0
votes
0answers
11 views

Releasing space after deleting datafiles

I'm deleting old backup tablespaces with option using contents and datafiles in TOAD. Datafiles were deleted, but no space was released: Filesystem GB blocks Free %Used Iused %Iused ...
0
votes
0answers
31 views

lock request time out period exceeded. When revoking db_owner access

I am trying to revoke db_owner access of an user and I am getting this below error! I have no active transactions User (whom I want to revoke access) is not connected to any db DataBase owner is ...
3
votes
2answers
135 views

Have: Postgres database files. Need: Functioning database

I am running Ubuntu 14.04 with a postgres/postgis setup and in a weak moment removed PostgreSQL 9.1 (seemingly a legacy install from 12.04 from before I upgraded to 14.04), having erroneously ...
0
votes
0answers
15 views

Mongodb 3.0.1 in ubuntu starts but status, stop or restart show 'mongo stop/waiting'

I am relatively new to Mongo and have installed 3.0.1 on a Digital Ocean droplet (Ubuntu 14.04 LTS). The database starts without problems but I am unable to 'sudo service mongod [stop/restart/status]' ...
0
votes
0answers
14 views

Multiple Distributors in SQL Server Replication

Per this article, a Publisher can only have one remote Distributor in doing SQL Server Transactional Replication. Each Publisher can be assigned to only a single Distributor instance, but multiple ...
0
votes
1answer
25 views

InnoDB Table has backed up INSERT and UPDATE queries, high CPU

I am running an MySQL DB with all InnoDB tables. I often have many queries backed up for the same table when I run SHOW PROCESSLIST; Basically, I keep a table of every logged in customer and update ...

15 30 50 per page