0
votes
0answers
4 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
0answers
16 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
6 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 ...
-1
votes
0answers
9 views

PL/pgSQL trigger function syntax error at END; [on hold]

I'm writing a simple trigger function, as seen below. For context, it's meant to enforce uniqueness of a key across multiple tables. It will be made more generic once I've got it working. CREATE OR ...
0
votes
1answer
8 views

Display the the result of a substraction in a MySQL query (1 table)

I've made a table that looks like this: stop (table name) -cityName {PK} -schedule {PK} -price -routeNo Basicly the customer wants to know what's the cost difference between 2 different stops by ...
3
votes
1answer
117 views

Why can a differential backup not be copy-only?

I have noticed that copy only backups does not allow for differential backups. What is the reason the copy-only backup option is disabled for differential backups?
0
votes
0answers
3 views

Is it advisable to configure huge pages on SLES for MySQL

What is a general opinion on using huge pages with MySQL server? As described in here: https://dev.mysql.com/doc/refman/5.7/en/large-page-support.html Or is it best to leave things as is and not ...
0
votes
0answers
11 views

Functional Dependency Diagram From the Result of a Query?

I was wondering if someone could explain to me how this works. I understand the concept of functional dependency diagrams i.e being given a set of attributes and split the tables using the diagram to ...
1
vote
1answer
27 views

Many to many between lots of tables?

TL;DR: How could I set up many-to-many relationship between that many tables and is it viable/recommended? Each body type has its own table Each car in each body type table can has several ...
-3
votes
0answers
17 views

i need to know some advantages of field size [on hold]

Can you explain some advantages of field size. I have already tried to change the number of characters. This is because changing the number of characters reduces the amount of space wasted in the ...
1
vote
0answers
6 views

import TSV file into mysql table with SET datatype column

Is it possible to use LOAD DATA INFILE to load data into a mysql/mariadb table, where one column uses the SET datatype? If so, how do I specify the separator for the individual set elements?
-1
votes
0answers
14 views

How external/internal fragmentation effect to query performance [duplicate]

could you explain me what is external fragmentation and internal fragmentation? what does that effect to query performance Thanks in advance
4
votes
0answers
16 views

In SSMS, is “Navigate to” (Ctrl+,) of any use?

In standard Visual Studio 2012 or higher, IDE window called Navigate to... (Ctrl+,) offers all useful objects in scope of currently open project (see samples) getting increasingly filtered as I am ...
1
vote
1answer
19 views

Why does 3NF Normal form allow transitive dependency of prime attributes?

I'm just a beginner in Relational Design, When i came across the definitions of 3NF and BCNF. According to 3NF, Any non-trivial functional dependency X-> A shouldnt exist unless X is a super key or A ...
0
votes
0answers
34 views

To find SQL Server is actually used or not?

I have an SQL Server 2012 and a 2008R2 running in my environment. I need to decommission the server if the server is not actually being used. I did go through this and this where connection count is ...
1
vote
1answer
31 views

SQL Row concatenation with XML PATH and STUFF giving aggregate sql error

I am trying to query two tables and get results like the following: Section Names shoes AccountName1, AccountName2, AccountName3 books AccountName1 The tables are: CREATE TABLE ...
4
votes
1answer
61 views

When executing a command via xp_cmdshell what user issues the command to the system?

I'm executing the following command to stop a service on a remote server from within a stored procedure in SQL Server. ---------------- -- Stop Service ---------------- SET @Command = 'sc \\' + ...
2
votes
2answers
39 views

Select rows where smaller row does not exist

Consider the following table data: ID NAME 1 Kshitiz 2 Aman 5 Aakash 6 Manjeet Here there are records missing between 2 and 5. What query can I use to select row 5 in this table?
5
votes
1answer
73 views

Conditionally add an index to a temp table

I have a stored procedure that looks something like this: SELECT columnlist INTO #temptable FROM Table JOIN lotsofothertables WHERE severalconditions UPDATE anothertable SET column = ...
0
votes
0answers
12 views

On the fly MySQL balance

Please excuse my English translation that makes by Google Translate I need to solve the following in a MySQL query without php or another language: In the “A” column I have a string value, in ...
2
votes
1answer
12 views

Constraint on row value based on values in other rows

Is it possible to have a table with four columns: CREATE TABLE accrual ( add_date date NOT NULL, user_id integer NOT NULL, rate integer NOT NULL, amount numeric(7,3) ); and then ...
0
votes
0answers
5 views

Why do my queries are not routed to a correct queue for my user group in Redshift

I was following this tutorial to configure query queues on Redshift. So I created a parameter group, modified parameter group settings and created a queue. It has Query Groups set up as data_team ...
0
votes
0answers
27 views

Migrate SQL server data to new schema

I have a database that was originally created by a couple of people for a small business unit (about 8 staff and 10 customers) in MS Access. The original 'developer' was a non-geek who had been sent ...
0
votes
0answers
4 views

Backup/Restore single database with MySQL Enterprise backup

From what I have found online is it is possible to backup/restore an entire mysql instance with MEB and also a single .ibd file (to my understanding is a single table). What I am trying to do is ...
0
votes
1answer
15 views

pg_stat_activity shows lots of easy queries running for minutes

After application server start its connection pool fills quickly and application can't work properly. I went through pg_stat_activity and noticed lots of queries running for minutes: But postgres's ...
-1
votes
1answer
27 views

Multiple references to another table, but I don't know how many

I have two tables in a database, folowwing this model: scientists : id (int) | name (varchar) | surname (varchar) | publications (int) publications : id (int) | fulltext (varchar) I would like to ...
0
votes
1answer
29 views

How to find the AD user that logged in to SQL Server using SQL Login [duplicate]

Some users are logging into database servers locally, opening SSMS and logging in to SQL Server using SQL logins to run queries. How can I find the AD user that logged in to SQL Server using a SQL ...
0
votes
0answers
15 views

MS SQL data synchronization question

I'm in charge of modifying an application which was intended to run Microsoft SQL Server Compact 3.5. The application must run on a local database during fieldwork when there is no network ...
-1
votes
0answers
19 views

Get results from a query without calculate it [on hold]

i'm working with a big database more than 50 GB and basically the system that is using this database is to generate reports, I want to know if there is a way when I try to generate a report for second ...
0
votes
3answers
31 views

SQL Server 2008R2 min value within a set (or window) within a three column table

I only have SQL Server 2008R2, therefore I do not have all the window functions available since SQL Server 2012. I have a table that looks like this: I would like to retrieve a result set like ...
0
votes
1answer
22 views

What system privilege is needed for a user to manage user accounts only

I'm looking to delegate user termination to our NOC. Requirements are: A user NOC will be created User NOC will execute stored procedures allowing them to either 1) lock another db account or 2) ...
1
vote
1answer
96 views

How can I speed up a stored procedure? [on hold]

Here is an interview question I just had. I would like to know what a good answer to this would have been and what the different options would be. We have a stored procedure that is taking 26 ...
0
votes
1answer
22 views

Restore a database with compression on a non-enterprise edition SQL Server

Is it possible to restore a compressed an object from backup without the Enterprise Edition? I'm getting the following error after a RESTORE DATABASE operation. Msg 3013, Level 16, State 1, Line 2 ...
0
votes
0answers
8 views

SQL 2012 Availability Group issue - The core cluster resources do not move when we initiate AG fail-over

I have a Windows 2012R2 cluster with two nodes and a File Share quorum. I am running SQL 2012 SP2 and I have configured a test AG with a dummy database. When I fail-over the AG, the Availability ...
0
votes
0answers
3 views

How can I clear my database on Heroku?

I have an application that I deployed to Heroku. Everytime I try to sign-up, it gives me and error that tells me my password is invalid. I've type in everything correctly and I'm sure I've never ...
0
votes
0answers
2 views

Postgres Array into Geoserver

I'm working with OS Highways data, which when loaded into Postgres using ogr2ogr has a few columns that are set as arrays. Geoserver does not like this, so I need to transform the arrays into a simple ...
1
vote
0answers
20 views

How can I optimize a query with multiple derived tables containing `IN` and `GROUP BY`?

I'm collecting nmap data every five minutes and storing it in a database. Information about each scan (e.g. start and end time) is stored in the scans table: CREATE TABLE `scans` ( `scan_id` ...
0
votes
0answers
19 views

Can I delete an Oracle “Whole database backup” while a level 0 backup is being created?

I have created a Whole database backup using: -- In SQL*Plus ALTER SYSTEM SET DB_RECOVERY_FILE_DEST_SIZE = 5000G SCOPE=BOTH; ALTER SYSTEM SET DB_RECOVERY_FILE_DEST = 'O:\ORA_FRA'; alter system set ...
0
votes
0answers
11 views

How to create a table in access and automatically fills it with information from a query?

Is it possible if I create a table that will lookup for a value filtered from a query (consult), in this case is duplicated "Name"s from a Employees registring table and automaticly fills up that ...
0
votes
0answers
6 views

In a Registry Formulary (Table origin), how to show an image (Object ole) that is linked with the “Name” Collum in the table? [on hold]

I got in a table a Collum named "Register Time" and another "Name" that is the name of my Employees. Then I got a Formulary that is where I register my Employees "Monthly income" inputed in same ...
2
votes
2answers
46 views

Completion of SQL Job triggers start of job on a different SQL Server

I want the completion of a SQL Server agent job to trigger the start of a job on another server. More specifically, I want my SSRS server to email a subscription report whenever an FTP/Import job ...
0
votes
1answer
23 views

No INDEX variation seems to speed up the query

I have this query that orders prices based on the customer's NO being a possible pricegroup too (this is nicely cached as an ID in the pricegroups table too tho). SELECT p.`variant_id`, ...
0
votes
0answers
12 views

Is it possible to create a read-only user in Sybase please?

Is it possible to create a read-only user in Sybase please ?
0
votes
2answers
29 views

Why is a Full Database Backup (as opposed to a level 0 backup) required in Oracle after switching to ARCHIVELOG mode?

The Oracle 12c 2 Day DBA manual states: While whole database backups can be an important element in your overall backup strategy, they are also a required step in some situations, such as when ...
0
votes
0answers
20 views

SQL Server Job does not execute when scheduled, but does execute manually, how do I get it to run as scheduled? [duplicate]

I am running SQL Server 2014 SP 1 CU 5. The job did work in the past. The schedule is enabled. The account it is running under is an ADS account which has sysadmin rights and has delete rights to the ...
0
votes
1answer
41 views

Same query same data different server different query plan

I have a query that hits a view, which references other views etc...several levels down. The query plan is a bit complex. I run the query on 2 different servers. On both servers, the number of rows ...
2
votes
0answers
10 views

How to avoid row locks on both tables joined in an update?

I have little knowledge about MySQL internals, but I'm experiencing that in a query like: UPDATE t1 JOIN t2 ON t1.id = t2.id SET t1.a = x, t1.b = y, [, ...] WHERE [ ... ] rows from both t1 and ...
2
votes
2answers
36 views

Define a proper index for a table

I have a table with millions of rows and something like 20 columns. This table have an unique identifier as primary key, but the most likely query is based on three varchar columns (col1 and col2 of ...
0
votes
0answers
10 views

Errror in Ag VALIDATE SHARED LOCATION

i Have this error when i create new AG Database Do any one have experience with this issue note: share network location not share in WSFC it's on another server all node and sql Services users ...
0
votes
1answer
10 views

Adding templated Date-Time dimension to the cube

I have a database with FactSales table that contains Date column of type I4. I have created a cube and linked dimensions via foreign keys as usual, however, since I have no DateTime table in the ...

15 30 50 per page