4
votes
1answer
33 views

Fast alternative for “NOT IN”

I have a table A that got a field called id that is the primary key of this table. I also have a table called B which also have a field called id as primary key. Now I want to get all rows from ...
2
votes
1answer
17 views

Row with latest timestamp

How to get the row with the latest value in a TIMESTAMPZ column? Is an index needed? Does an index change the strategy? Would behavior vary by database (I'm using Postgres 9.4)? I am using this kind ...
4
votes
2answers
78 views

sql server max memory includes SSIS?

I have installed 2 instances of sql server plus SSIS on the following server. Note the amount of RAM is nearly 384 GB And this is the max and min memory settings that I have applied to my 2 ...
1
vote
0answers
9 views

pgAdmin export line overflow on large field

Background: I have a database of significant geographical locations downloaded from GeoNames open database. The create script for the table is as follows CREATE TABLE populargeonameswiki ( geonameid ...
2
votes
2answers
25 views

MS SQL Server ensure only one of the several records for a given item has a column with true value

I have a table like this Computer(id, NIC_name, is_primary). My primary key is (id, NIC_name) and is_primary is a bit field for a boolean value. I would like to ensure that for all computers with same ...
3
votes
0answers
21 views

Should I use a separate postgres schema for application logins? [on hold]

I'm building an application. I have users, roles, and permissions; users can have one role, and a role can have multiple permissions. As such, I'll have a Users table, a Roles table, a Permissions ...
0
votes
0answers
27 views

Optimizing Hibernate \ SQL Query for better performance

The following query is taking much time, due to the large amount of data in the accessed tables. This is the best I could come up with, but I am sure this can be optimized much better. SELECT ...
3
votes
1answer
30 views

Bidirectional Replication Push and Pull with SQL Server

Please bear with me, I'm a developer working with a client without access to a strong DBA. I have a question about bi-directional replication with the following setup and requirements: MSSQL Server ...
1
vote
0answers
32 views

I need to find the “rank” in a sub-set of entries

I am currently working on some sort of a highscore list. But values displayed are individual for each user, ie. limited by constraints. One constraint that I am currently working on is "being part of ...
0
votes
1answer
8 views

SSRS and Informix connection

I have the IBM drivers installed, created a data source that successfully tests from SSRS front end. Create a report from my machine which also has the drivers installed and the ODBC testing ...
2
votes
0answers
30 views

Improve postgreql insert performance when compared to Oracle. Low memory utilization by Postgresql threads

I am trying to improve the performance of Postgresql (version 9.2.3) inserts for a simple table with 1 bigint, 1 varchar, 1 float and 2 time stamps. A simple replication of my JDBC program is ...
0
votes
1answer
20 views

How to merge consecutive record pairs over a table?

I have a table where I need to merge consecutive record pairs (when ordered by id, data and from). Note that for pairs being merged, the first row's prevfrom is NULL and the second row's nextto is ...
-1
votes
0answers
24 views

Can MySQL Enterprise Edition be used for free with no time restriction? [on hold]

My question is about product licensing by Oracle, specifically about MySQL Enterprise Edition licensing. I am not any DBA Master, I'm just a developer in search for answers from the real experts. ...
0
votes
1answer
25 views

postgres: Converting '' into NULLS

I'm trying to run this query to change my latitude coordinates, which is saved as text into a double precision ALTER TABLE mapdata ALTER COLUMN lat TYPE double precision USING (lat::double ...
2
votes
2answers
89 views

Potential issues migrating from SQL Server 2014 to 2012 by scripting tables and data?

I have a very simple question. What would be the typical "gotchas" involved with scripting all the data to migrate a 2014 SQL server database to 2012? Is this a pretty solid process? Are there ...
2
votes
0answers
16 views

What are the possible causes for an SSIS package execution having an “ended unexpectedly” status

I have a SQL Agent job that runs an SSIS 2012 package every 30 seconds to export a small amount of data to a CSV file. There is often nothing to export, but when there is, the business wants it done ...
1
vote
2answers
174 views

Why does FETCH NEXT return second row after opening cursor?

I have a cursor declaration: DECLARE idCursor CURSOR FOR SELECT DISTINCT [id], [data] FROM #tempRemaining OPEN idCursor And the statement: SELECT DISTINCT [id], [data] ...
1
vote
0answers
34 views

Oracle tuning strategy for columns with long tails

We have an Oracle 11g database, where the two biggest tables are Customer and Order. The order profile of our customers has a long tail: we have millions of customers, with most only having a small ...
2
votes
1answer
20 views

Hosting SQL Server and SSIS/SSRS in same VM

I have SSIS / SSRS and large number of databases currently being hosted on the same prod server (SQL1, SQL Server 2008R2). Since SQL1 already has SSRS/SSIS installed, would it be a good option to ...
0
votes
2answers
29 views

Finding two users with same pair group

I have the following table which details actions of users and the action's parameters: action_id(auto-increment) | user_id | action_name | action_attr1 I want to find which users performed the same ...
0
votes
1answer
19 views

Data migration from SQL Server to MongoDb [on hold]

I need to migrate some data from Sql server to MongoDb collections. Data structure could be not equivalent. I need to set custom mapping rules. Can you advice me a tool that is able to perform that ...
7
votes
3answers
133 views

Is it reasonable to mark all columns but one as primary key?

I have a table representing movies. The fields are: id (PK), title, genre, runtime, released_in, tags, origin, downloads. My database cannot be polluted by duplicated rows, so I want to enforce ...
0
votes
2answers
30 views

Statistics that are neither auto_created nor user_created

So far, I was under the impression that there are two types of statistics objects in SQL Server: automatically-created statistics, which are created by SQL Server on index columns or single columns ...
1
vote
0answers
17 views

SQL Server 2012 restrict CmdExec to sysadmin server role

I'm trying to restricting CmdExec rights to sysadmin server role in SQL Server 2012. I've googled but just found some solution which they were for older version of SQL Server. Can you please help?
0
votes
1answer
8 views

MySQL - using result of Procedure in Trigger to Insert in new table

I'm guessing I'm doing something that's prohibited by MySQL, but can't see what. Basically, I have a set of tables that hold lists of things (item name, item types, item groups etc.), and I need to ...
0
votes
2answers
13 views

Cannot open backup device Error

I have a SQL Server Agent job that backs up a database on a remote server to a network drive. Linked Server, I believe is set up correctly but I get the following error: Msg 3013, Sev 16, State 1, ...
1
vote
1answer
29 views

What is the correct implementation of handling concurrent SQL inserts while ensuring a non-primary key column (i.e. wid) unique and auto-incremental?

What is the correct implementation of handling concurrent SQL inserts while ensuring a non-primary key column (i.e. wid) unique and auto-incremental? Note: There was a design constraint that led this ...
1
vote
1answer
17 views

The connection is broken and recovery is not possible - sql server error

I am having the following sql server error, while creating tempDB files. Any ideas? The connection is broken and recovery is not possible. The client driver attempted to recover the ...
1
vote
2answers
36 views

group result of multiple table to get unique result after count operation

survey_categories +---------------+-------------------+ | survey_cat_id | survey_cat_status | +---------------+-------------------+ | 1 | 1 | | 2 | ...
1
vote
3answers
80 views

SQL Server Max memory limit

I have my SQL Server 2008 R2 installed running on 32GB ram. I need to decrease the limit SQL Server uses to 28 GB and I have set the same to 28GB but it is still taking more. I have seen posts saying ...
0
votes
1answer
20 views

Why is the result cache always disabled in Oracle 11g

I'm trying to enable the result cache in Oracle 11g. I have used Enterprise Manager to change the result_cache_max_size and result_cache_max_result values to '1M' and '100' respectively (maybe these ...
2
votes
1answer
19 views

How to copy non clustered indexes in transactional replication

I create transactional replication ,but forget to include non clustered indexes and now my subscriber have only clustered indexes (primary key) and I want to transfer all nonclustered indexes to ...
0
votes
0answers
8 views

Having problem with adding more than one DIT [on hold]

I have an openldap server up and running on ubuntu 14.10 and I have managed to successfully add a DIT into it using following ldif : dn: olcDatabase=hdb,cn=config objectClass: olcDatabaseConfig ...
1
vote
1answer
20 views

Adding Secondary Data file in SQL Always on

How to add the Secondary Data file to the Database which is a part of Always on availability Group in SQL Server 2012.
0
votes
1answer
24 views

Is it necessary for rownum = 1 with Query.createQuery().getSingleResult()? [on hold]

I'm a newie and I'm not really sure if MIN(My_Date) returns just one row if 2 or more dates are identical. Reference is a FOREIGN KEY. so to limit query: SELECT MIN(Shipping_Date) FROM ...
1
vote
1answer
36 views

How to restrict access to SQL Server user in some period of time

I have two SQL Server users 'A' and 'B'. I use user 'A' for ETL and 'B' for reporting. My requirements is to restrict user 'B' access while user 'A' performing ETL (Extraction, Transforming and ...
1
vote
0answers
30 views

SQL Server Mirroring Removed

Does anyone know how to tell when SQL Server mirroring was removed from a database? My log file is flooded with login failures but I can't find mention of removing of a mirror. Is there any DMV way ...
2
votes
1answer
11 views

MobiLink: How to propagade schema change for a synch profile to remote databases

Once an application is online with a synchronisation profile it might happen, that the profile needs to be changed. E.g. a new index is introduced, columns are added etc. Having the synchronisation ...
0
votes
0answers
22 views

SQL Server Setup The network path was not found (uninstall node)

We have a cluster with 8 nodes. this instance is installed on 2 nodes S141 (active) and S142 (passive) I want to uninstall with the command: Setup.exe /Action=RemoveNode /qs /INSTANCENAME="SQL16" ...
0
votes
0answers
6 views

Restricting the size of schema in Redshift

We use Amazon Redshift in our project. In our project, we have assigned different schemas to different groups of people. So, for example, marketing gets a separate schema, where they can store their ...
-1
votes
1answer
38 views

How to do superscript in SQL Server 2012 query? [on hold]

I am trying to change superscript in SQL query string. Example: Select 'Your submitting date is 2nd January 2016'; As above query, I want to change nd to superscript.
0
votes
0answers
7 views

MobiLink: What is the correct approach of presetting values inside database for remote user

When creating a remote database from inside Sybase Central I'm looking for a way to preset some values based on e.g. subscription user. Application is using some kind of configuration table storing ...
1
vote
0answers
50 views

How to pass the value of PK to FK

Ok, so here it goes. I have a table called employee. then I have another table called languages. I need to copy the value of PK of employee table to foreign key in Languages table, rather than ...
-2
votes
0answers
23 views

MySQL Workbench cloud alternatives [on hold]

I have some analyst who runs some particular queries which are provided by me. Now when a new analyst joins our team I have to install MySQL Workbench on their laptop to set up the connection. I went ...
0
votes
0answers
17 views

Reading audit records in Oracle

As a DBA, what is the best way to read the audit records on daily basis? Say, i'm the administrator and I would like to view the audit records made by the DBAs. I have enabled audit sys operatiosn to ...
1
vote
1answer
103 views

Not able to install PostgreSQL 9.4 on Ubuntu

When I try to install PostgreSQL 9.4.+ on Ubuntu, it is installing version 9.3.9. I have used the following command: sudo apt-get install postgresql postgresql-contrib Then I have tried with sudo ...
0
votes
0answers
18 views

How to create password and table in Postgres-xl?

I try to create password for user postgres (DB postgres). And try to create table i always get error. I am using Ubuntu 12.04. Postgres-xl v9.2. postgres=# sudo -u postgres psql postgres postgres-# ...
0
votes
1answer
21 views

How to insert all the dates in a date range into Oracle database?

For instance, The date range is from 26th Jul to 1st Aug, that is 26th Jul, 27th Jul, 28th Jul, 29th Jul, 30th Jul, 31th Jul and 1st Aug How can I construct a function (of course, I need to ...
3
votes
1answer
27 views

What is the correct way to map relationships between structurally similar comments tables and commentable entities?

I'm working on the usual comments table in postgres that has a one-to-many relationship with a commentable entity. In other words, one comment belongs to a post, and a post can have many comments. ...
1
vote
1answer
34 views

Is it necessary to create foreign key in this query? [on hold]

I have the table called investors having as primary key the column id. I have the tables Users, Login_Logs and Accounts. All of these tables contains the foreign key investor_id. Between investor and ...

15 30 50 per page