0
votes
1answer
161 views

Postgres DB - Commit xlog files after server crash

After a server crash, it would seem that all transactions going back a number of months are not showing up in the live Postgres DB. Investigation has found all xlog files that does contain the data ...
1
vote
1answer
1k views

Indexing issues while partitioning with dbms_redefinition

I get an error while doing the redefinition. Following are the steps which I have taken so far: Step 1. Start redefinition DBMS_REDEFINITION.CAN_REDEF_TABLE(v_name, 'T_FDC_TOOLCONTEXT', ...
1
vote
2answers
897 views

How to identify the db orphan mdf and ldf files

I want to identify the orphan mdf and ldf files on the disk and remove them. After searching on the internet, found the script below on MSDN forum. But when I run the script it returns many ...
2
votes
1answer
4k views

MySQL 5.5 - Innodb - innodb_log_file_size higher than 4GB combined?

When reading online about innodb_log_file_size, it says The combined size of the log files must be less than 4GB So what happens if it needs to be larger? In books and online, it says to set ...
1
vote
2answers
126 views

Can't create table with this script

Trying to create a table with the script below. Every time I execute it I get the following error and can't work out why?! #1064 - You have an error in your SQL syntax; check the manual that ...
0
votes
1answer
1k views

Save output from multiple SQL SELECT commands to a file

Within a Postgres function I would like to run a number of SQL SELECT commands and append the output to the same variable. After all the SELECT commands have run this output should be written to a ...
1
vote
2answers
2k views

Correct Code Page or Collation in SQL Server for Portuguese characters

I'm inserting data (Bulk insert and merge update) for a Portuguese data source (CSV files) into my database. Although the DB collation is Latin1-General, case-insensitive, accent-sensitive, ...
3
votes
1answer
598 views

Filestream database backup error

We have DatabaseA that has filestream files in it. We then have an archive process which first deletes files in DatabaseB (different server) and then inserts new files from DatabaseA into DatabaseB ...
1
vote
1answer
782 views

Is it bad to assign specific processors to SQL Server 2008 R2 cluster instances?

I have a SQL Server 2008 R2 failover cluster with a passive node and an active node. The servers are physically identical. I have two instances of SQL Server, one set to use all the CPUs in the ...
0
votes
2answers
311 views

Relationships in a school database

I am designing database for a school app. Student is the main entity in the database. Student has relation with Parent & Guardian. I am confused as where to store references. As will student ...
2
votes
2answers
241 views

Database Restoration Issue

I am new with postgresql. When I attempt to restore database a .sql.gz file into the database with psql, the restore does not complete when the database size is too large (32Gb, for example). These ...
0
votes
1answer
82 views

Is there any way to get recently inserted value in a table without using aggregate functions?

I tried to get the users list who are all accessed our application in past 6 months . In our table , we are storing login_time , user_id ..etc . It's a huge table approximately it will contain over 3 ...
1
vote
1answer
84 views

Phantom Table in MySQL

Programmer here, be gentle. I'm working in a MySQL database with only a single table, as shown by show tables: mysql> show tables; +----------------------+ | Tables_in_widget_web | ...
2
votes
1answer
617 views

Why do I have to drop a snapshot in SQL Server 2012 to restore a database?

I never had to drop a snapshot with SQL Server 2008, but now when I try to restore in SQL Server 2012, I get the error: System.Data.SqlClient.SqlError: The operation cannot be performed on a ...
1
vote
1answer
332 views

Can I use symlink or data directory for ARCHIVE MySQL tables?

All mention of either using a symlink or data/index separate data directories state that MyISAM is the only supported (https://dev.mysql.com/doc/refman/5.5/en/symbolic-links.html). However, I found ...
1
vote
1answer
456 views

Snapshot not picking up new articles in SQL Server 2012 transaction replication when added through script

I am trying to add new articles to an existing publication in SQL Server 2012. I am adding the article to the publication with the syntax --add the table into the correct publication sp_addarticle ...
1
vote
1answer
151 views

Do locks on readonly secondary databases propagate to the Read/Write Database

I'm thinking about using SQL Server Availability Groups in SQL Server 2012 to offload reporting on our main database to a second read only server that is kept in sync through the availability group. ...
3
votes
2answers
186 views

Find top by values by percents using range in SQL Server

What will be easier way to group records by range of percents. Here what I try to accomplish Select top percents between 50 and 75 * from myTable order by PKI Here is way I did this but I have ...
2
votes
0answers
99 views

Find out who/what logged in via a DAC connection

My SQL Server just died due to a DAC connection being established. I need to find out how/who or what caused this connection? Is this logged anywhere? Can anyone shine any light on this?
1
vote
2answers
413 views

Data warehouse support tickets

I'm starting to design a data warehouse for a company. The first questions we're trying to resolve are regarding their support ticketing system. My initial schema is as follows Now one of the ...
2
votes
1answer
255 views

Does MySQL have problems with nested insert like with subqueries in where?

Query 1: INSERT `personal`.`locations` SELECT DISTINCT `s`.* FROM `references` `t` JOIN `locations` `s` ON `first_id` = `s`.`id` WHERE `lat` >= 37.3 AND `lat` <= ...
1
vote
1answer
152 views

PostgreSQL replication

I have two projects working on different databases. The problem is: I need to replicate changes in the databases only for a few tables. I need it to synchronize the data. Need an advice how can I ...
4
votes
2answers
459 views

Backup Only Database Schema Everynight

I have an instance with 15 databases on SQL Server 2012. I will set up to backup system which will work every night. I want to backup only the schema because several databases are very big. I haven't ...
2
votes
1answer
583 views

What should be done before upgrading MySQL?

I need to perform an upgrade of MySQL on my web server. There could be many users connected to the server at any time, performing queries or updates on the database, or uploading files to the server. ...
4
votes
2answers
113 views

Performance of different precedence pseudocolumn solutions with LIMIT

I was wondering about the relative performance of the solutions provided in the answers to a question on stackoverflow, I decided to run some tests. The OP wanted to get the first matching row given ...
0
votes
0answers
9 views

speed up data transfer from SQL server to application [duplicate]

I have build an application that handles data stored in a MS SQL server database. This server is hosted externally of our company and has to be connected to via SSH because of company rules. On a ...
1
vote
1answer
314 views

Row_number and wrapping select ?

I have this code : Select name, age , row_number() over (partition by name order by age desc) rn from my table (goal : select the oldest guy among same names) If I want to select all the row ...
2
votes
3answers
2k views

SQL Subquery , One to Multiple rows

Following query I have written returns the result as expected, example 121350 rows. SELECT dbo.Articles_in_Consignment.Consignment_id, dbo.ORDER_D.Orders_boxsize, ...
1
vote
2answers
564 views

Split date range into indiviual records

I have a table called staff_leave, and I want to split date range to days per row. is it possible. I am a newbie please take it easy . like: there is a date range 01/01/2013 - 05/01/2013 and i want ...
0
votes
2answers
1k views

How to select row and column name where field is null?

I wanted to show row and column where field is null. i already see this example here but i don't understand xml code. my code is like this if exists (select * from Header where [name] is Null ...
2
votes
1answer
114 views

Unique Non Clustered Column in Partitioned table

We have partitioned one of our SQL Server tables on a Clustered Index datetime column, we have a Primary key Non-clustered index column with Identity data type and this column is setup as a ...
0
votes
2answers
48 views

creating user related user specific content

Should you create a table for each user to contain information on specific content for an account, say favorite articles, interests, ect. User defined lists that would be used to generate useful ...
1
vote
1answer
226 views

Delete word, its meanings, its meaning's example sentences from DB

I have three tables as below (simplified for demonstration): words ===== integer id text word meanings ======== integer id integer word_id text meaning examples ======== integer id integer ...
1
vote
0answers
82 views

Page Header DB Frag ID Property

I am using SQL Server version: Microsoft SQL Server 2012 - 11.0.2100.60 (X64). I created a single table containing one and only one integer-valued column. I then added one and only one row to the ...
0
votes
2answers
243 views

Best MySQL storage engine for read heavy table with two indexes

I have a pretty big MySQL table (70G) with about 15 columns and 1.5M rows. There is one index on the autoincrement id and one on a foreign key (integer). Apart from that there are several VARCHAR and ...
0
votes
1answer
4k views

Mysql 5.5: Optimizing all tables with mysqlcheck - is it useful to run the -check option along with -optimize?

I plan on running 'mysqlcheck --optimize --all-databases' to clear up some fragmentation. Would it be useful to run -check with this option or does the -optimize already take care of that? I am only ...
2
votes
1answer
166 views

MySQL server connections capped at 1013

For the last few days I've been trying to figure out why my MySQL read slave servers are capped at 1012+1 (+1 for the superuser) connections when I have the max_connections set to 5000. It seems that ...
1
vote
2answers
612 views

ERROR: could not find array type for datatype information_schema.sql_identifier

I am trying to run the below sql command: SELECT ARRAY( SELECT column_name FROM information_schema.columns WHERE table_name ='gis_field_configuration_stage' ); and I get the below ...
4
votes
2answers
605 views

How to keep off-site developer databases up to date with production?

We have a production database running on SQL Server 2008 R2 with files stored in it. We were concerned about the size of the database so we've opted to enable FILESTREAM so the files would be stored ...
3
votes
2answers
2k views

DB2 to require password each time

I am using db2inst1 to connect to a database in DB2 which I have installed on my machine. Therefore, db2inst1 user does not require username/password authentication (borrows them from the OS). I would ...
1
vote
1answer
141 views

cloud computer to speed up sql big data queries?

i have been doing a lot of data mining at my new job. we collect TONS of data, and it's my job to visualize that sea of information in real time with statistic/heuristic analysis. we're currently ...
1
vote
1answer
178 views

Can't SHOW GRANTS after MySQL re-install [closed]

I had to completely re-install MySQL on one of the slaves and then rebuild it via a sql dump (we have 1 master and 2 slaves). I tried to SHOW GRANTS for one of the users, but keep getting the ...
3
votes
0answers
206 views

Are the following statements concerning sys.dm_exec_requests true?

Parallel plans mean that cpu_time can be greater than total_elapsed time. Therefore, per-query wait time is not possible to determine accurately from DMVs on servers with more than one CPU thread. ...
2
votes
1answer
543 views

How to model a user/group relationship where users are assigned an unique number within the group?

I am working on a web-server applications that deals with 2 entities: users groups A user can belong to one, several or no group at all. Fairly usual, I assume. However, I have additional ...
2
votes
0answers
2k views

Access 2010 linked table - solve the “decimal field's precision” error

I have an Access 2003 database (running on Win 7 64-bit, Office is also 64-bit) that has many linked tables pointing to an Oracle 11g instance through 64-bit Oracle ODBC driver. Most of the tables ...
2
votes
2answers
706 views

How can I do a differential query (delta plus/minus) telling me what rows are in view A that are not in view B and vice versa?

I have two views which use radically different means to accomplish what I hope is the same end view. One uses complex query expressions and walks entire giant tables and is highly expensive, and the ...
3
votes
1answer
437 views

Execution plan in simple query in PgSQL depends on offset clause, why?

Update on 2013-01-16 11:08: see below I am working on PostgreSQL 8.4.14 with the following table fed with 53k lines: CREATE TABLE botany.taxon_data_cache ( taxon_id int NOT NULL, ...
1
vote
1answer
148 views

What is the locking behavior for Updatable/Insertable Views?

Consider I have a View that is merely a simple join between 2 tables, selecting all columns. The View is Updatable and Insertable. What would be the locking behavior when executing an UPDATE or ...
4
votes
2answers
301 views

Using MyISAM for reading and InnoDB for writing data

I read many articles about comparisons of MyISAM and InnoDB from performance point of view and I decided to use MyISAM for reading data and InnoDB for writing data. I want to use two structure like ...
2
votes
1answer
104 views

Finding similar values in columns

For example I have a column id and column email. I would like to find all values from id and column that share similar pattern. let's say: in id 'column' I have Alexander and in 'email' column - ...

15 30 50 per page