0
votes
0answers
661 views

Cannot start MySQL cluster with single node

For some testing I have installed MySQL Cluster. I can get it to work with configuration suggested in Lunix guick start guide. My configuration: [ndb_mgmd] hostname=localhost ...
0
votes
1answer
392 views

Getting locked out of PostgreSQL databases

One of the greatest fears I have is getting locked out of my own data due to the security features of a heavy weight database such as PostgreSQL (and PostGIS). Whilst I can log in as the ...
2
votes
1answer
780 views

Is there a way to explicitely have a not-null column in a view

If I create a view in Oracle, the column definition's not null characteristic is inherited from the base table: create table tq84_t ( col_1 number, col_2 varchar2(15) not null ); create view ...
0
votes
1answer
197 views

Disaster Recovery for PostgreSQL 9.0

We have a number of PostgreSQL 9.0 servers. We use binary replication to have a host standby instance of those. The only problem is that is someone drops the master, with or without intentions, this ...
6
votes
4answers
10k views

Cannot open table mysql/innodb_index_stats

After a fresh install of XAMPP and import from my linux live db that is working to the windows Dev-stage, I started encountering problems with INSERT. Everything else seems to work well. The errors I ...
1
vote
1answer
116 views

Which version of Oracle supports Streams

I am using Oracle 10g Express Edition. I want to enable the streams feature in my current edition. However, when I searched on the net I couldn't find any information regarding streams setup on Oracle ...
1
vote
1answer
182 views

Using a PostgreSQL tablespace from two different servers

I have a PostgreSQL database living on an external hard disk (RAID0 via Thunderbolt). So far I accessed it from a PostgreSQL server running on my MacBook Pro. As my work on this database is getting ...
0
votes
1answer
930 views

How to create a trigger in a different database?

Is it possible to create a stored procedure that creates a table trigger (DDL) in a different database than the one the stored procedure itself resides. The databases are on the same server instance. ...
0
votes
1answer
1k views

Oracle: list user-created tables in the SYS schema

I need to delete all tables (hundreds) in the SYS schema that someone accidentally created with sqlplus. Looking in dba_tables and dba_objects, I don't see a way to distinguish these tables from ...
3
votes
1answer
2k views

What happens if the mysql database's innodb log files are lost?

What I did was /etc/init.d/mysql stop then removed the files: ib_logfile0, ib_logfile1 then modified my.cnf file, variable: innodb_log_file_size and then: /etc/init.d/mysql start and allowed ...
2
votes
2answers
8k views

Connecting to an external database with pgAdmin III

I'm trying to connect to an external database from pgAdmin III (which is installed on both machines). The client complains: Access to database denied The server doesn't grant access to the ...
0
votes
1answer
695 views

Extract time portion of Datetime2(7) in hhmmssfff format

I need to extract the time portion of a datetime2(7) column in hhmmssfff format and I am doing it like this: DECLARE @mdate AS DATETIME2(7) SET @mdate = '2012-03-15 10:13:27.5437431' SELECT ...
1
vote
2answers
461 views

Connect to SQL Server 2012 running on Azure VM via local SSMS 2012

I have been testing VM on Azure. I have created a SQL VM running SQL 2012 on Windows 2012 and would like to connect to it via SSMS 2012 on my local instead of connecting via RDP through Azure Portal. ...
0
votes
1answer
33 views

Retrieve list of matched words in PostgreSQL

I'm new to PostgreSQL and really more than your more basic queries/inserts. I've created a TSVector column to my table that I'm searching and have set the column to look at the specific column in ...
0
votes
2answers
194 views

Table redirect / filter / trigger on select

Is there any way to redirect queries to different tables / views based on the package that's referencing the table? I.e. packages A and B both have "select grade from schema1.grd_tbl", but I want ...
4
votes
1answer
248 views

View with fallback (performance/optimization question)

I have a table with tariffs for stuff; the tariffs table is not important in this scenario, the "tariff values" are. In this Demonstration SQL Fiddle the tariff_plan is the FK to the tariffplans table ...
2
votes
1answer
85 views

Is SQLT safe to run in production? [closed]

I am debugging poor query performance for my application and recently came across the SQLT tool. The XTRXEC method combines XTRACT and XECUTE and it seems like this provides more info then XTRACT ...
3
votes
1answer
147 views

Execution Plan Regeneration

we have a database server with Sql Server 2008R2 that runs some queries every day; now these queries are fast (I suppose Sql Server has in memory some good execution plans). If we restart the ...
1
vote
1answer
1k views

What to look for in bad pg_dump log

We want to programmatically detect errors in cron scheduled pg_dumps. Apart from cheking whether or not the log file ends in "pg_dump: saving database definition": What other tell-tale string can I ...
2
votes
2answers
11k views

The value could not be converted because of a potential loss of data [closed]

Let me start out by clarifying that this is not a duplicate question, nor a potential duplicate for that matter. I have tried implementing every answer to every single variant that already exists of ...
1
vote
1answer
664 views

Tracking changes in stored procedures within a database

Could you please help me out here. I have multiple databases and each of the databases have the same tables and stored procedures. I want to be able to compare the stored procedures and see if there ...
0
votes
0answers
52 views

Creating a dedicated HD parition at beginning of disk for data files, benefits and draw backs?

I am thinking of creating a dedicated partition on the harddisk for the mysql database data files in /var/lib/mysql , while considering those 2 points: a dedicated partition will avoid any file ...
1
vote
0answers
317 views

DBCC Physical only giving Connection failure

I have a SQL server 2012 Ent DB. The hosting company is trying to setup new backup solution using Symantec Backup Exec. They have come back and said our database is corrupt because they get these ...
0
votes
3answers
361 views

How can I insert '&' symbol in data

I have a source table where one of column has data like: Column SD SD .. .. JK Jk .. .. I want to load this data into staging in format of: Column S&D S&D .. .. J&K J&k .. .. ...
1
vote
0answers
254 views

Postgresql Streaming Replication - pgpool2 - failover

In my scenario I want pgpool to forward read only queries to slaves when the master goes down - I want my app to be in the "read only mode". How do I setup pgpool to accept read only queries when ...
4
votes
1answer
169 views

Distributed transaction and Read Committed Snapshot

Distributed transactions are not supported for snapshot isolation level in SQL Server 2008 R2. But what about read committed snapshot?
1
vote
1answer
234 views

Avoiding table level locking [closed]

I am maintaining a queue in a database table. An SSIS package checks the queue every two minutes. If it finds anything then it runs a job. I am experiencing some sort of table level locking. The ...
2
votes
1answer
2k views

Why isn't oracle using an index for distinct query ?

This is the scenario SQL> exec dbms_stats.gather_table_stats(user,'TM', cascade=>true) PL/SQL procedure successfully completed. SQL> SELECT SEGMENT_NAME , SEGMENT_TYPE , BYTES / 1024 / ...
1
vote
0answers
240 views

Need to search users by latitude and longitude

I'm still learning SQL and this is a bit more advanced than my capabilities, so I could use some help. I think I need a sub-query or something. In the database I have a table called user with a ...
2
votes
3answers
2k views

Unique constraint across two columns

I need to add a constraint with two columns that says if any given value is present in one of the columns, then: 1) It cannot be duplicated in the same column. 2) It cannot be duplicated in the ...
1
vote
2answers
653 views

Taking a backup of a streaming WAL slave

I have an environment with pair of postgresql servers set up to do WAL streaming replication. I also have a test environment and periodically I want to snapshot the production DBMS and restore that ...
2
votes
1answer
5k views

How to keep the structure of the Tablix when there is no data to show

We have a SSRS report which shows the result of a dataset in a tablix. If the query in the dataset returns no data, the header of the Tablix gets displayed but not the tablix cells below the header. I ...
0
votes
1answer
98 views

Database Structure and Design [closed]

Okay my project in simple words. Multiple shop sites are hosted on different hosting services receiving orders from customers. All the orders are to be directed to the main company website where the ...
0
votes
2answers
88 views

Understanding multiple indexes with MySQL (and performance)

I have a "phones" table with around 120 000 records, it contains phone_id, phone_number, phone_user_name, phone_last_contacted, etc. The phone_id is index and looks like: 1,2,3,4 ... 120 000. But I ...
2
votes
3answers
230 views

What Are the Log File Names?

I moved my database files. When I go attach the MDF file by itself, SQL Server will tell me that it can't find the log files. How do I go about asking the MDF what files it is expecting before ...
1
vote
0answers
1k views

Cannot connect remotely to a named instance

So, I have two servers (ServerA and ServerB) that I've set up with Windows Server 2008 R2 and SQL Server 2008 R2. My goal is to replicate between these two in a failover fashion (with ServerC as a ...
1
vote
1answer
126 views

Detect Convert_Implicit usages

I suspect that my Sql Server is using CONVERT_IMPLICIT a lot because many of my fields are set as string in NHibernate while they are set as varchar in database. Is there any option to detect when ...
-1
votes
2answers
104 views

How do I avoid duplicate rows using FREETEXT?

I have the following query: SELECT cat.CategoryId,cat.CategoryName,cat.CategoryImageURL,cat.CategoryImageData, ap.AppName,ap.AppImageData,ap.AppDetails,ap.AppId FROM Category cat,App ap WHERE ...
0
votes
3answers
337 views

Vacuum settings for mostly append-only data

I have a table with the following characteristics: We INSERT a few 100k rows each day We never UPDATE the rows We DELETE "old" data once a week From my shallow knowledge of Postgres VACUUM, it ...
0
votes
1answer
599 views

How can I join two tables while filtering the results with a“ WHERE IN” clause? [closed]

What I am trying to do is set up a selection filter for a cascading list on my site. When I say selection filter, I mean I am trying to limit, and sort the results based on what the user selects. I ...
6
votes
3answers
6k views

Why does MySQL ignore the index even on force for this order by?

I run an EXPLAIN: mysql> explain select last_name from employees order by last_name; +----+-------------+-----------+------+---------------+------+---------+------+-------+----------------+ | ...
2
votes
1answer
109 views

Why isn't the rows of an EXPLAIN accurate?

I have the following table: mysql> select count(*) from employees; +----------+ | count(*) | +----------+ | 10000 | +----------+ 1 row in set (0.03 sec) I do an EXPLAIN: ...
0
votes
1answer
47 views

Query Optimization for added value

I have a query that's behaving a bit oddly. In my database I have a table called "records". It tells me a bunch of information about what applications a user ran on my company's machines. I'm ...
0
votes
4answers
4k views

How do I delete only related records in a multi-key MERGE in SQL Server?

Suppose you have something like this: Source table (variable): Values ( LeftId INT NOT NULL, RightId INT NOT NULL, CustomValue varchar(100) NULL ) Target table: Mapping ( LeftId INT NOT ...
1
vote
2answers
3k views

Oracle impdp - Importing file from remote server

Am I missing something or is it not possible to import a dump (.dmp) file using impdp to a database on another server other than where it was created? All of my investigations lead me to believe that ...
21
votes
1answer
3k views

What event information can I get by default from SQL Server?

I often see questions where people want to know if a certain thing happened, or when it happened, or who performed the action. In a lot of cases, SQL Server just doesn't track this information on its ...
0
votes
3answers
2k views

Can I give the same name to a table and a stored procedure?

Is it possible to name a stored procedure the same as a table? I have an existing table named 'buyers', and I'm trying to create a stored procedure named 'buyers', but I'm getting this error: ...
1
vote
0answers
48 views

Backing up the SQL Application

I have a Windows 2008 R2 server that needs to be periodically reset to a clean state. Normally I would look at creating an image of the system drive, however due to organizational reasons I cannot use ...
1
vote
0answers
439 views

Transactional Replication Failing Suddenly - Distributor Error

I have two databases (both SQL Server 2008 R2) taking part in transactional replication. This exists to pass data to a customer of ours, so I am troubleshooting from the Publisher side. Replication ...
0
votes
1answer
457 views

SymmetricDS fails to start for PostgreSQL 9.2

I'm trying to get SymmetricDS up and running with PostgreSQL. I've followed the tutorial (almost) exactly. (I have not set up a separate node yet since, for my purposes, I need that separate node to ...

15 30 50 per page