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 ...
3
votes
1answer
2k views

Large table and poor performance - what to do next?

We have a Windows 2008 R2 / SQL Server 2008 R2 (Standard) server that is used to host a single database. The database itself mainly consists of a single large table containing both live and historical ...
0
votes
2answers
261 views

Drop a SQL Server database

Taking too long to drop a 500gb+ SQL Server database. My question being what ways can we drop a database other than through GUI or T-SQL? Would deleting the .mdf and .ldf files from the server help? I ...
3
votes
1answer
739 views

Restoring database to UNC path on local drive

When I try to restore a database using a restore command with a local UNC path: RESTORE DATABASE [dbname] FROM DISK = N'\\PC91\D\backup.BAK' WITH FILE = 1, MOVE N'test' TO N'\\PC91\D\dbname.MDF', ...
1
vote
1answer
122 views

Suppress repeated performance condition alerts

I have set SQL Server performance condition alert with details as follows: Object : SQL Server:Databases Counter : Percent Log Used Instance : My database name Alert If ...
0
votes
1answer
254 views

Help with Postgres 9.1 data import (is 4x expected data size, 4x slower than MySQL, and index still needed)

I have 25 billion <int, int, float> rows that I'm trying to import into Postgres, and after 77% of the data being imported, the Postgres data folder is taking up 840GB, about 4x the storage ...
2
votes
2answers
859 views

How do I determine how much data is being written per day through insert, update and delete operations?

The longevity of SSDs is largely determined by the amount of bytes written by insert, update and delete operations. What is the best way to accurately determine how much data is being written by ...
0
votes
2answers
40 views

Finding code tab's associated schema in MySQL Workbench

I have a single-tenant setup of MySQL databases; i.e. a more or less identical schema instance for each client. When I'm tasked with modifying the code of stored routines, I use MySQL Workbench. ...
4
votes
1answer
277 views

Is there any interruption of service when switching recovery models?

I need to switch to FULL recovery model for several SQL Server 2008 databases. However these are in production. Whilst doing these things out of hours is good practice I wanted to plan for any down ...
3
votes
2answers
296 views

Need to change alphanumeric characters to next character

I have 2 columns Name, Passport No. in a table with more than 100k rows. Name Passport No. KOP A245 COS C990 After the update it should look like this. Name Passport No. LPQ B356 DPT ...
0
votes
1answer
141 views

Can Mysql Cluster AQL(Push-Down Join) be trigger with sharding table at the same time?

From the jonas slide, I knew that the feature of "Push-Down Join" can make join 70x faster. the most important factor is to eliminate the round trip between API node and data nodes. where all data in ...
2
votes
2answers
419 views

How to create Combination of records (Order does not matter, no repetition allowed) in mySQL tables

I've got a table that has hundreds of rows, each row is a recipe with nutritional information, for example: recipe_table: id | calories | protein| carbs | fat recipe1, 100, 20g, 10g, 2g ...
8
votes
2answers
13k views

How to partition an existing non-partitioned table

I have an existing table with data: dbo.Test (col1,col2,col3....) ON [PRIMARY] I need to change this table to be partitioned like this: dbo.Test(col1,col2,col3....) ON Ps_Date(Col2) How I can I ...
1
vote
2answers
473 views

Vacuum vs Auto Vacuum

I am trying to find answers for my below few queries which will help me in fine tuning my postgres DB. I did some googling but was not able to find answer. 1) Out of vacuum or Auto vacuum which is ...
3
votes
1answer
115 views

Conversions between any data type and the binary data types are not guaranteed to be the same between versions of SQL Server

I just found that on the SQL Server 2012 MSDN documentation for binary and varbinary types, they mention the following at the end of the article: Conversions between any data type and the binary ...
8
votes
3answers
653 views

Updating a big replicated Dimension (SQL Server PDW)

We use a SQL Server PDW appliance for our data warehouse. One of the tables in our warehouse is a replicated table with about 20 million rows. As part of our ETL process we need to expire old records ...
2
votes
1answer
737 views

Are passwordless logins like ##MS_SQLResourceSigningCertificate## , ##MS_AgentSigningCertificate## a vulnerability?

I'm new to MS SQL Server. Colleagues working in IT security, have run an scan showing come DB users with null password. Some of them are ( # included ) ##MS_SQLResourceSigningCertificate## ...
0
votes
1answer
209 views

PostgreSQL postmaster will not start after configuring for SymmetricDS

I'm trying to configure SymmetricDS for use with PostgreSQL, a database platform widely supported by the former. When running through the quick-start tutorial (which leads you to some pre-setup ...
4
votes
2answers
425 views

Create a new database in SQL Server 2008 R2, but it is not Blank

When I try to create new database in SQL Server 2008 R2, it was created completely, but it is not a blank and empty database, there are many tables that come from another database. I also tried ...
3
votes
1answer
232 views

Mathematical method for spotting irregularity in numbers flow

I am trying to build an engine which is going to predict orders for items inside shop. Three main variables are: Time-dates (x-axe etc 1.1.2013,1.2.2013 etc I do calculation one per day) Available ...
3
votes
0answers
161 views

SQL Server insert randomly takes 10+ seconds to complete? [closed]

I have an insert statement that is being generated by the .NET Entity Framework. In most cases, this particular insert will execute in 0ms according SQL Server Profiler. One out of every 30 or so ...
2
votes
1answer
75 views

Defining a process for troubleshooting performance issues [closed]

The issue of poor database performance is one which presents itself from time to time and there are many techniques which can be employed to examine the root cause of slowness. Does anyone have a ...
0
votes
1answer
90 views

is there a recommended way to update many postgres schemes

I have a database in postgres which has 15 schemes, the schemes are identical with the same tables, views and functions. the system uses one scheme at a time, as if they were separate databases. So ...
3
votes
1answer
93 views

Replace column values?

I recently got into SSIS and haven't been able to find what I am trying to achieve anywhere on the web. I am trying to take some rows as input, and then replace one specific column's value with ...
2
votes
1answer
100 views

Need to Rewrite/optimize Slow Query

I have a query with following explain plan EXPLAIN SELECT COUNT(applicant.id) as applicantCount, application.name,applicant.application_id,application.id FROM applicant LEFT JOIN application ...
2
votes
1answer
465 views

Is it safe to kill ANALYZE TABLE query on a MyISAM table?

I have a huge MyISAM table that is blocking my application. I frequently find ANALYZE TABLE queries running on that table. I guess that's because a join is being performed on the table or at least an ...
7
votes
1answer
189 views

Auto Update Statistics Duration and Interruptions

Our production SQL Server 2008 R2 sometimes begins to perform slowly: all queries begin to work too slow (and sometimes all queries just hang and wait something then continue). This usually lasts ...
1
vote
0answers
84 views

MySQL Master-Master Replication Table Row COUNT() Inconsistency

I have two MySQL servers replicating to each other in a Master-Master typology. This has been working fine for several months now. Recently I've noticed some drift in one Master. There is a row ...
2
votes
1answer
2k views

scramble the value of one column and unscramble it?

I want to change all the values in one column, as it is a production database and I don't want to give the data to testers without obfuscation. Example: Name Name ---- --> ...
0
votes
2answers
6k views

ORA-01031 while creating a view as DBA

I'm trying to create a view under my DBA schema on Oracle XE. I already did that on the productive database and it worked with a user with a lot lesser privileges than the DBA role. But now I always ...
2
votes
1answer
368 views

Grouping over multiple data dimensions (pivot)

I am logging an Events table, and want an output (as seen at the bottom of this answer), the issue is that I am getting the data in rows, but want them to be displayed column-wise. The two dimensions ...
3
votes
1answer
298 views

How to track overhead of Change Tracking in SQL Server

We're going to implement a solution based on Change Tracking feature from SQL Server. Before going in production (even after), we'd like to keep track of the overhead the CT will introduce. Once in ...
0
votes
1answer
175 views

Oracle Patch Update

We have an Oracle RAC production environment with primary and secondary DB. Our DBA has asked to update oracle version from 11.2.0.1.0(64 bit) to 11.2.0.3(64 bit) with patch 6880880,10404530,16803769 ...
0
votes
3answers
429 views

mongo replication not happening

I setup master/slave replication of mongodb on EC2. But I see not replication happening. When I do "show dbs" on master, it shows all dbs expected. But when I do the same on replica, it does not show ...
0
votes
1answer
973 views

LEFT vs CHARINDEX for matching the start of a string in T-SQL

I want to match the beginning of a string in a WHERE clause. While I recognise that so often database-performance is dependant on the underlying data structure, is there a best-practice for doing ...
3
votes
1answer
131 views

Why doesn't `1` fit into a decimal(4, 4) column?

I have a decimal(4, 4) column in MS SQL Server 2008 R2. If I understand correctly, that means: Precision of 4, ie up to four digits can be stored after the decimal place Scale of 4, ie a a total of ...

15 30 50 per page