2
votes
1answer
1k views

Installing Oracle XE 11gR2 on Fedora 15 - linux group permission deadlock

During installation of Oracle XE 11gR2 on Fedora 15, I am presented with: The install cannot proceed because ORACLE_BASE directory (/u01/app/oracle) is not owned by "dba" group. You must change ...
3
votes
3answers
3k views

Can Oracle SQL developer export data as a set of Update commands?

Oracle SQL developer gives us the option of exporting data. But it only gives us the option to export as a set of Insert statements. I have two databases with a mirrored table. One of them has some ...
13
votes
1answer
17k views

Change length of varchar on live prod table

I have a MS SQL Server 2008 R2 DB server currently in use with a production app. A new enhancement to the app now requires a varchar(100) column in a table to be increased in length. Can the ...
2
votes
3answers
15k views

How to initiate MySQL on Mac OS X 10.6.8?

I followed this tutorial to install MySQL on Mac OS X 10.6.8. Now I get he following errors: $ mysqladmin version /usr/local/mysql/bin/mysqladmin: connect to server at 'localhost' failed error: ...
8
votes
3answers
29k views

How do I get a list of all the partitioned tables in my database?

How do I get a list of all the partitioned tables in my database? Which system tables/DMVs should I be looking at?
3
votes
1answer
889 views

How to set datadir to different values based on the hostname in my.cnf?

How to set datadir to different values based on the hostname in my.cnf? I want to use the same my.cnf file on a Linux machine and a Mac OS X machine where the datadir should have different values.
5
votes
3answers
317 views

Which is the most efficient way to run a particular select query?

If I run the following code: select PolicyNumber, MAX(decpageid) as decpageid, Risk from StatRiskDecpages where PolicyNumber = 'AR-0000301132-04' group by PolicyNumber, Risk I get the following ...
6
votes
1answer
866 views

Are there any performance benefits to using a hash table with no clustered index?

I have this table: CREATE TABLE [dbo].[relatea] ( [mid] [varchar](16) NOT NULL, [sid] [varchar](16) NOT NULL ) It stores hash matches. Is there any benefit to having this as a heap? It has ...
2
votes
3answers
5k views

What's the difference between functions and stored procedures? [closed]

I heard that the difference between functions and stored procedures in SQL Server is that functions are not stored in the database while stored procedures are. Is that true? If not, what are the ...
1
vote
2answers
1k views

Cursor doesn't print text when I tell it to

I have used WAITFOR combined with a cursor in the following script: create table orders(orderId int primary key,productId int,productName varchar(20)); insert into orders values(1,11,'book'); insert ...
5
votes
2answers
2k views

Dropping and recreating indexes for performance reasons?

I'm maintaining Somebody Else's Code. There's a stored procedure that's run once a day or week (depending on config), that migrates a bunch of records from an active table to an archive. But it's ...
1
vote
0answers
231 views

PostGIS: Remove stale/obsolete geometry columns from the geometry_columns table [closed]

I understand that the function Populate_Geometry_Columns() inserts records in the geometry_columns table for geometry columns that are not yet listed there. However, an invocation of ...
1
vote
2answers
591 views

pg_upgrade fails with an unspecified error

I’m running Postgres 9.1’s pg_ugrade to migrate from 9.0 to 9.1 on Windows x64. After editing the permissions to allow full trust, running the tool as the postgres user, and working around a bug ...
1
vote
0answers
671 views

Update Statistics Maintenance Plan - Ambiguous column name error

Microsoft SQL Server 2008 R2 Web Edition (RTM) - 10.50.1600.1 (Intel X86) Windows 2003 R2 SP2 I am in the process of setting up a maintenance plan to update statistics on a daily basis for all user ...
0
votes
1answer
311 views

milli seconds to datetime

I have this statement exec [spProject_Update] @ProjectID = 496, @Name = 'Hangman Bollywood iPhone', @Description = '', @EstimateTime = 2674800000 I will get milliseconds in @EstimateTime How to ...
0
votes
1answer
551 views

MySQL table with multiple values in one field

I'm building a database for a real estate company. The real estate properties are managed by sales people using a CodeIgniter website. How should I proceed with the database design for this table? ...
1
vote
1answer
958 views

How do you structure a database that allows for groups to be formed/added by users and also be a part of like facebook?

I'm new to databases and web development so a laymen explanation is best for the time being. I'm only in the data modeling phase so no need for specific code. I'm just trying to wrap my head around ...
1
vote
1answer
315 views

Why are these queries slow in some environments and not others? Can we fix their performance?

The following stored procedures in a MySQL 5.x environment: DELIMITER // CREATE PROCEDURE sp_belongs_to (IN schemaName VARCHAR(100), IN tableName VARCHAR(100)) BEGIN SELECT TABLE_NAME as ...
5
votes
1answer
1k views

PostgreSQL versus MySQL for EAV structures storage

Is there any practical difference or what are the advantages of using Postgres 9.x versus MySQL 5.x for storing EAV (Entity-Attribute-Value) structures, especially in terms of read performance?
6
votes
2answers
1k views

Can't get SQL Server 2012 RTM LocalDB working on Server 2008/x86/ SQL Server 2008 machine

I have installed SQL Server 2012 and LocalDB on my development machine, and am able to connect to LocalDB using both the SQL Server Management tool 2012 and from within my winform application using a ...
5
votes
1answer
246 views

Triggers and the Transaction

We recently made a change to create constraints based on logic previously used in stored procedures, and part of that included the use of INSTEAD OF triggers to centralize logic. The logic is ...
2
votes
1answer
2k views

Why is SQL Server 2008R2 using more memory than the “max server memory” setting? [duplicate]

Possible Duplicate: Microsoft SQL Server 2008 Memory I've explicitly set the Maximum Memory value in SQL server 2008R2 to 13,000 MB, however when I check task manager I see it is using ...
12
votes
1answer
8k views

CREATE DATABASE vs. CREATE ANY DATABASE permissions

In Microsoft SQL Server, what is the difference between the CREATE DATABASE and CREATE ANY DATABASE permissions? I am unable to find an authoritative answer. The best I can infer is that either (a) ...
3
votes
2answers
3k views

How to identify fragmentation level of the table data itself not the table indexes, and then defrag

Every where I can find descriptions on how to identify the fragmentation level of the table indexes, but I cant find how to identify the same for the table data iself. Also defragmentation solution is ...
0
votes
2answers
500 views

Merging Results while avoiding Key Constraint Error?

I have a table with a primary key which is two integer fields, each a foreign key to a different table. (Multi to Multi table) In one of the foreign tables two rows are merged and this table is ...
5
votes
1answer
142 views

Upgrade postgres without messing with ports?

The standard procedure for upgrading Postgres appears to require that I temporarily run both the old and the new version. This means that I have to change the port of the old version. This seems ...
3
votes
1answer
1k views

How to qualify variable inside trigger body (PL/SQL )?

I can explicitly qualify variable in the body of stored procedure or function : create or replace PROCEDURE ptest AS int_val INT; BEGIN ptest.int_val:=0; END; / How to do the same inside trigger ...
4
votes
1answer
689 views

How to query EndDate value from ReportServer..Subscriptions.MatchData

In SQL 2008 R2, I'm putting together some administrative queries on SSRS metadata to check proper configuration, and other sorts of proactive things. While querying the ReportServer db, I've been ...
4
votes
3answers
1k views

How do you structure a database that organizes post by location like craigslist?

I'm new to databases and web development so I'm just looking for a laymen explanation. No need for specific code, just theory. I understand OneToMany and ManyToMany relationships, so no need to ...
10
votes
1answer
2k views

DBCC CHECKDB firing every 20 - 60 seconds

I have a dev environment that is rapidly approaching deployment into production and have noticed in the logs that roughly every 20 seconds I see the message: Starting up database 'dbname' CHECKDB for ...
2
votes
1answer
217 views

Views - Indexes/Keys/Execution Plans

I am working with a SQL 2005 database server that contains multiple databases and tables that are replicated from various sources. No one but administrators have access to this server. There is a ...
5
votes
3answers
596 views

Just how much is a query supposed to slow down the whole system?

This is similar to my earlier question but more generic. I have a system with 16GB of memory, 16 cores, supposedly quality hard drives, RHEL 5, MySQL 5.0.x. Yes, I know, we're working on upgrading ...
1
vote
1answer
6k views

Records in table not showing on form Access 2007

Excuse my ignorance in asking this question - I am a database novice and need help! I will explain as best I can. In the table on my DB I have 235 records. I have created a form which references ...
1
vote
2answers
265 views

Data - Changes Audit Trail

What are typical scenarios where the user might require a data-change-audit-trail?
3
votes
1answer
123 views

Synchronising databases / database technologies

I need some advice before we engage in some costly development work We have two SQL Server database servers on the same network. One runs an in house database and the other a proprietary database ...
2
votes
1answer
230 views

If i issue a rollback when recovery mode is bulk logged, will my bulk operations be rolled back?

If my recovery model is BULK LOGGED, I'm in a transaction, and I've issued some statements that are minimally logged like SELECT * INTO, will a ROLLBACK undo those minimally logged statements?
0
votes
2answers
193 views

Which SQL Server system database is more important: master or resource? [closed]

Which SQL Server system database is more important: master or resource? If the resource database is damaged, can the database engine work? Can the system work with only the master database? If not, ...
3
votes
2answers
621 views

why does my clustered index scan have ordered = false

When I look to at my query plan, I see plenty of clustered index seeks (yay!) and scans (not quite so yay!) but in some of them ordered = False. I will mention that we have parallelism involved, ...
1
vote
2answers
21k views

How to Get the Sum (total) of a column in a query result set

Is there way that I can get the sum of a column in my query result set by just clicking on the column (something like in excel) so that i don't have to copy and paste the column into excel to the see ...
15
votes
2answers
80k views

oracle - list users with access to certain tables

I'm sure this has been asked before but I can't seem to find the relevant details for the following. Is there some sort of pre-built table that can do the following (I have used dba_tab_privs but it ...
5
votes
1answer
2k views

What's difference between standard view and indexed view in SQL Server [closed]

I learn that the indexed view holds the data from base tables while standard view does not holds data.Is it means that the indexed view need memory and standard view don't? Indexed view needs to be ...
2
votes
1answer
2k views

MySQL UPDATE to replace text in LONGTEXT field

I have a WordPress table wp_posts and I'd like to run an UPDATE that will replace a url from my old domain to my new domain. For example, let's say that one record in the field post_content has the ...
1
vote
0answers
185 views

Can not open oracle 10g database when migrated from oracle sql developer 1.5x to 3.1x

I have migrated from Oracle sql developer tool 1.5x to 3.1x and imported my connection settings with database 10g. When I try to open a connectionstring in the developer tool I get this message: ...
5
votes
4answers
3k views

Microsoft SQL server 2008 and linked servers

I'm designing a set of databases which might need to use each other's stored procedures or tables. The reason that I'm creating separate databases is that in the future I want to be able to move any ...
5
votes
2answers
524 views

Optimizing IP Range Search?

I have a simple query and table, and I would like to know which indexing is efficient on this kind of table and query. In my table I have 3 columns CREATE TABLE mYTable(ipFrom BIGINT, ipto BIGINT, ...
2
votes
2answers
11k views

declaring cursor to loop over some values in SQL server 2008 R2

I have some business unit such as India, International, US, UK. I have to: Create a table variable (virtual in-memory table) with columns that match SPROC SP_Report resultset. Declare a cursor that ...
1
vote
1answer
118 views

How to determine if a column is the first part of an index?

Is there anyway to tell with SQL if an indexed column is the first part of an index. The closest thing looks to be information_schema.columns. But that seems to only tell me if it's a PRI or MUL key ...
4
votes
2answers
446 views

Oracle build_plan_xml visualizer

Background: Please review my related question that involves SQL Server : Interpreting SQL Server's Showplan XML I now have a very nice looking Execution Plan display for SQL Server (as a result of my ...
1
vote
1answer
5k views

How to set a specific directory location for individual MySQL database?

Is it possible to set each database in MySQL to use a separate datadir? I'm running a userdir development (sandbox) server and would like to put the MySQL data files for the database(s) for that user ...
3
votes
1answer
594 views

PostgreSQL WAL Archiving: Does having archive_mode set to 'on' without copying logs cause performance issues?

Using PostgreSQL 8.4/CentOS 6: if I set the archive_mode parameter to on in postgresql.conf, but don't actually store the generated WAL files anywhere via the archive_command parameter, is there any ...

15 30 50 per page