0
votes
1answer
7 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
20 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 ...
0
votes
1answer
20 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
56 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 \\' + ...
1
vote
2answers
34 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?
4
votes
1answer
70 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
11 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
26 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
25 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
28 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
12 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
29 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
81 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 ...
0
votes
0answers
17 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
9 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
5 views

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

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 ...
0
votes
1answer
37 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
11 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
40 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
9 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 ...
0
votes
1answer
13 views

Export from Oracle 10g and import to Oracle 12c unable to create users

I have and old install of Oracle 10g with a lot of users and tablespaces in it, for development purposes. Now, I need to migrate these users, tablespaces and everything else, to an Oracle 12c ...
0
votes
1answer
13 views

(SQL) User tables are separated into two sections

Using SQL Plus, I create 13 tables via an .sql file, each containing primary and foreign keys. When I execute "select table_name from user_tables;" they are displayed in this partitioned fashion. ...
1
vote
1answer
35 views

no more data read from socket error with triggers

I have created one trigger that calls one procedure, using oracle sql developper. Here is the code for trigger : CREATE OR REPLACE TRIGGER noteTrigger BEFORE INSERT OR UPDATE OF valoare OR ...
4
votes
1answer
458 views

Does a single rollback affect all transactions?

When I run the following script: begin transaction select XACT_STATE() select @@TRANCOUNT begin transaction select XACT_STATE() select @@TRANCOUNT begin transaction ...
0
votes
0answers
13 views

how to separate data from one column result into multiple columns [on hold]

Below is sample data and expected results: Table 1 : out_number AMPS VA Feed 1 0.00 0 A 2 0.10 0 A 3 0.30 0 A 4 0.40 0 B 5 0.10 0 ...
1
vote
1answer
14 views

Can I remove binary log files not listed in mysql-bin.index?

We've had some problems with one of our more elderly MySQL servers (version 5.045). The database is back up and running OK but there were over twenty thousand binary log files in the mysql folder. I ...
0
votes
2answers
30 views

How to separate values from one column into two columns in SQL Server

I have this dataset as input: Name Contact No ------- ---------- Deepika 75865558 Deepika 207586558 Rnveer 746655558 Rnveer 946655558 vaibhav 2356841 vaibhav 6655558 I want to get ...
0
votes
0answers
17 views

Can't connect to Database in Network using MS SQL 2016

I'm completely new to MS SQL Server and trying to connect to a Database in my network. I can find it, but everytime I am trying to connect it says username or password would be wrong. What I have ...
0
votes
0answers
8 views

Cannot Start MongoDB

I cannot start MongoDB on Debian(Jessie 8.4 Stable). I generated the keyfile and added the path to the key file to the configuration and uncommented the "auth=true" but when I try to start the service ...
0
votes
0answers
6 views

Product Features table for No Sql Databse

I want to design database to save products features. Actually i want to store all features of mobile given on this link http://www.gsmarena.com/samsung_galaxy_j7-7185.php After search on google i ...
0
votes
0answers
195 views

SQL server 2008 querying very large large tables

I've recently started a new job, the table row counts are huge compared to where I was before (11 billion rows in one of our main tables). I've been told there isn't time to update the statistics on ...
-1
votes
0answers
23 views

How to configure table with BLOBS (type image)?

I am about to overwork a table storing BLOBs in an IMAGE column combined with those file's metadata during a database maintenance. Lot's of the BLOBS will be removed during this process. We are ...
0
votes
0answers
8 views

sp_procoption seems to be failing on SQL 2005 instance

We have a SQL script that creates a Stored Procedure which is responsible for creating a SQL trace. On SQL Server 2008, the script runs fine, the SP gets created and the SP is configured to ...

15 30 50 per page