0
votes
0answers
10 views

INFORMIX error on running a Java program

I have been trying to connect to an Informix database using a small program written in Java. The program is working nicely on one of the Informix test servers but running on one of the production ...
0
votes
0answers
38 views

Store and work with current state of database [on hold]

I have a database with product, resource and planning data. The idea is to create a copy of the current data (just a part of the whole database) and then do some kind of planning-poker with the ...
0
votes
1answer
13 views

Connecting SQL Anywhere with Sybase database file on local computer

I have installed SQL Anywhere 12 in my system. I have a .db file in my computer. I have no idea what is it's username and password. If I try to connect to it by providing credentials- username=DBA ...
0
votes
0answers
18 views

Group st_size by account_id - PostgreSQL 9.2

I've got the following query: CREATE TABLE junk.results AS WITH accounts AS ( SELECT id FROM public.ja_clients WHERE NOT ( (last_sub_pay > EXTRACT('epoch' FROM now() - ...
1
vote
2answers
111 views

Consideration for a little bit heavy database

Environment information OS : Windows Server 2012 R2 ( 64bit ) RAM : 16.00GB CPU : Intel(R) Xeon(R) CPU E5-2609 @ 2.40GHz SQL : Windows SQL Server 2012 Standard Brief Database Data Information ...
2
votes
0answers
23 views

Plan cache size and reserved memory

When running a query including the Actual Execution Plan, the root operator (SELECT) tells that the Cached Plan Size is 32Kb. A query that joins sys.dm_exec_cached_plans and sys.dm_os_memory_objects, ...
5
votes
2answers
74 views

Azure Data warehouse - User defined function issues

Anyone here had luck with creating and using UDFs on Azure data warehouse database? I am in the middle of migrating an on-prem warehouse from SQL Server 2014 to Azure datawarehouse and I ran into an ...
0
votes
0answers
27 views

DB design: Store data VS more complex DB changes

This is my current DB structure. -- -- Table structure for table `prods` -- CREATE TABLE `prods` ( `prod_id` int(11) NOT NULL, `prod_name` varchar(255) NOT NULL, `prod_aaa_id` varchar(255) ...
-1
votes
0answers
17 views

how can I show all elements [duplicate]

Hey guys I have a probleme at showing all elements informations .. I have a formulaire where i add elements and quantities, then i calculate the total price orderer by the Id. the probleme is that ...
1
vote
1answer
51 views

How do I find the cumulative distance between geometry points in SQL Server 2014?

I have a database designed to be a proof of concept for delivery of products from a central depot to customers distributed at random locations within ten miles of the depot. The depot location is ...
2
votes
1answer
77 views

Estimate result size of Natural Join

I have the following tables R1(A, B, C) with 1.000 rows R2(C, D, E) with 1.500 rows R3(E, F) with 750 rows where a bold letter denotes a primary key. I need to estimate the number of rows of the ...
2
votes
0answers
31 views

Slow Postgresql query with left join

I have a query on Postgres, and I also have added proper index. Is there anything missing here? SELECT orders.*, demo.name as d_name FROM orders LEFT JOIN users as demo ON demo.id = orders.dr_id ...
1
vote
1answer
41 views

How big is my oracle database?

I need to determine the total size of an oracle database. Ideas on improving the following query? SELECT 'DataFiles: ' AS TYPE, SUM (bytes / 1024 / 1024) AS MB FROM dba_data_files UNION SELECT ...
1
vote
1answer
27 views

Split databases into groups of roughly equal datasize

I am trying to split all databases from sys.databases into 7 roughly equally sized Groups based on data ROWS size. I want a table that contains every database and these databases are in 7 different ...
0
votes
2answers
20 views

Unique pair checking query improving in pivot table

First of all, I have a solution, but I do not know that query can be transformed to uses join or to more effective query. I just want to improve my skill. I have seen an example online. So I have a ...
0
votes
0answers
12 views

$ sign showing in fields [on hold]

I am working on my SQL for university, I have managed to save data from PHP to SQL but on retrieving the data there is $ sign in some fields and what I did not understand how come out of 2 same fields ...
0
votes
0answers
37 views

SQL Server CPU 99%

On a Windows Server 2003, I have a database running SQL Server 2008 R2. When the SQL Server service is running the CPU hits 99%. If I stop it, the CPU load goes normal (between 5 to 20%). I backup ...
3
votes
1answer
36 views

Splitting a table with large columns for performance?

I am working on a system that stores images in its database (SQL Server 2014) using the varbinary datatype. The table looks like this (extra columns removed for brevity): | ImageDataId | DateUploaded ...
11
votes
1answer
136 views

SQL Server: How to track progress of CREATE INDEX command?

SQL Server 2014, Std Ed I have read that percent_complete in dm_exec_requests does not work for CREATE INDEX, and in practice, percent_complete sticks at 0. So that doesn't help. I currently use the ...
3
votes
0answers
22 views

How to assign 'findandmodify' privilege to a mongo user?

I'm running a Mongo 2.6 replica instance where a node application needs to talk to. Basically nothing much was setup except these parameters: # where to write logging data. systemLog: destination: ...
0
votes
1answer
15 views

Catching two error messages/Throw into table

My goal is to catch errors from backup jobs into monitoring table. The problem is, that there are cases that backup statement returns more than one error, so ERROR_MESSAGE() is not enough: Msg ...
-3
votes
0answers
39 views

What functions should I use to display data like that?

What functions in SQL Server 2012 should I use to achieve the result as shown below?
4
votes
1answer
55 views

Is it possible to create a dynamic join?

I'm using PostgreSQL if it matters. Assuming these two tables: id | run ----+------- 1 | run_1 2 | run_2 3 | run_3 and sample | elapsed | run -------+---------+------- samp1 | 1:09 ...
-3
votes
0answers
42 views

Total newbie here: I've downloaded mysql-5.7.12-win32.zip - now what? [on hold]

I've just opened an SQL manual, so it's a dumb question. But please, can you tell me what I am doing wrong? I've downloaded mysql-5.7.12-win32.zip - to actually learn by doing... And it's downloaded ...
0
votes
0answers
41 views

Goals for Future Database Systems [on hold]

What are the features that you would like to see in future database systems ? What are some of the complicated tasks that you need to perform in current database systems that could be simplified by a ...
0
votes
1answer
8 views

customize permission in Cassandra

i want to grant user update permission in Table and deny delete permission for this user. Is there any way to accomplish this?
1
vote
2answers
13 views

Invoke --data-checksums using pg_createcluster on Ubuntu 14.04

How do you pass the initdb argument for data checksums to pg_createcluster when creating the initial cluster? Passing the argument as per initdb fails for me: pg_createcluster --data-checksums ...
1
vote
0answers
12 views

Width in Postgres EXPLAIN?

Explain plan in Postgres has width, which (per docs) is: Estimated average width of rows output by this plan node (in bytes). My question: when will width be 0? Because in examples from docs, it ...
1
vote
0answers
8 views

FATAL: role “MYUSERNAME” does not exist

I am new to psql and am trying to set it up using the Postgres.app site on my Mac. After installation and opening psql, this is the message I get: Last login: Sat May 21 07:10:21 on ttys000 ...
-1
votes
0answers
12 views

Ranking function when ties are averaged [on hold]

I am looking for a ranking function that averages ties rather than repeats them in MySQL.
1
vote
1answer
71 views

How to find High CPU queries

CPU utilization is very high and the SQL Server process is consuming a lot of CPU. We have run few queries and notice that there are a few SPIDs taking a long time to complete and these queries may be ...
0
votes
0answers
38 views

how to optimize individual insert-if-not-exist on large table with unique varchar

I am in the process of building a bunch of tables and pivot tables from a single large table containing 1.4m rows (from the OMDB project's monthly dump) The dump contains rows that include things ...
3
votes
1answer
41 views

Slave DB promoted as Master DB when Master DB is down. New data added on the new master while old master is down

I am currently setting up a call center system (Vicidial) having a Master DB and a Slave DB. When the Master would go down, I have made a script on the SlaveDB that would execute "stop slave" on the ...
1
vote
0answers
29 views

howto read/interpret “show engine innodb mutex” output?

We use a 3 node Galera cluster with version 5.5.41-MariaDB-wsrep MariaDB [(none)]> show engine innodb mutex; +--------+---------------------------------+------------------+ | Type | Name ...
1
vote
1answer
29 views

why I can't set oracle sessions value = 35?

I want to simulate the error "ORA-00018.Maximum number of sessions exceed",so I want to limit sessions = 35 and I am going to open serverl sqlplus to simulate this error,but sessions number didnt ...
0
votes
2answers
30 views

SQL Server Standard License over written because of Report Builder Evaluation version

A colleague of mine rang me today to told me that on one of our servers the SQL Server has stopped working. If he tries to run the management studio it throws and error saying The evaluation period ...
0
votes
0answers
63 views

select * from table where column contains “string”?

I'm trying to pull rows of data that contain a word or string from a column. Example: Col1 dog cat mouse cat dog mouse mouse dog rabbit So, I want it to pull * of data that contain the word ...
0
votes
0answers
20 views

SQL Server 2014 Standard Max Memory vs. Cluster Shared Volume Cache

Deploying a new two node SQL Server 2014 FCI with Storage Spaces on a local (Cluster Shared Volume) CSV—JBOD will be attached directly to both SQL Server machines and the storage will not be tiered. ...
1
vote
0answers
25 views

SQL Server Transactional Replication and Security Setup

I am new to SQL Server replication. I was able to setup transactional replication successfully, but I feel like I am missing some important concepts regarding security and accounts. I have a few basic ...
0
votes
0answers
43 views

Indexes and performance

I am wondering about the best way to design indexes. For Example i have this table CREATE TABLE [dbo].[CoursePrerequisiteAssignment]( [Id] [int] IDENTITY(1,1) NOT FOR REPLICATION NOT NULL, ...
6
votes
2answers
224 views

Same code in multiple stored procedures

I recently joined a company, and I just noticed that many of the stored procedures have the same section of code repeated throughout. I noticed because I was tasked with changing a small section of ...
0
votes
1answer
36 views

Date Conversion error

This is just an example: SELECT * FROM A.B where B_DATE='19-05-2016 12.00.00.000000000 AM'; I always get an error: Msg 241, Level 16, State 1, Line 1 Conversion failed when converting date ...
0
votes
1answer
47 views

Error 1236 - “Could not find first log file name in binary log index file”

Our setup: Master: MariaDB 10.0.21 Slave: MariaDB 10.0.17 Replication was working fine until recently at which point the slave's DBs had to be restored from a dump. I performed all of the ...
0
votes
0answers
24 views

Is there a public dataset that contains the most commonly used fake email addresses? [on hold]

I have a table in Microsoft Access with user data. Some of these users enter in fake emails like "no@noemail.com" or "none@none.com". I need to scrub these types of email addresses so that we only ...
0
votes
1answer
26 views

How does Checkpoint know which point to recover from in PostgreSQL?

I'm trying to better understand Checkpoint internals, specifically in PostgreSQL. My current understanding is that Crash Recovery will always start from the latest REDO location that is marked when a ...
0
votes
0answers
37 views

DBCC CheckDB - summary poses confusion

I have a .BAT script that runs the DBCC CheckDB and repairs the database if needed. And returns a message to the user based on the results using "errorlevel 1" The problem I'm seeing is that when ...
0
votes
0answers
29 views

Building MySQL InnoDB clustered indexes

Assuming that you have a table like CREATE TABLE `t1` ( `search_id` int(11) NOT NULL, `provider_id` bigint(20) unsigned NOT NULL, `status` text NOT NULL, `imported_at` int(11) NOT ...
0
votes
1answer
28 views

Oracle date not returning the right data

I don't know whats going on here, but here is my table (budget) with select * from budget : |budget_id|as_of_date|quarter_1|quarter_2|quarter_3|quarter_4| |1 |15-MAY-16 |400 |100 ...
1
vote
1answer
43 views

MySQL syntax for order by not accepted in SQL Server

I'm working through the SQL snippets for nested sets in this article by Mike Hillyer. The article is using MySQL, but I'm using SQL Server. I get the following error reported when attempting to ...
0
votes
1answer
12 views

Why doesn't MySQL installation on an Ubuntu linux 16.04 OS require user to specify LD_LIBRARY

Why doesn't MySQL installation on ubuntu 16.04's linux require the user to specify LD_LIBRARY_PATH to resolve its runtime dependencies? I tried googling to find the answer to this question, but I ...

15 30 50 per page