0
votes
1answer
6 views

Like operator in postgresql

how to check the reverse of the original word using like operator? For Eg: victoria state------state victoria
0
votes
0answers
5 views

How Columns_update() Function Works in Trigger To Find Updated Columns Name

I am in confuse about trigger function Columns_Update(). i Have Basic Idea about this function that it returns a varbinary and it is use to get updated Columns in Trigger even i have Find The code ...
0
votes
1answer
10 views

SQL DB Permissions so anyone can modify the DB

I'm teaching a class on SQL Server 2014, and want students to be able to restore a Db I give them and then be able to take ownership and modify tables, and also to view the database diagram. ...
0
votes
0answers
13 views

Update records from one table to another in different databases where condition is accomplish

I have two tables stored in two differents DBs and I need to perform some sync between both tables based on lastmodifieddate and lastSyncAt. Let's call them as db1 and db2. This is the DDL schema for ...
0
votes
0answers
14 views

A good DB Design

I want to design database where possible types of questions are Primary Question Set --> Secondary Question --> Question Primary Question Set --> Question Question. I short some question have ...
3
votes
0answers
10 views

Naming conflict between function parameter and result of JOIN with USING clause

Given this setup in current Postgres 9.4 (from this related question): CREATE TABLE foo (ts, foo) AS VALUES (1, 'A') -- int, text , (7, 'B'); CREATE TABLE bar (ts, bar) AS VALUES (3, 'C') ...
3
votes
0answers
18 views

SQL Server: UPDATE permission for table variable

SQL Server 2012 I have a maintenance script that I wrote for some of my operators. They are members of the fixed db_datareader and db_datawriter roles. Part of the script creates a table variable, ...
1
vote
0answers
8 views

Multiple datasets from multiple applications

I have been working with different application such as STATA, SPSS, Excel and R for data analyses of health population. Because each program has different features that I need, I'm looking for advice ...
3
votes
1answer
15 views

How to get the difference in days between 2 timestamps in PostgreSQL

I have a table named accounts. I am interested in retrieving those accounts whose status has not been updated since more than 10 days. I thought about this query and it seemed to work but I am not ...
4
votes
1answer
35 views

Truncate parent table but not children

I have a table in PostgreSQL 9.4 that I partitioned so that all inserts to the parent actually go into one of the child partitions. The problem is that I already have hundreds of millions of rows of ...
2
votes
0answers
20 views

How to order by fields of joined table while selecting for update?

For selecting some rows of table Fwt_Chipkarte for update I use the following SQL statement (IBM DB2): SELECT o.Archiviert, o.Id, o.IdComm, o.Kartennummer, o.Konto, o.LetzteAenderung, ...
2
votes
1answer
12 views

What is limiting the batch requests per sec

We have a newly created azure sql server 2014 instance. The specs for the server are as follows Pretty bare bones I know. Since this is just a testing server, we have opted to set up the data files ...
8
votes
2answers
126 views

Is there a cool way of performing CU updates for SQL Server on hundreds of machines?

My company has grown from 50 SQL Servers to over 200 overnight in a merger acquisition. HELP! My questions are: How can I perform CU updates on this many servers and still have a life and keep my ...
1
vote
0answers
30 views

Trigger/Event that fires when a Transaction finishes

I have a query that pulls from about 15 different tables. I am looking to materialize this into a table that stores it in xml/json. (To improve performance.) The problem I have is that these tables ...
5
votes
1answer
30 views

I want to add a user/login to role in another database without switching databases

I have a role / login in a 'new' database mynewdb with a role "emailsender". I have scripted a profile for sp_send_dbmail and am now trying to script adding the the login to the DatabaseMailUserRole ...
0
votes
1answer
47 views

How to do a 'SUM' of a COUNT(*) in your select to be grouped by a particular column in SQL SERVER

What I am looking for is to be able to SUM the open_lines and group them by that so instead of 'cntnr_id' having open_lines showing as '1' it should show '2' since it is the same cntnr_id and ...
0
votes
0answers
25 views

Why are my jobs not running and next run is not scheduled?

My SQL server agent had stopped. So I started it. After I started it, the activity monitor showed that "Agent XPs are disabled". Then I ran EXEC SP_CONFIGURE 'Agent XPs',1 GO RECONFIGURE After ...
0
votes
0answers
9 views

Database size limit in Sybase Express edition

I'm currently testing out the Sybase 16.0 Developer edition on RHEL. Turns out the limitation on the max. concurrent connections is a real problem for me, so I'd like to switch to the Express edition. ...
2
votes
3answers
47 views

Insert data between 30 minute time intervals

I want to divided my to my time interval depending to the start time and end time. To explain it further, let me have this example. I have this table: User Elapsed Time Start Time ...
2
votes
1answer
12 views

Any merit to MSSQLSERVER Trace from logman as opposed to XEvent Package 0

The general understanding of monitoring SQL Server activity is that using SQL Profiler is very heavy, server side traces are less heavy, but extended events are even less heavy. Today I discovered ...
2
votes
1answer
18 views

Unable to change database owner to a user that is already mapped as user

I ran into this problem. Trying to change a database owner to ; however, I get the following error message when doing so: The proposed new database owner is already a user in the database Now I ...
2
votes
1answer
14 views

Find substrings within between 2 string fragments

I am trying to populate a view in PostGIS in Postgres 9.0 and in this view I want it to contain a substring based on 2 string positions. See below for my code. CREATE OR REPLACE VIEW vw_actions AS ...
-1
votes
0answers
30 views

How to execute stored procedure from other database?

I have 2 databases. Example: db1 and db2. And db1 has a stored procedure sp1 with an input parameter. db2 has a stored procedure sp2. I am trying to execute sp1 in sp2. I tried below: I know it ...
1
vote
0answers
36 views

Basic database relations [migrated]

I recently opened a travel agency and I need a database but don't have the money yet to have it done by a professional... A very basic thing will do until I can have it done better. We do ...
1
vote
0answers
17 views

Migrating Oracle 9i database to MySql database on a different Windows Server

I need to migrate my Oracle 9i database with all its tables from windows server 2003 to MySql on another Windows Server 2012. The oracle database is connected to Visual Studio web project. I have ...
0
votes
1answer
17 views

ODBC Driver tracing not capturing any logparser events

I have enabled Driver Tracing using these directions. I am running SQL Server 2014, which uses the 2012 native driver. I run the start batch file then the following LogParser command: ...
5
votes
2answers
641 views

Is something like this possible in SQL Server?

Our workplace has started to scan all documents rather than manually keep them in archives etc. On average we are scanning 1,000 documents per time (this happens about 30 times per day). Each time ...
0
votes
1answer
23 views

PostgreSQL database connection time [on hold]

how to check how much time PostgreSQL database takes for making connection?
0
votes
0answers
19 views

Failed to deploy the project. Try again later. (Microsoft SQL Server, Error: 27118)

I try to deploy new version of existing SSIS project into Intergration Service Catalog and getting error: "Failed to deploy the project. Try again later. (Microsoft SQL Server, Error: 27118)" ...
2
votes
2answers
41 views

Sum of points and rank according to points

I am creating a game where I am calculating the user points on the basis of user activities. Everything is working fine - I got the sum of points and on the basis of points I calculated the rank. I ...
-2
votes
0answers
16 views

Log shipping failing until restart of secondary

I have to configure log shipping from one location to another location. It's running fine but one challenge i am facing is the copy job keeps failing (once in a day or twice any time not fixed) after ...
0
votes
2answers
30 views

Need simple MySQL query for below description

I have a table with [1...n] columns. I want to retrieve first 3 column names of that table not the records. Should be something like this: Select column_name(3) from table_name="sample";
1
vote
0answers
17 views

Uninitialized values: ignore or set?

From the implementation point of view for a database, is it preferable to handle optional form fields by setting to some default value (e.g. false, 0, "", etc.) or just ignore such fields (do nothing ...
0
votes
2answers
13 views

How to decide when is use ERD or UML for data modeling?

A UML diagram can be used both to model database designs and class designs, but an ER diagram should be used exclusively in database problems. How do you pick one graphical representation over the ...
0
votes
1answer
26 views

default constraint issue

I have a table say tempTable with one column having a default constraint ALTER TABLE [dbo].[TempTable] ADD CONSTRAINT [DF_TempTable_Version] DEFAULT ((1)) FOR [Version] Version decimal (18,1) ...
0
votes
1answer
16 views

Is it possible to create a view in one database from another database in oracle when databases are different machine?

Lets say I have a oracle database db1(actually user) in machine A and another database db2 in machine B. Is it possible to create view in db2 from db1.If possible how ?
2
votes
1answer
44 views

Configuration required for a big mysql database around 20GB

I need to host a single machine database (constraints), wherein the database size is roughly 20gb. Most of the tables are in MyISAM. Any way I can actually run it with decent speed ? Alternatives I ...
1
vote
0answers
22 views

Oracle Rac With Scan Error

I have installed Oracle RAC with ASM on Oracle Linux 5.8. My database version is 11.2.0.1. I have 2 node in my plan and all of them are active. I set scan in my DNS server but I can not connect to ...
0
votes
1answer
43 views

Sql Database server Remote access not working

I have configured Remote settings from TCP/IP with 1433 port and Firewall is also disabled I have checked settings over intenet and applied still not able to connect remotly I am using windows ...
0
votes
0answers
11 views

How to join tables in different database on the same Sybase server

Am working on Sybase ASE 15.5. I have 2 databases created in the same server, "DatabaseA" and "DatabaseB". The database owner is "User". Logging in as "User" I created a table in "DatabaseB", called ...
0
votes
1answer
21 views

Oracle 11g Sync Standby Database

Currently, I synchronize the standby database from primary database by copying archive logs from primary server to the secondary server. I do this activity daily. I have heard that there are automated ...
0
votes
1answer
22 views

RDS Replication Error (Apply Error 1406 / Truncation)

I have a MySQL RDS instance as a master, created a Read Replica from it, and ran some schema change operations on it. To be specific, I changed the charset and collation of all the tables and columns ...
0
votes
1answer
33 views

sql org chart hierarchical table to xml json

I have a table of employees and managers: create table emp_mgr (emp varchar(99), mgr varchar(99)) insert into emp_mgr select 'Adam',NULL; insert into emp_mgr select 'Bob','Adam'; insert into emp_mgr ...
5
votes
1answer
19 views

How can I combine two event tables into a single timeline, in PostgreSQL?

Given two tables: CREATE TABLE foo (ts timestamp, foo text); CREATE TABLE bar (ts timestamp, bar text); I wish to write a query that returns values for ts, foo, and bar that represents a unified ...
-4
votes
0answers
27 views

I Have Database with 100 tables so 50 tables contained indexes and second 50 are not contained indexes, i ran the rebuild index job what happend? [on hold]

Could you please tell me answer.for this problem I Have Database with 100 tables so 50 tables contained indexes and second 50 are not contained indexes, i ran the rebuild index job what happend?
0
votes
1answer
8 views

Setting the column width of a column in a table created by logparser

I'm trying to use LogParser for ETL. I am trying to import this file with the following command: "c:\Program Files (x86)\Log Parser 2.2\LogParser.exe" "SELECT Field1 AS CountryCode, Field2 AS Zip ...
1
vote
1answer
15 views

How to export SSIS (SQL Server Integration System) packages to third party data source

I want to export SSIS packages into a HANA databse. Please guide me through the exact steps to achieve this.
1
vote
1answer
51 views

two similar queries with different results (one very slow)

Two almost identical queries, but one is extremely slow. All tables are innodb. Explain statements attached, but I don't know how to resolve it. userHits (table structure) -id - int - primary ...
-2
votes
1answer
29 views

Changing the initial size of log files

I am changing the initial size of log files but it goes back to its previous size. Can somebody please let me know what do I need to do so that it gets the new size? Thanks
2
votes
0answers
29 views

How to model an activity feed

I'm having a hard time modeling an activity feed that should show events based on user roles. I'm using Postgresql 9.4. I have a projects table. Each project has many users through a memberships ...

15 30 50 per page