1
vote
1answer
1k views

How do I list all tables in all schemas owned by the current user in Postgresql?

I can list all tables in all schemas using > \dt *.* but that also lists system tables that greatly outnumber my tables that I care about. I'd like all the tables (and possibly views) created by ...
4
votes
1answer
75 views

Simple filesystem cube

I'm trying to understand cubes so thought I would create a simple datamart to represent my filesystem. So my question is, if I wanted to create a simple datamart to represent my filesystem, how would ...
5
votes
1answer
178 views

Determining which isolation level is appropriate

This is a homework question. For the following transactions state the isolation level that will maximize throughput without lowering the integrity of the database. Explain the answer. ...
1
vote
4answers
2k views

How to prevent SQL Server database server from running out of disk space?

What are the best preventive approaches that we can do to prevent the SQL Server database server from running out of disk space ? Is there a way to set the maximum database file size (both the ...
2
votes
1answer
625 views

Merge replication SQL Server 2008 publisher with SQL Server 2012 subscriber

is this somehow possible to have SQL Server 2008 publisher with a SQL Server 2012 subscriber for merge replication?
6
votes
1answer
580 views

LOAD DATA INFILE blocks on concurrent use against MyISAM tables

I'm having trouble loading data into MyISAM table(s) concurrently using LOAD DATA INFILE. The loading operation works fine in isolation. Trying to do LOAD DATA INFILE operations concurrently, blocks ...
0
votes
1answer
270 views

How to run this MySQL statement?

See the MySQL example on http://dev.mysql.com/doc/refman/5.5/en/loop.html: I copy it and paste on MySQL command line but it stop at every semicolon. I wonder how to make these sentences work? I ...
0
votes
1answer
89 views

SQL Server Installation choices

I'm installing SQL Server 2008 R2 which would be helpful in A. querying database. B. Analysis Services C. Reporting services and BIDS (SSRS) D. Powerpivot in Sharepoint During installation I get ...
2
votes
1answer
291 views

Help with SELECT queries

I need help with some queries. I struggled do find out how to do it, but I think I finally caught on or at least got the results I was looking for in the database. These are the tables (given by my ...
1
vote
1answer
95 views

Topics and posts represented by one table or two?

I'm currently building a forum component for a larger application and I'm considering different approaches to certain parts of the database schema. In particular, I am considering representing topics ...
0
votes
1answer
165 views

What structure is used for storing CONTEXT, CTXCAT and CTXRULE Oracle text indexes?

AFAIK there are three major structure types used for storing Oracle index data: B-tree, R-tree and Bitmap. All indexes use one of these structures. However, not sure about CONTEXT, CTXCAT and CTXRULE ...
4
votes
1answer
1k views

How to link users and logins in an Availability Group?

I've got an Availability Group going and need to map some logins to database users on an active secondary replica. (Node2) Unfortunately, when I try to exec sp_change_users_login or alter user with ...
1
vote
2answers
593 views

“In Use” memory on a SQL Server box

I have a SQL Server 2012 database server with 64GB of RAM. A process called DataPumpService runs on the same box and loads around 400 million records from 2700 flat files. I want to understand what ...
1
vote
2answers
168 views

What are the alternatives for prefixed indexes in Oracle?

You can create an index and define prefix length, so the index will store only first starting symbols from each of column value. It looks like this in MySQL: CREATE INDEX table_idx ON ...
0
votes
1answer
1k views

When hash indexes should be used in Oracle?

Hash indexes are usefull when you have a large table with URLs and you need to query by them. So, a solution would be to have an additional column "url_crc32" that will be filled with hashed URL value ...
1
vote
0answers
151 views

How to find an text in entire Oracle database?

I have a Oracle database (11g2). But i don't know how to find a text in all of table on a database. Because there are so many tables, can't find down by one column, one table... it takes me a lot of ...
2
votes
2answers
1k views

how to reduce mysql overhead?

My machine has 2GB RAM, I have some cron job run every minute insert into some data. My mysql always overhead. I think it is very frequently, if some cron job mysql insert run, 5-10 minutes, the db ...
2
votes
2answers
796 views

Moving database file locations in SQL Server 2008

I have SQL Server 2008 Express edition installed on my machine. I had changed the location of some folders from one drive to another (from F: to E:). Now when I connect to SQL Server using SSMS, it ...
1
vote
3answers
327 views

Usefulness of a multi-attribute index

If an index has more than one attribute in it, is there any speed gained in a select statement whose where clause uses one of the attributes in the index? For example, take a table T with an index on ...
1
vote
1answer
49 views

How are these two user drops different?

Other than the obvious, what is the difference between: drop user user_01@host01; and drop user 'user_01'@'host01'; In a sample test, they both achieved the same result. From Account Names docs ...
1
vote
1answer
115 views

Backup Disappearing?

I've created a Database maintenance plan for creating a backup set daily. The Back Up Database Task has three subplans: Full Backup: Occurs every day at 12am Differential Backup: Occurs every hour ...
3
votes
1answer
225 views

How Can the Same Query in Two Nearly Identical Instances Generate Two Different Execution Plans?

Server A and Server B have identical hardware and instance configurations (A is Production, B is QA). B's DBs were restored from A's backups from one week ago. I was provided this query by the ...
6
votes
2answers
615 views

case versus isnull versus coalesce

I am just reading through the documentation for the SQL Server 2012 exams and I saw the following point: case versus isnull versus coalesce Now, I know HOW to use each one but I don't know WHEN ...
8
votes
2answers
457 views

Bulk insert into SQL Server from VMWare guest using distributed switch

This is mostly likely not a SQL server issue but the setup seems to only be affecting BULK INSERTS to SQL Servers. We have recently moved VM Hardware and all the guests that were moved had their ...
2
votes
1answer
201 views

Where are partitions defined in mysql

I have a large table that I want to spread across multiple disks/LUNs. It will contain blobs and I want to have it separated out from the other data. How do I go from new disks (lets call them ...
1
vote
1answer
188 views

SQL Server - Ignoring object dependencies to copy a DB (despite some column referenced in a sproc no longer existing)

First of all apologies for the novel but there's a lot to explain... We have over 100 databases for our product, 1 per server, each of which has variations on other ones (ideally they should all be ...
4
votes
1answer
18k views

ODBC Data Source SQL Server Connection - Login Failed For User

I have moved my database from an SQL 2005 to a server with SQL 2008. I am now trying to create an ODBC Data Source. I am using "With SQL Server authentication using a login ID and password ...
1
vote
1answer
33 views

what are the implications of setting up a subscriber as a publisher?

We have application database (APP_DB) that creates a "live copy" of itself via transactional replication (push) to a database (COPY_DB) on a separate server. This COPY_DB is used for reporting and ...
3
votes
1answer
88 views

Large inserts breaking indexed queries

Very similar to Large insert/update in table causes timeout while SQL Server re-arrange indexes only I am not using SSIS with only occassional large (predominently annual) inserts from another staging ...
2
votes
3answers
159 views

Determining if indexes are redundant

I have a table with the following structure: Id (int identity PK) FooId (int FK) BarId (int FK) QuxId (int FK) Other fields The following indexes have been defined: PK (Id), clustered Index1 ...
3
votes
0answers
110 views

How to Audit for Access with Cross Database Ownership Chaining

I've just joined the data team of a new company and we have a large SQL Server environment (100+ instances) and cross database ownership chaining is on by what I gather is a necessity. I'm looking for ...
1
vote
1answer
192 views

MySQL user defined rollback procedure

I'm attempting to write my own mini-rollback procedure. I have a table that tracks any updates or deletes to another table using a trigger. I am attempting to make it possible to restore one or more ...
1
vote
1answer
115 views

restricting users to rows they created

To educate myself in PHP and mysql, I am making a browser based rpg game. This game will allow any number of users to register an account and, once registered, they can add, edit or delete champions ...
0
votes
1answer
193 views

Can't connect to a PG database from MicroOLAP, but can connect from SSH?

I'm able to connect to my PGSQL database from SSHv2. But when I try to do the same thing on MicroOLAP Database Designer, I get this message: (Note: From my college PC, I can connect. But I can't ...
1
vote
1answer
905 views

Can't grant role permissions under sysadmin login

I'm trying to execute this script from Management Studio: GRANT ALTER ON ROLE::[AdaptTemplate] TO [AdaptAdmin] AS [AdminSapr] Execution fails with this message: Msg 15151, Level 16, State 1, ...
1
vote
2answers
278 views

Mongodb multikey index and $all in queries

I have such structure of documents in my products collection: { title: 'Samsung Galaxy S III', category_id: ObjectId("50bcc2f0b910a6c1936a4424"), properties: [ { title: 'OS', ...
1
vote
1answer
553 views

oracle streams - how to get last successfully applied scn for crashed apply?

I have a downstream Streams replication set up between Oracle 9i (source) and Oracle 11g (destination). The process is still in developlment stage, so the whole setup is not stable yet. Sometimes my ...
2
votes
2answers
4k views

Dynamic change to innodb_flush_log_at_trx_commit

This is related to this question. It does help to get better performance for InnoDB tables. According to MySQL manual, innodb_flush_log_at_trx_commit is a global dynamic variable. Thus, I can change ...
4
votes
2answers
552 views

How do I set and get custom database variables?

Using PGAdmin III I can right-click on a database, navigate to the Variables tab, and put a variable name-value property on the database itself. Is there a way to customize these? I saw an ...
4
votes
3answers
1k views

Logging query text without Profiler

I'm in the process of porting an old, semi-broken ASP.NET/SQL Server application to PHP/PostgreSQL. Among the torments^H^H^H^H^H^H^H^Hchallenges I'm faced with is that the reporting is done by a ...
5
votes
1answer
526 views

Why isn't partition-level lock escalation the default?

In SQL Server, locks are normally escalated from row or page -> table. Starting with SQL Server 2008, a new level of lock escalation was added - partition level. However, this isn't automatically ...
3
votes
0answers
258 views

MS DTC errors on SQL Server 2008 R2 but not SQL Server 2000 running on difference instance

I am receiving errors when I try to run a distributed query against different SQL Server 2008 R2. At first I thought this might be cause the servers have been set up on a VM using a clone but after I ...
3
votes
1answer
978 views

Why/how did the behavior of extract(epoch…) from “timestamp without time zone” fields change between PostgreSQL 8.4 and 9.2?

Context: We currently run PostgreSQL 8.4 in production, and are testing 9.2 internally for a future upgrade. Some issues have emerged regarding dates. The servers that run 8.4 versus 9.2 are ...
-2
votes
1answer
326 views

Missing quotation - openquery to oracle [closed]

I am not able to successfully run a code with openquery to a oracle server. Please do not take into account field names/data types, as I had to present only a part of the whole procedure. It's quite ...
5
votes
1answer
306 views

Multi part identifier in Microsoft SQL Server

I'm migrating a SQL Server 6.5 database to SQL Server 2012. Migration went well but one of the software using this database performs a strange query: UPDATE myTable SET Field1='',Field2=0, ...
5
votes
1answer
2k views

How to determine the collation of a table in PostgreSQL?

I want to script a check of the collations used on my tables in PostgreSQL, but googling for Postgresql detect collation is not working well for me, and the documentation is not making this an easy ...
0
votes
2answers
324 views

microsoft webmatrix deleted my wamp databases?

I've been using WAMP server for a while and I have several databases on the mysql server. today I installed microsoft webmatrix and when I opened one of my sites on wamp I got a mysql error saying ...
12
votes
2answers
8k views

MySQL: Tree-Hierarchical query

SUB-TREE WITHIN A TREE in MySQL In my MYSQL Database COMPANY, I have a Table: Employee with recursive association, an employee can be boss of other employee. A self relationship of kind (SuperVisor ...
1
vote
0answers
157 views

Database instance keeps restarting

From the past few days, our MySQL database instance has crashed and had to be restarted a few times. My MySQL version is 5.1.57-log. The CPU and memory usage was way below 50% during the crash time. I ...
5
votes
1answer
2k views

Appending backups while overwriting expired sets

I've been reading up on this, but the online documentation is a bit difficult to understand and seems awkwardly written. For example the INIT, NOINIT. One says it will try to overwrite everything. ...

15 30 50 per page