3
votes
2answers
39k views

Cannot connect to my local instance

When I connect to my local server, I get this message A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not ...
1
vote
0answers
694 views

MySQL slave doesn't reconnect to master after master is rebooted

I've got a new MySQL replication setup with one master and one slave. In all of the following scenarios, the slave automatically reconnects to the master and resumes replication where it left off: ...
5
votes
2answers
8k views

Importing a large column (8000 chars) from Excel using SSIS

I'm trying to set up a regular import of an excel spreadsheet that we get from a vendor. I'm using SQL 2008 R2 SSIS to import it into a table. The problem connection manager is an OLE DB connection ...
1
vote
2answers
284 views

How to avoid timeouts during big DML operations

I have a big insert script I need to run. Its about 55,000 records and 160 columns. The script is already created and I can't create it again. The problem I have is that this runs for about 4 hours ...
1
vote
1answer
202 views

Which all system parameters to be considered for standard Vacuum process

We want to run standard vacuum process on our production database which is over 100 GB and have millions of dead tuples. Can anyone suggest what system parameters we need to keep in mind for setting ...
14
votes
2answers
13k views

Need to understand parallel query execution error

Today we experienced a degradation in performance on our production sql server. Durring the time this occurred we logged several "The query processor could not start the necessary thread resources ...
2
votes
2answers
281 views

Checking SQL Server's memory utilization

Is there a way to check how much of the memory reserved by SQL Server is actually being used by SQL Server? Is there a way to look at this information in the past? I.e. how much memory was being used ...
4
votes
1answer
4k views

Cannot rename the table because it is published for replication

I need to rename some tables in my DB - SQL Server 2005, with this: EXEC sp_rename 'dbo.TableName', 'Tmp_TableName', 'OBJECT' but I can't do this - I get this exception - Cannot rename the ...
3
votes
1answer
502 views

Is the Service Broker good for publishing data between servers?

I'm trying to find a better solution when publishing data to a remote table. So we have Server A and Server B. Server A holds a master table which should be replicated to Server B. Currently, we ...
2
votes
0answers
287 views

always on availability group with different speed disks

I'm looking to set up SQL Server 2012 installation with an Always On Availability Group, where the 'passive' replica will be hosted at another site on the WAN and using synchronous data commit - the ...
1
vote
1answer
116 views

What indexes to add on MySQL table

I've been trying to optimize my table, but am yet unable to get the desired results. CREATE TABLE IF NOT EXISTS `puzzles` ( `puzzleID` int(7) NOT NULL, `puzzleMask` varchar(30) CHARACTER SET utf8 ...
4
votes
6answers
9k views

Cannot remove unused filegroups

I wanted to remove some unused filegroups/files in a SQL Server Database but am stuck because SQL Server thinks the filegroups/files are still in use. Some background: We had some partioned tables ...
0
votes
1answer
685 views

Full text query slow on first run [closed]

I have SQL Server database which has size of 65GB and 6 million rows. We have essays in tables and the average size of an essay is 450 words. When I run a query for the first time, it takes 3-10 ...
3
votes
1answer
584 views

Splitting different parts of a string

I have an SQL Server database where there is a cell with a delimiter (\) separated string. An example of this string would be: category_path ============= RootCategory\Middle Category\Child Category\...
6
votes
1answer
13k views

SQL Server Maximum and Minimum memory configuration

What are the correct settings for min-memory and max-memory in this use case? The server has 8GB ram, dual Intel Xeon processors, running Windows Server 2008 R2 / Sql Server 2008 Standard Edition. It'...
1
vote
1answer
746 views

Using like over charindex to search for pattern

We where using charindex to search for a string as shown below SELECT * FROM tablename WHERE ( Charindex('47a%$.abc',CAST(columnname AS VARCHAR(MAX)))>0 ) I am planning to replace charindex with ...
0
votes
3answers
1k views

Importing 40 gb mysql file via phpmyadmin

I have a 40 GB MySQL dump file. Can anyone give me the idea how to import the file via phpmyadmin?
2
votes
0answers
419 views

A Tool to Manage Tracking Query Performance Improvements [duplicate]

I'm building a BI system on SQL Server 2012. I have a test set of data with some tens of millions of rows. Currently many functions and stored procedures are unacceptably slow. I'm looking for a tool ...
0
votes
1answer
455 views

Database design for surveys in MySQL

I'm trying to design an app where users take a new survey everyday (that's not the main part of app but it's an important part). I've never designed a database before so what I'm trying to do might ...
1
vote
3answers
2k views

How can I drop a stored procedure whose name is in a variable?

Given a variable that contains a stored procedure name: DECLARE @stored_procedure_name sysname; SET @stored_procedure_name = 'some_stored_procedure_name'; How can I drop the stored procedure?
0
votes
1answer
528 views

Max_packet_allowed setting for Windows 7

We have windows xp machine with older version of mysql. So when we need to import huge data we just set the max_allowed_packet=1500M in the C:\Program Files\MySQL\MySQL Server 5.1 . Now we loaded the ...
3
votes
1answer
8k views

Why is my Amazon RDS instance so slow?

I currently run a Windows Server with SQL Server Express. I'd like follow best practice and separate the application from the database, so I've created an RDS instance and exported my database. But......
3
votes
2answers
3k views

Running out of Transaction Log space during Alter Table

I'm running an alter table, alter column on a table with nearly 30 million rows and SQL Azure fails after approximately 18 minutes saying that The session has been terminated because of excessive ...
1
vote
1answer
992 views

When MySQL table gets too large

I have a really large MySQL table counting more than 12 billion rows at the moment (table scheme: InnoDB). From time to time the problems get more and more. The biggest problem is that altering the ...
1
vote
1answer
87 views

MySQL 5.6 DESTDIR not work propely

I'm try compiling MySQL 5.6 from source in Ubuntu 12.04 x64. But when I execute make install DESTDIR="/etc/mysql", not work was expected. MySQL is installed in /etc/mysql/usr/local/mysql. What's ...
2
votes
1answer
7k views

Can not find 'NT AUTHORITY\NETWORK SERVICE'. on Sql Server 2012

Hi How do i fix this Error? when i run my MVC app i get this error though my web.config is find. the error is on my DB call Sample: Cannot open database "Sample" requested by the login. The login ...
1
vote
1answer
176 views

Increased server load after InnoDB deadlock

I am using InnoDB instead of MyISAM for a couple of months right now, and it has really optimized my game database-wise. I was aware of the danger of deadlocks, but hadn't had any problems with it, ...
2
votes
1answer
4k views

Creating mongo 3 node replica set on ec2 problems

I'm trying to create a 3 node cluster of mongo replicas on ec2 instances, with internal ips 10.168.xxx.xxx, 10.166.xxx.xxx and 10.188.xxx.xxx, my config file is: dbpath = /home/ubuntu/mongo-data/ ...
1
vote
1answer
393 views

Creating a table with parent_id from a flat table

I have a flat table (id, city, county, state), Example (1,'Beckingen', 'Merzig-Wadern', 'Saarland') A city belongs to a county. A county belongs to a state. First my attempt was to divide the ...
3
votes
2answers
5k views

Updating a table efficiently using JOIN

I have a table that has the details of households and another that has the details of all the persons associated with the households. For the household table I have a primary key defined using two ...
1
vote
3answers
3k views

Restore database - maintenance plan task

I need to schedule a task that restores a database once a week from a backup. I have setup maintenance plans for backing up databases (Management > Maintenance Plans) but cannot find out how to make a ...
9
votes
1answer
46k views

How to get rid of “maximum user connections” error ?

I am using MySQLi for my webapp but whenever I want to visit some particular page, I get mysqli_connect() [function.mysqli-connect]: (42000/1203): User ***_user already has more than '...
0
votes
1answer
157 views

Optimizing and maintaining test databases for a web development team

Right now when we test, we mysqldump from the production database, load it into the test database server, and then use scripts to scrub sensitive data. As the database is getting bigger, this process ...
6
votes
2answers
778 views

Workaround for Anti-Semi Join bug

I built the following SQL Server query, but it is encountering the anti-semi join defect in SQL Server 2005 which results in inaccurate cardinality estimates (1 -- urgh!) and runs forever. Since it is ...
3
votes
2answers
511 views

Adding an index to a system catalog in Postgres

I'm having a situation very similar to the one described here: I've got a SaaS situation where I'm using 1000+ schemas in a single database (each schema contains the same tables, just different ...
3
votes
2answers
2k views

Replication error

We have a slave server that has stopped replication due to the following error: Slave SQL: Query caused different errors on master and slave. What could be the cause of this error? And what would ...
6
votes
3answers
5k views

In Microsoft SQL Server 2008, syntax generates the error “The Parallel Data Warehouse (PDW) features are not enabled.”

I have the following virtual column generated from an aggregate over a sorted partition, MIN(picture_id) OVER ( PARTITION BY [360_set] ORDER BY picture_id ASC ) However, when I execute that, I get ...
6
votes
1answer
658 views

Understanding MS SQL Server Date Types

Consider the following: declare @dt datetime, @dt2 datetime2, @d date set @dt = '2013-01-01' set @dt2 = '2013-01-01' set @d = '2013-01-01' select convert(varbinary, @dt) as dt, convert(...
4
votes
1answer
954 views

Running the DBT2 test results in 0.00 NOTPM

I'm trying to run the MySQL DBT2 Benchmark Tool, I have unzipped the archive and run the following commands: ./configure --with-mysql make make install mkdir /tmp/dbt datagen -w 3 -d /tmp/dbt --mysql ...
0
votes
2answers
391 views

MySQL row does not persist, but primary key with auto-increment is incremented

I have a MySQL database that is acting oddly. I insert a new row and observe that for a brief period of time (less than 30 seconds), the row persists as expected in the table. After this time, though, ...
11
votes
1answer
4k views

AlwaysOn AG, DTC with failover

Problem: How can I run Distributed Transaction Coordinator (DTC) on all servers in an AlwaysOn Availability Group (AG)? I do NOT need to maintain transactions over failover/switchover events. Setup: ...
7
votes
2answers
6k views

How do I determine if a column is defined as a serial data type instead of an integer based off the catalog?

So I'm currently creating some SQL to read through the postgres (9.1) catalogs to build table definitions. However, I am encountering a problem with SERIAL/BIGSERIAL data types. Example: CREATE ...
1
vote
2answers
4k views

How can I “shift” certain column values to different rows in an existing table?

I'm implementing a queue as a ring buffer in a table along the lines of what Thomas Kejser talks about here: Implementing Message Queues in Relational Databases If the ring buffer fills up, I have to ...
0
votes
1answer
704 views

USER_TAB_PARTITIONS Query Runs Incredibly Slow

I seem to be seeing incredibly slow (5-10 seconds) to run a query against USER_TAB_PARTITIONS (Oracle) intermittently. When I do an explain plan on : SELECT * FROM USER_TAB_PARTITIONS WHERE ...
2
votes
0answers
815 views

Passing NULL xml value to a certain CLR stored function crashes it when called in a certain way

Consider a CLR stored procedure that accepts an XML parameter and calls another stored procedure in the same schema: [SqlFunction(DataAccess = DataAccessKind.Read, IsDeterministic = false, ...
2
votes
2answers
6k views

How to make SQL Server Management Studio use latest version of SQL Server?

I'm upgrading my dev machine from Windows 7 to 8. While installing earlier versions of Visual Studio it installed SQL Server 2005. I then went to this site and downloaded and installed SQL Server ...
5
votes
1answer
673 views

How to get output from trigger on linked server

Fair warning, I know this isn't the best way to do this, but I'm trying to extend some existing code without needing to do a rewrite. Anyway, I've got two SQL Server 2012 installs, one local in my ...
1
vote
0answers
86 views

Setting up replication alerts

I 'm trying to configure alerts for replication. Currently on my test setup I run everything under user 'sa'. When I try to set up alert for agent failure I get the following error Login failed for ...
8
votes
1answer
48k views

Getting “ORA-00942: table or view does not exist” while table does exist

I'm fairly new to Oracle database. I have installed Oracle Database 11g R2 on Oracle Linux 6. I have successfully created a new database with dbca and connected to the database using: $ sqlplus "/ as ...
1
vote
1answer
183 views

changing server roles in streaming replication

I want to implement streaming replication using postgresql-9.2.4 in my reporting application. I came stuck on the below scenario. create master and slave with synchronous replication which is ...

15 30 50 per page