0
votes
0answers
6 views

How to update large tables in real-time without hindering performance in Sql Server 2014?

We are a SQL Server shop, currently on SQL Server 2014 Enterprise. We have an issue with updating production tables in real-time. The boss thinks mirroring is the answer, but I am not so sure. ...
0
votes
0answers
7 views

Incrementing a timestamp and skipping a period

I have a list of things to do and I want to set a time to them (Postgresql) For exemple we can have this list of things: ------------------------ | Things | |----------------------| | ...
0
votes
0answers
5 views

“Unable to Open BCP host data-file” using xp_cmdshell from SSMS but command line works

I have a stored procedure that runs on a job every once in a while to BCP some files left by an application I've written. I noticed the files were piling up and BCP wasn't picking them up so I ...
0
votes
0answers
5 views

MySQL Replication - 1 Master - 2 Slaves. Inserting works for One, not the other

I am a Python developer, working with 3 databases, configured in Master -> slave,slave style. Each slave has their own application associated with it. I am not too familiar with database ...
0
votes
2answers
27 views

How many log files does a database usually have? [duplicate]

I'm studying SQL Server. I have read that a database can have several data files and one log file, but recently I was heard that a database can have more than one log file. Is this true?
1
vote
1answer
16 views

“TRUNCATE doesn't run ON DELETE trigger” true or false

I was searching on the topic of why TRUNCATE is placed in DDL instead of DML for which I found following answer here Why is truncate DDL? I this answer I found a sentence as given below "The fact ...
1
vote
1answer
22 views

Working SQL script fails to create objects when run as SQL Agent job

As a crude 'integration test' style environment, I am updating a copy of production with a delta script based on "development vs prod". The tool used to create said delta script is free, and as such ...
0
votes
0answers
7 views

Can sqlite dump database schema in a fixed order?

I am using SQLiteStudio 3.0.7 to dump the database schema regularly for versioning purposes and it seems to change the order of the table definitions at random. This wreaks havoc on the diffs as even ...
-2
votes
0answers
20 views

Correct the code? [on hold]

SELECT students.first_name, students.middle_name, students.last_name, subjects.subject_name, level_of_entry FROM entries INNER JOIN subjects ON entries.subject_id = subjects.subject_id FROM entries ...
3
votes
0answers
27 views

How to optimize this tricky SQL self-join?

I want to perform a complex self-join on a table. I know that this could in theory be done very efficiently (see below), but I have trouble getting SQL (on Microsoft SQL Server) to do so. My question ...
0
votes
0answers
6 views

How to properly implement a relationship between a table with an array of foreign keys and the foreign table? [duplicate]

I'm not entirely sure how to implement this kind of relationship correctly. As an example, assume that we have: CREATE TABLE menu_item ( mi_name TEXT PRIMARY KEY, mi_ingredients TEXT[] ); ...
0
votes
0answers
5 views

PGPool for Postgres load balancing, where to sit it

So I've been doing a stack of reading. I'm still not 100% clear of the best way to go about it. Let's take a simple setup. 3 nodes to server UWSGI apps (in random), 3 nodes for PGSQL, 1 nominal ...
0
votes
0answers
9 views

Saving Access 2016 database in a different format; backing up the tables

I have done an awful lot of work in Microsoft Access 2016. There doesn't seem to be anyway of Saving the database in an earlier format. It says the storage system is different, and can't revert to an ...
0
votes
0answers
11 views

about SSRS 2014 subscriptions? [on hold]

How email subscriptions work in ssrs 2014?Is there any difference between ssrs 2008 And 2014?
0
votes
0answers
15 views

SQLAgent Job Step- Database field blank, but not

In looking at a historical SQL Agent job on my employers server I noted a job with 4 steps. The Databasefield was set as master for the step 1 and not set at all for the other 3 steps. Yet each of ...
0
votes
2answers
10 views

Different where clause based on SSRS parameter

I have an SSRS report where a parameter can take 3 values. The select query is the same in all cases but the where clause needs to check different date fields based on the parameter value. Is this ...
1
vote
0answers
9 views

Unexpected table created by running store procedure with integer OUT parameter

I have written a simple SQL-script, which drops tables, then creates them and replaces stored functions in a PostgreSQL 9.5 database. The names of tables and stored functions are all prefixed by ...
1
vote
1answer
16 views

Synchronous SQL Server Replication only for specified subscribers

I would like to create database replication between multiple localisation. There will be one publisher and multiple subscribers. Is it possible to define that synchronisation is synchronous only for ...
0
votes
0answers
20 views

Equalize datafile size

I have a DB that has 28 datafiles with all different filesize. Some are 10GB, some 15GB, some 27 GB, etc. The difference in filesize is a historical fact. Different DB managers, forgotten autogrowth ...
0
votes
1answer
19 views

Getting the next bigserial value in PostgreSQL

Say I have a table with an id BIGSERIAL column. I just started a new session. I want to know what the id of the next row I insert will be. How can I tell this? I can't simply SELECT MAX(id) FROM ...
0
votes
1answer
17 views

Full text indexes on big tables

I have a news website where I store my articles in a table that looks like that: Id title data Where data contains the content of the article and is the biggest column in the database by far. ...
0
votes
1answer
8 views

Can we use subquery in GRANT statement in postgres

I want to grant select privilege on few selected tables. Can I use sub-query in GRANT statement???? I have tried the following query: GRANT SELECT ON TABLE (SELECT array_to_string( ...
-2
votes
0answers
33 views

Want to setup full database in sql server 2012 [on hold]

I need to setup full database let say want to create tables, stored-procedures, cursors, functions etc. I have one xml file and all the related scripts. I need to know is there any way that I can ...
3
votes
4answers
159 views

Question about 'mysql error 1064'

ALTER TABLE sample62 CHANGE newcol c; This code makes me mad. I just followed the book I had. Program said You have an error in your SQL syntax; check the manual that corresponds to your ...
0
votes
1answer
22 views

What is the difference between unique, alternate and secondary keys in SQL Server? [on hold]

What is the difference between unique, alternate key and secondary keys in SQL Server?
0
votes
1answer
21 views

Get rows from last insert statement by specific user

I have many users in my web app (not the postgres user). Each of them capable of inserting item transactions on their own location. How to get only rows just inserted by user_a?
0
votes
1answer
25 views

Cannot create user using administrator credentials in Oracle

I am trying to get some hands-on experience with ORACLE and I installed Oracle Database 11g Express Edition on my PC at home. I logged into the 'Application Express' by entering TEST in the Workspace ...
0
votes
0answers
16 views

Reject Specific Database PostgreSQL User Authentication

Lets say I have two databases: Sales and Inventory And two users: A and B I want user A to be able to do: psql sales B But user A must not be able to do: psql inventory B Right now user A can ...
3
votes
1answer
31 views

Why does Veritas backup take longer through CMDEXEC than cmd?

"c:\...\dbbackex.exe" -f "C:\...\backup.bch" -p policy_name -s server_name -np The above command, when run from command line takes something like 30sec to finish for a small db or transaction logs. ...
0
votes
0answers
9 views

MySQL assertion errors after upgrade to 5.6

We've recently upgraded from 5.1 to 5.5 and then to 5.6. Since then we have database instances crash with following assertion error. I've also reported it as a bug with MySQL ...
0
votes
1answer
35 views

How to select all rows from column including two specific numbers within a set of digits, but not in beginning or end?

I'm attempting to retrieve all rows that include two specific characters within a set of characters corresponding to the attributable column of data. However, the specified characters can't be ...
0
votes
1answer
47 views

How to optimize database for specific queries?

Hello I have built this queries thanks answers to my questions: How to get data from three different tables and How to show rows with 0 without any records in database But now I have performance ...
2
votes
1answer
22 views

Getting the referenced object from SQL Trace

I am able to query the default trace or any SQL trace for the event "Audit Add Role Event" to see if anyone has received any instance level access escalation. What I am trying to figure out is how to ...
-1
votes
0answers
15 views

SQL Stored Procedure how to split column [on hold]

ALTER PROCEDURE [dbo].[MBResult] -- Add the parameters for the stored procedure here AS BEGIN -- SET NOCOUNT ON added to prevent extra result sets from -- interfering with SELECT statements. ...
-2
votes
1answer
26 views

I can't save Database Diagrams

I'm trying to save a database diagram but I'm getting an error. How can I fix this? Cannot insert the value NULL into column 'diagram_id', table 'SOFT.dbo.sysdiagrams'; column does not allow ...
3
votes
3answers
219 views

The fastest way to get the most recent records

I am looking for the fastest way to return the most recent record for each reference number. I quite liked the solution from BrentOzar.com which can be found on ...
0
votes
0answers
17 views

Is there any reason to use Innodb over Aria for wordpress?

Is there any reason to use Innodb over Aria for Wordpress? I currently have an nginx php-fpm wordpress Mariadb stack. Aria seems like a natural fit, given my workload is 98% select statements, and ...
0
votes
0answers
18 views

Can SQL Server 2016 validate JSON on insert?

Currently SQL Server 2016 CTP 3 and later releases support NVARCHAR(max) fields with JSON content. However since the type NVARCHAR(max) is totally free-form, there is no constraint on these fields. ...
-4
votes
1answer
26 views

sql INSERT QUERY [on hold]

i want to write a query for this. I want to select funds from table1 and insert them into table2 in their respective hrchy no . as shown in pic
1
vote
1answer
20 views

High Log Space Used for model System database

I was running DBCC SQLPERF(LOGSPACE) and noticed that while my user databases have nice, low Log Space Used percentages, my model system database is currently at 98%. I have it set to the default Full ...
1
vote
1answer
17 views

SSMS: Import from flat file (.csv)

In SQL Server Management Studio (SSMS) 2008 R2, I wish to import a not-quite-properly formatted CSV into a database table. I was trying to use the wizard at <database name>->Tasks->Import Data. ...
0
votes
1answer
20 views

Partitioned view with dedicated “routing” column

I have an application (Microsoft Dynamics NAV to be exact) that splits up data for different companies in tables with the exact same structure. I can not change that behavior, so I built VIEWs that ...
-1
votes
0answers
19 views

Writing SQL query for scenario [on hold]

I am trying to develope a shopping application. I need to write a query for the following table structures : enter image description here GRPMT : This contains the master group of Items(like ...
0
votes
2answers
24 views

How do I do a join and exclude certain records?

Table STUDENT has columns ID, LASTNAME, FIRSTNAME Table TEACHER has columns ID, TEACHER_ID, STUDENT_ID Students can have many teachers. Teachers can add students to their class. I want to be able ...
1
vote
1answer
15 views

Auto Increment Key Pair with Start Digit at 200000 SQL SERVER 2008

I'm currently rewriting a front end for a program that handles interviews. I want to prevent an issue the older program had were during the tiny amount of time it was doing a lookup for the next ...
0
votes
0answers
15 views

search pgadmin for column

I'm a front end dev and this is my first time doing serious database work. I have json sent to the client that looks like this: prop[0].event.history = 'foo'; //can also be 'bar' I wanted to ...
0
votes
0answers
21 views

how to desing a database for loan management in mysql [on hold]

I am not very well experienced in database design . I designed database tables for user and account information `but in case of designing table for loan management and fixed deposits.` I want to ...
0
votes
0answers
23 views

2012, 2014 and 2016 SQL Server Licensing Costs [on hold]

I've looked for this information on various blogs because Microsoft's pages are unhelpful and very "selly". Does anyone have a side-by-side comparison of the licensing costs for 2012, 2014 and 2016 ...
0
votes
0answers
10 views

MS Access 2013 won't pull the data for a specific column when creating a report [on hold]

I am trying to run a report in Access from three different tables, the report pulls the data from all of those tables and all of their columns, except for one - the column appears in the report but is ...
1
vote
1answer
31 views

Howto query xml

My source data in a SQL Server table has XML structured data. For each of the source rows I need to query the following sample XML structure in a way that I get a calculated value of all A sub ...

15 30 50 per page