0
votes
0answers
52 views

Issue with refactoring columns and how ODBC query receives data

We just installed iSeries 7 box and migrated a database from i5. The migration was to accommodate a new version of vendor's application. They made some changes to the columns by increasing them from ...
1
vote
1answer
284 views

MySQL with slow queries

I have a website running on Wordpress Multisite + Woocommerce with over 5700 users on a Nginx + Apache server. I recently experienced some down time but didn’t get any errors, just a blank page. I ...
0
votes
2answers
440 views

DB2 - How to get value for: Transation Per Minute parameter for DB?

Hi is there some easy way to find out what is transaction per minute value for the database? Should I use db2 get snapshot? We are using DB2 9.7 ESE on Linux Thank you in advance
0
votes
0answers
32 views

Which of these two queries is better - can be optimized more?

With regards to the usage of the IF statement, which is better to use? Query #1: SELECT whatever FROM auctions AS a LEFT JOIN ............... WHERE ............... ORDER BY ...
0
votes
1answer
127 views

When to use hashtable over binary search tree vice verse for Database Index

Database Index can be constructed using binary search trees (BST) or HashTables , From my understanding so far , HashTables are superior to BST in terms of time taken for searching and insertions ...
2
votes
1answer
674 views

SPIDs stuck indefinitely in suspended state

I have a few application servers that all connect to a central database server. The applications execute stored procedures (that get XML) on the database. Every once in awhile a transaction will get ...
1
vote
1answer
110 views

Correct way to write this query?

I'm trying to write a query that basically is searching by price, though sometimes the items may have a discount on them and this price isn't stored in the DB, only the discount percent and dates the ...
0
votes
1answer
28 views

db2 import and user access

When I import data from DB2 using db2move, the dump file comes with the data exported as "USERX.MYTABLE". The import process seems to be fine, I see lots of: USERX.MYTABLE n rows imported ... But ...
0
votes
0answers
1k views

How can I backup/dump MYSQL database with foreign key constraints?

I wanted to take the dump of the MySQL database with all the constraints on that database. The dump (.sql file) I am having right now don't show any reference key(foreign key) relationship. I am ...
9
votes
2answers
12k views

What is the fastest way to insert large numbers of rows?

I have a database where I load files into a staging table, from this staging table i have 1-2 joins to resolve some foreign keys and then insert this rows into the final table (which has one partition ...
2
votes
1answer
821 views

Oracle idle connections lost

I have a problem with an Oracle 11g instance. Every connection that has been idle for about 20 minutes are lost. I get the following error ORA-03135: connection lost contact I did the following ...
2
votes
1answer
363 views

Specifying columns in LEFT JOIN through subquery beneficial performance wise?

I'm trying to understand how JOINS are handled, and was wondering about the following: Imagine a big query concerning a lot of tables, I'm really looking for small optimizations as it's a pretty ...
0
votes
1answer
158 views

What is the correct name and significance of EAV table pivot?

I've been forced to use a very uncomfortable structure for a table. After trying to up similar examples, I've discovered the EAV, which seems almost like a pivot of said structure. The attribute order ...
1
vote
0answers
193 views

restore using mysqlbinlog failing

While doing restore from a MySQL binary log file, it is failing with the following error . mysqlbinlog mysql-bin.000036 | mysql -u root -p asdb ERROR 1032 (HY000) at line 48: Can't find record in ...
2
votes
1answer
281 views

Normalisation of practise database [closed]

I am a newbie to database design, and I'm a bit confused about how to create a database with minimum redundancy. Suppose I have a table abc with repetition of data in it and no two rows are same. Now ...
1
vote
2answers
1k views

Very slow execution of a simple query

I try to create a report for my data, but it is really slow on a big table. The table structure is: CREATE TABLE posts ( id serial NOT NULL, project_id integer, moderation character ...
1
vote
1answer
118 views

Trigger to restrict users from creating a new table in the database

How do I create a SQL Server trigger that will restrict any users from creating a new table in the database? Please help me with this. Thanks & Regards, Ritesh.
0
votes
1answer
129 views

Oracle 11g accessing data in Oracle 7

I am working on a project that involves converting production data from an Oracle 7 DB to our system, which use Oracle 11g. In our other projects, we use DB link to access the other system DB, which ...
1
vote
1answer
56 views

Method for identifying max_allowed_packet queries generating errors in MySQL

I'm wondering if anyone knows of a good way to track down queries causing max_allowed_packet errors. Even if you turn on general query logging the query isn't logged as the connections aborted ...
5
votes
2answers
142 views

Why is an entire index that is infrequently used stored in the buffer pool?

I have been looking at the memory usage of a server and noticed something odd when drilling into the details. One index is eating up ~15GB of the buffer pool. That happens to be the size of the entire ...
1
vote
1answer
439 views

Oracle views not using indexes [closed]

I am experiencing the unexplainable - at least to me. I have some tables in my production database which have some indexes on. We then have a number of views which merge the data across tables to ...
0
votes
1answer
542 views

PostgreSQL, storing encrypted data or encrypt database with pgcrypto - what is more secure? [duplicate]

I have two machines: client and server (a database server). I want to connect from client to server and manipulate data from database (insert, update, delete, select) using dblink. I would like to ...
1
vote
1answer
438 views

Backup Database (SQL 2000 Compatibility) on SQL Server 2005 with CHECKSUM, but Page Verification TORN_PAGES Detection

I am trying to backup a 250GB database on SQL Server 2005 running in SQL 2000 compatibility mode. The page verification is set to TORN_PAGES detection. So, far the backup has been corrupted when we ...
0
votes
1answer
351 views

PostgreSQL dblink password encrypted or not?

I have two PostgreSQL servers: server 1: 192.168.0.1 server 2: 192.168.0.2 I want to connect to the database on server 2 from server 1. I do it like this: SELECT ...
0
votes
0answers
744 views

“ORA-19599: block number 1 is corrupt in archived log” while doing active duplication of database

I am attempting for Active database Duplication and facing the ORA-19599 error. Script used and error are below:- duplicate database to reynolds from active database nofilenamecheck spfile set ...
0
votes
1answer
420 views

Postgres database migration “zero” downtime

I have a setup with a JBoss EAP server, postgres 9.1 database. I will soon update so I have two JBoss servers in a cluster. This is mostly to avoid downtime when doing application deployments. With ...
0
votes
1answer
2k views

Oracle strong ref cursor with dynamic sql

I'm using Oracle 10g. I have a query in a stored procedure that selects entire rows from a table. Currently it returns a strongly typed ref cursor (tablename%rowtype). Now I have to add some dynamic ...
3
votes
3answers
822 views

SQL Profiler - Insert values?

I setup an SQL profiler to run, but I am not seeing any values for updates/inserts. Is there a way to see them? All I see is stuff like this: insert into some_tbl(id, col1, col2, col3) values ( @P0 ...
1
vote
0answers
466 views

Error: 18456, Severity: 14, State: 11 [closed]

I have a brand new server (VM) just built. I installed SQL Server 2008 R2 and applied SP2. I opened an RDP session in console mode as myself. During installation I had the Windows AD group for the ...
0
votes
0answers
159 views

How do I perform a batch update on the first n matching rows?

I need to perform a large number of updates at the same time. Each update needs to only affect up to a specific number of rows even though the WHERE clause might match to many more rows. So far, I'm ...
0
votes
2answers
775 views

Cannot stop MySQL 5.5 replication threads

We have a master-master replication setup using MySQL 5.5. On one of the servers I am trying to stop the slave thread, but without success. To ensure that the replication does not connect to a real ...
1
vote
0answers
474 views

USING to join multiple tables with same field

I have 4 tables, each with a common field QuestionnaireId. I am wondering if there is any difference in output or performance difference between using USING on the field in each join or by specifying ...
1
vote
1answer
146 views

Optimizing Postgres query

I've got a one to one relation from users to addresses table. Where one user can have one search address and one verified address. I've got two indexes on addresses table : Index on state field ...
0
votes
0answers
24 views

Connecting mysql on server A/ to webapp on server B/

I am connecting mysql on server A/ to a webapp located on server B/. Both servers are Ubuntu servers. For security purposes, is there any way on server B to avoid showing the full path / IP address ...
1
vote
2answers
80 views

Not able to produce table based on conditional select

I would like to achieve something that probably ends up in some kind of conditional select (MS SQL) but I do not know how to. I have tried to simplified my problem to the description below: I have 3 ...
5
votes
2answers
2k views

Does the Sql Server Agent account need sysadmin permission?

I ran Brent Ozar's sp_blitz script, and one of the things it's complaining about is that my SQL Server Agent account has sysadmin permission. I removed the sysadmin permission, but then the agent ...
0
votes
0answers
53 views

Output datetime from MySQL with offset

I'm currently writing to a datetime XML field from MySQL data. The MySQL field is populated with current_timestamp() but this only outputs - 2014-02-18 15:34:02 whereas I need something like ...
2
votes
1answer
4k views

Set value of character_set_client to utf8mb4

I'm trying to convert my DB to utf8mb4 by following this guide. I have set: [client] default-character-set = utf8mb4 [mysql] default-character-set = utf8mb4 [mysqld] init-connect='SET NAMES ...
0
votes
0answers
204 views

Best way to select rows containing a substring

I've a table named comments where comment is a field where comment will be stored. Now I want to find -1 within that comment. the -1 should be independent. That is, it should not be joined with ...
2
votes
2answers
993 views

MySQL Master/Slave replication on same VM instance?

I'm fairly new to databases so I hope this isn't a silly question! Is it possible to set up master/slave replication on the SAME server? I understand there are not any advantages to this in terms of ...
0
votes
1answer
1k views

MySQL Workbench - Creating a one-to-one relationship using existing columns?

How do I create a one-to-one relationship using existing columns in MySQL Workbench? I have an EER diagram tab open and I am selecting from the toolbar on the left hand side. Unfortunately it seems ...
5
votes
1answer
274 views

Method or Counter to track dropped connections in SQL Server?

Our production server is running SQL Server 2008 (non r2). I'm working on investigating and issue that appears to be networking or connection related, where our web server is losing or dropping ...
5
votes
1answer
353 views

SQL Server 2014 In Memory OLTP - Garbage Collection on Transaction Rollback

In SQL Server 2014, In Memory OLTP, What happens, if a transaction is rolled back and newly created version of row is no more required. Is it duty of garbage collector to remove even such type of rows ...
2
votes
1answer
161 views

Can you restore log file backups to a mirror database after failure?

Purely a theoretical question as I've been considering possible DR scenarios... In this scenario: The link between a principle and a mirror server becomes unavailable for a period of time (e.g. ...
0
votes
1answer
800 views

What is wrong with this a MySQL 5.6 procedure definition? Use a variable for table name [closed]

Just can't understand why it's throwing this error? Error Code: 1064. You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use ...
2
votes
1answer
531 views

Forgot mysql owner/root username and password

Recently, I changed my mysql root user to someother username (say kevin). But, now both the accounts don't login with the old password. It says access denied. I'm also not sure if the username is ...
2
votes
1answer
76 views

Understanding postgres reason for picking this query plan

I ran a query: select * from orderline where orderid = 12345 and status > 0 that gave me the following plan: Bitmap Heap Scan on orderline (cost=286370.00..531410.78 rows=76372 width=155) ...
0
votes
1answer
77 views

Override Dimension Column Value

I have a dimension with a column called 'Type'. There is a list of default 'Types' in this dimension. However, this 'Type' column can be overriden. i.e. each user can replace the default value with ...
1
vote
2answers
5k views

Restore .Bak file to different Server

I Copied some database backups from one server to another server(new instance no databases are present).I tried restoring using below command Restore database dbname from disk='g:\e2bak\dbname.bak' ...
1
vote
2answers
870 views

semaphore in SQL Server

I wrote a stored procedure in sql to take a number from table. it has lots on records which has only column. whenever a call it , is should take the first record and return it after that delete the ...

15 30 50 per page