All Questions

Filter by
Sorted by
Tagged with
13
votes
3answers
14k views

Index max row size error

Is there a upper bound for an array column? I am getting this error when inserting into the array field - PG::Error: ERROR: index row size 3480 exceeds maximum 2712 for index "ix_data" Here's my ...
11
votes
2answers
2k views

SQL Server 2012 Availability Group is it “AlwaysON”?

In a traditional SQL Server cluster when failover occurs, all clients that are connected to the SQL Server failed instance lose connections and each client must re-establish a new connection to ...
1
vote
2answers
986 views

For a boolean settings table, should I toggle a flag, or insert/delete?

I have a settings table. SETTINGS -------- settingId int settingName varchar(20) Each user can choose to apply the settings, or not. The interface allows them to quickly toggle the settings on or ...
10
votes
1answer
544 views

What does “*password------------” mean in a profile deadlock report?

In SQL Server 2008 R2, I got several deadlock reports that have "*password------------" in the input buffer. It looks like an attack but in that case I don't know the reason or the kind of attack. (...
6
votes
4answers
6k views

Script Contents of SQL Server Database From a Batch File

I want to be able to script the schema of a given database into a .sql file from the Windows command prompt. Basically, I want to execute the "Generate Scripts" feature of Management Studio ...
8
votes
3answers
6k views

What can I do with the new json field?

PostgreSQL 9.2 introduced the json field type. Why and when should I use it? What benefits does it have over a text field? I thought there were new query options available, however I haven't seen ...
8
votes
1answer
15k views

Indexing SQL Server datetime Columns for Performance

Will adding an index to a datetime column increase performance if a WHERE myDateColumn BETWEEN @startDate and @endDate clause is frequently applied to that datetime column? If yes, should the index ...
11
votes
2answers
9k views

Impact of changing the DB compatibility level for a Published replicated DB from 90 to 100

I have a SQL Server 2008 R2 server with a bunch of published databases that are currently operating under compatibility level 90 (2005). The subscription databases are also SQL Server 2008 R2, ...
3
votes
5answers
1k views

How can I replicate MySQL data from many servers to one?

All over the internet I can find manuals on how to replicate databases from master(s) to slaves. What I need is to continuously keep a copy of table from 5 different servers in sync. We have one ...
2
votes
0answers
747 views

Incorrect data when we using the CONVERT_TZ function on DST boundaries

We have a problem in converting time zone from "America/New_York" to "UTC". This problem occurs only on times representing 2.00 AM during the daylight saving. Timezone conversion with correct output ...
2
votes
1answer
127 views

Help with database design

I'm quite the beginner when it comes to databases, so please bear that in mind. I need to store user statistics in several categories for an application. In the near future I will most likely need ...
1
vote
5answers
7k views

Tuning MySQL to consume less memory

I have a VM which has 2GB Ram, (full specs) And I am setting up a site which has one table in particular with over a million records. There's little or no usage of this particular database (perhaps ...
3
votes
3answers
10k views

Managing SQL Server MDF and LDF file size

I am new to SQL Server and don't fully understand its architecture. I've looked around, Googled, asked around but found no simple (understandable) answer to the problem. I'm not even sure if it is ...
1
vote
2answers
5k views

Moving data from Oracle to SQL Server : Table size optimization

I am loading data using SSIS from Oracle to an SQL Server database. One table I moved had a size of 4 MB under Oracle but when loaded to SQL Server, the size grows to 7.96 MB! I analyzed the size (...
2
votes
1answer
2k views

Do database servers need load balancing?

I am trying to build a 1TB database on MySQL which will need strong read performance. I intend to replicate my database to prevent downtime. Do my database servers need load balancing to improve ...
4
votes
3answers
5k views

Sql Server 2008 R2: Simple recovery model with transaction log backups

I'm busy reviewing my SQL Maintenance plans and I'm a bit confused with the recovery model option on the databases, specifically related to point in time recovery. Here is my scenario: I have two ...
4
votes
1answer
143 views

help required with indexing and query optimzation

After browsing most of the posts and after running out for options I am posting here. I have a table with 76,222,954 (76M) rows. It collects web site traffic based on country. Here is my table ...
2
votes
0answers
241 views

phpMyAdmin slow for small database

I have a small database (<100 KB when dumped) that will hang in phpMyAdmin when I try to sort by various columns. Sometimes it hangs when I try to edit columns by directly clicking on their ...
3
votes
4answers
8k views

Select from linked server to local server causing waits on both sides

The queries in question are here: http://pastie.org/4833351 Run individually, each of these queries runs through (albeit slow). Run as a group, it just sits there, showing either OLEDB waits on the ...
5
votes
2answers
35k views

How to take Oracle backup and restore?

I am coming from SQL Server background where SQL Server studio has a very easy way of taking database backup and then doing a restore. I have been using Oracle 11G express edition for past couple of ...
4
votes
3answers
45k views

How do I discover the Oracle Express workspace name?

Is there a way to discover the WORKSPACE name if I've forgotten it? I cannot login to the APEX admin console since I've forgotten what the workspace name was. I do know the SYSTEM user password. ...
28
votes
4answers
15k views

MySQL InnoDB crash post-mortem

MySQL crashed on me this morning. With the exception of the standard MySQL included databases everything I use is InnoDB. I attempted to restart the MySQL daemon but it failed twice. I then ...
19
votes
2answers
13k views

Should I use the PostgreSQL bit string?

I've been learning about the bit string data type lately, and I am quite curious about: At the bottom of this doc page there is the sentence: ... plus 5 or 8 bytes overhead depending on the ...
4
votes
0answers
118 views

Merge Replication Optimization

I am running Merge Replication on Microsoft SQL Server 2012 through web sync. Is there a way to recognize when regenerating a new snapshot and applying it would be more efficient than running a merge?...
2
votes
1answer
8k views

How do I completely remove MySQL from a 64-bit windows 7 machine?

I'm new to MySQL and struggling to find a version and workbench which is stable on my 64 bit Windows 7 machine. I've decided to attempt to completely remove MySQL from my machine and to restart the ...
2
votes
2answers
1k views

PostgreSQL - automatically create a database for users on first login

Is there a way to configure PostgreSQL to create a database whose name is the same as the username on the user's first login? Scenario: In pg_hba.conf there will be a rule something like: local ...
0
votes
0answers
60 views

Running a CTE query in a loop using PL/PGSQL [duplicate]

Possible Duplicate: Running a CTE query in a loop using PL/pgSQL (Cross-post from https://stackoverflow.com/q/12625914/1555778) I'm trying to execute query that is repeatedly called in a loop ...
4
votes
1answer
1k views

Merge Replication: Where are rowguids of conflict losers stored?

I'm trying to obtain the row guid of all the merge replication conflict losers listed in my conflict viewer. The bug that was allowing the conflicts to occur has been identified and resolved but now ...
4
votes
2answers
4k views

Running a CTE query in a loop using PL/pgSQL

I'm trying to execute query that is repeatedly called in a loop using plpgsql -the loop iterates over another table (named coordinates) that contains top left and bottom right latitude/longitude ...
2
votes
1answer
282 views

Use of hash functions in group by?

I'd use a listagg() to generate a list of components a certain customer has and compare it to another list generated the same way somewhere else to detect inconsistencies. The problem is that ...
5
votes
1answer
10k views

Who changed/modified stored procedure in SSMS 2005 or 2008? [duplicate]

Possible Duplicate: Determining how a schema change occurred? I have a stored procedure that was modified late last night and just spent the majority of the morning tracing issues back to this ...
6
votes
2answers
2k views

Should I rely on Database Engine Tuning Advisor for creating indexes?

How should I rely on SQL Server 2012 Database Engine Tuning Advisor for creating indexes and statistics? I find more often than not, it generates overly complex indexes that (I think) would be more ...
2
votes
1answer
9k views

How to monitor INSERT failures?

An application INSERTS a parent record then child objects. Both these procedure call different stored procedures. Parent can have many child objects. Typically both parent and child would be inserted ...
4
votes
1answer
158 views

SQL Server 2005, Foreign key check against part of a table

I have an articles table that references a categories table. I'm defining the foreign key like this: constraint fk_categoryid foreign key (categoryid) references categories (categoryid) on update no ...
5
votes
1answer
4k views

When dedicated server process model should be used instead of shared process model?

It looks like Oracle shared server process model is better than dedicated server process model. In a shared server configuration, client user processes connect to a dispatcher and it can support ...
1
vote
1answer
763 views

SQL Server 2012 AlwaysOn cannot connect using the Listener IP

I have setup a Windows network in an Amazon in a VPC. I have setup two SQL servers and configured Always On. Everything works OK, except that I cannot connect to the SQL Server using the AAG Listener ...
5
votes
3answers
25k views

ERROR Cannot find or open table?

MySQL version: 5.5.24 Due to the following problem: mysql> desc reportingdb.v3_zone_date_cpm7k; ERROR 1146 (42S02): Table 'reportingdb.v3_zone_date_cpm7k' doesn't exist /var/log/mysqld....
6
votes
3answers
2k views

Install PostGIS v2 for PostgreSQL v9.2

I have installed the latest stable version of PostgreSQL v9.2 and I want to install the PostGIS v2 extension. I've been searching for it for 3 days now, however can't find it. I did however find ...
1
vote
2answers
126 views

How can I improve this query

I have the following table: CREATE TABLE `twitter_relationships` ( `id` int(11) NOT NULL AUTO_INCREMENT, `user_id` int(11) NOT NULL, `source_twitter_id` bigint(20) NOT NULL, `...
0
votes
2answers
151 views

Are these two queries technically equal to each other?

Ran it in my query browser. I was am getting same results for both. But still need a confirmation. SELECT cs.RSCode , CustomerName , em.EmailId FROM Customer_STN cs JOIN ...
1
vote
2answers
151 views

Difficult categorising of rows

First off, I'm not a DBA at all, I'm more of a front-end guy, but I'm currently hitting a brick wall and can't figure out how to tackle it. A database I am working on has a table with several columns. ...
0
votes
1answer
578 views

Field not being sorted in ascending order in Visual Studio 2010 [closed]

I have the following SQL: ;WITH times AS ( SELECT '0830' AS t UNION SELECT '0930' AS t UNION SELECT '1030' AS t UNION SELECT '1130' AS t UNION SELECT '1230' AS t ) ...
2
votes
4answers
181 views

SELECT Statements only please

I have a user that wants to use SQL Server Management Studio (SSMS) to run SELECT statements. I don't want him to be able to modify data. I can't regulate his permissions through Windows ...
3
votes
1answer
1k views

Can I monitor the progress of importing a large .sql file in sqlite3 using zenity --progress?

I'm trying to monitor the progress of a sqlite3 command importing a large .sql file into a database using zenity --progress. I've tried the following which will import the file, however progress is ...
1
vote
3answers
185 views

Query missing one date; only happened today

This should be pretty reproducible I hope. I'm on Oracle 11g. This query, which I use as part of another query, is acting strangely: SELECT TRUNC(SYSDATE - ROWNUM) DATEITEM ...
2
votes
2answers
501 views

Replacing the MS-Acccess frontend for accessing linked tables with SQL Server?

Is it possible to use SQL Server / SQL Server Management Studio to do queries across linked tables the way that you would do them in MS-Access? The MS-Access front-end is frustrating and time ...
13
votes
2answers
1k views

Understanding MS SQL Server encryption and backups

So I was asking in chat about how secure SQL Server backup files are. I'm told that if an attacker has access to the .bak file unencrypted that they can have access to the data. So lets look at ...
2
votes
0answers
6k views

'Access Denied' in MySQL on AWS RDS

I'm trying to use an ETL (in my current case, the free version of Talend). I've successfully set up a MySQL on Amazon RDS, logged in through the MySQL Workbench for Mac, and uploaded my company's ...
2
votes
0answers
946 views

SQLite Performance Tuning

I have the following query, which fetches data from only one table. It is a query which is supposed to return data for an autocomplete function. Autocomplete data can be in text1 or text2. The ...
6
votes
1answer
2k views

Is it possible to wrap aggregate functions in Postgres?

Postgres' string_agg(expr, delimiter) function is great. But I would like to have a version that takes a single argument -- the field to aggregate -- and assumes a delimiter of ', ' since that is ...

15 30 50 per page