dialog listlengths 4 30 | title stringlengths 15 150 | category stringclasses 14 values | dialog_time stringdate 2016-01-21 01:59:30 2018-07-01 01:34:46 |
|---|---|---|---|
[
{
"message": "Actually I am running 3 environments (Dev / UAT / PROD ) with SQL Server installations on them.Development server has also Integration Services Service running on it an we are starting to actively using it.We are thinking also on installing Reporting Service to start using the whole suite provided... | SQL Server + Reporting Services + SSIS + SSAS Licensing and Infrastructure | dba | 2017-03-24T15:18:37.903 |
[
{
"message": "Pardon for being naive. This is a simple simple question but i am unable to figure out how to query this<a href=\"https://i.stack.imgur.com/iRDtx.png\" rel=\"nofollow noreferrer\">Query :I have 2 tableskknagar_data & kknagar_ratesI am trying to query out in such a way thatget current record fr... | Mysql Join with previous record | dba | 2017-03-25T05:18:36.523 |
[
{
"message": "I am wondering if someone can solve this for me please.I am trying to do a join on two tables. One is a date calendar table with dates from the year 2000 until 2050. This table has column named Year_Month which I want to group by.The 2nd table is a transaction table containing dates and other deta... | Need Help With SQL Server 2008 Join With 3 Tables | dba | 2017-03-27T05:46:23.103 |
[
{
"message": "I have a delete query which takes around 6 mins to complete. I am looking for ways to optimise it and if its duration can be shortened. Below is its anonymized (due to security constraints) estimated execution plan. Execution plan:<a href=\"https://i.stack.imgur.com/FLRg5.jpg\" rel=\"nofollow nore... | Optimize delete query in SQL Server 2008 R2 SP1 | dba | 2017-03-27T14:26:17.557 |
[
{
"message": "In briefWe want to input value for a timestamp column WITH timezone value in the literal string e.g. '201708-09 10:11 GMT +07:00'In fullWe have a sample table<pre><code>create table some_table ( start_time timestamp default current_timestamp);</code></pre>We can insert this value<pre><code>into s... | GMT timezone in Mysql timestamp literal value | dba | 2017-03-28T03:37:42.403 |
[
{
"message": "I'm collecting blocked process reports using Extended Events, and for some reason in some reports the <code>blocking-process</code> node is empty. This is the full xml:<pre class=\"lang-xml prettyprint-override\"><code><blocked-process-report monitorLoop=\"383674\"> <blocked-process> ... | Empty blocking process in blocked process report | dba | 2017-03-30T14:42:55.350 |
[
{
"message": "I have a SSIS package task that is displaying messageboxes even those that code in the task is commented out when I run it. How do I stop that?",
"role": "user"
},
{
"message": "You will need to disable interactive mode in the package. The answer to <a href=\"https://stackoverflow.com/... | SSIS Package display MessageBox in Task | dba | 2017-03-30T16:09:51.890 |
[
{
"message": "I am monitoring a SQL Server 2008 box with Windows Server 2008.There is lot of inserts, deletes and updates in long duration transactions during from 3 to 4 hours a day.My question is, if the new pages inserted are updated and deleted by the ETL process in sequencial batches, the numbers of PLE a... | Performance counters of a ETL Database enviroment. What to look for? | dba | 2017-03-30T17:14:41.277 |
[
{
"message": "Table Animalhas following columns:<code>SR_ID</code><code>First_Name</code><code>Last_Name</code><code>PET</code>The <code>PET</code> column has a check constraint; hence it only accepts three values DOG, CAT, FISH.Sample Data<pre><code>+-------+-------------+-----------+----------+| SR_ID | Firs... | List of values accepted by a column | dba | 2017-03-31T05:31:31.340 |
[
{
"message": "I have SQL Server Management Studio 2005 R2 in my administrator PC, and SQL Server Management Studio 2008 in the Server PC. Each time I tried to connect to the database server (SSMS 2008), it will throw errors that indicated I have different version of database or the software or else (db instance... | Is it possible to remote connect to SQL Server 2008 database with SQL Server Management Studio 2005? | dba | 2017-04-02T12:29:53.763 |
[
{
"message": "I want to know is there any <code>handler</code> or <code>trigger</code> kind of functionality exist in MongoDB which can help me to run my mongo command on <code>find</code> query?Basically, I want to run a specific set of Mongo queries on <code>find</code> query. You can say a <code>listener</co... | Is there any MongoDB handler for find event? | dba | 2017-04-03T09:16:03.480 |
[
{
"message": "I have a table that has an archive of daily weather conditions around the globe. There are around 150 million rows and the table is 1.7Gb excluding indexes.The table is an archive so there are no writes to it. It is a MyISAM table.Queries are showing up in my slow log as taking up to 45 seconds. T... | Optimization of a big MySQL weather archive table | dba | 2017-04-03T14:46:07.227 |
[
{
"message": "Once a new table is created, we have to execute the same SQL code segment, that grants some users rights to the table and does similar maintenance. This code is identical for all cases, differing only in the table name.I wanted to write a stored procedure to abstract the entire set of statements i... | Passing a table name to a stored procedure | dba | 2017-04-03T16:45:37.830 |
[
{
"message": "I have a table (Database2.dbo.OrganizerDataDependencyChange) that contains information about when a row in certain other tables was last changed. On each of these tables I have a trigger that calls a stored procedure (Database2.dbo.SaveOrganizerDataDependencyChange) that simply updates the Databa... | INSERT/UPDATE stored proc deadlocking itself | dba | 2017-04-03T18:36:51.423 |
[
{
"message": "I have tables:<pre><code>CREATE TABLE users ( id text PRIMARY KEY, internal_id serial, other columns...)CREATE TABLE listings ( id bigserial PRIMARY KEY, created_at timestamptz default current_timestamp, posted_by text REFERENCES users ON UPDATE CASCADE ON DELETE CASCADE, other columns...)<... | Postgresql - return column of referenced table that is not primary key | dba | 2017-04-03T20:43:02.850 |
[
{
"message": "I need to reduce the size of Database file. I am confused between <code>DBCC Shrinkfile</code> and Data compression option.<code>DBCC shrinkfile</code> will reduce the actual database file size as far as I know but Data compression will not do the same. please advice or their are any other options... | I need to reduce the size of Database file -- I am confused between DBCC Shrinkfile and Data compression options | dba | 2017-04-04T01:16:12.117 |
[
{
"message": "Let's say I've a table <code>trainStations</code> with the following:<pre><code> startStation | endStation --------------+-------------- SF | Palo Alto Palo Alto | SF Mountain View | Redwood City SF | Palo Alto Palo Alto | Mountain View Mountain View | SF</code></pre... | Train Direct Route Query | dba | 2017-04-04T17:45:32.870 |
[
{
"message": "I have a master DB running on internal network and an AWS RDS slave replica from the Master DB. When I upload a fresh copy of the master, the slave will replicate for few days with no issues. After a couple of days, the slave status says its correct but records will be missing on the DB. I ran bot... | MySQL RDS Slave stop replicating | dba | 2017-04-04T19:08:49.780 |
[
{
"message": "I need to get daily reports for an app.A report should tell me how many times a event page was visited and how many tickets were sold for each category. All that should be grouped by day in a single row, like so:<pre><code>Date | Category A | Category B | Category C | Visits'2017-03-10'| ... | Grouping multiple records into one row | dba | 2017-04-04T23:40:10.763 |
[
{
"message": "I have to perform a search on a table with Turkish city names.The users would enter the first 4 characters of a city and I need to fetch the results from SQL.For example, user wants to find the entries for <code>Istanbul</code>, so he would enter <code>ista</code> or <code>Ista</code> or <code>IST... | Match similar special character in filters | dba | 2017-04-05T08:32:44.807 |
[
{
"message": "I'm working on a system that has a resource intenstive houskeeping job. It hits two different data files on the same LUN. One is for relational data, one for blobs. During the job, read latency on the relational data file averages over 250ms, while on the LOB data it is only 5ms. This is measured ... | SQL Server 2012 IO Latency and Wait Types | dba | 2017-04-05T09:31:49.393 |
[
{
"message": "I would like to capture stored procedure execution details which would require altering existing procedures to perform an INSERT at the start and an UPDATE at the end.I recall finding a blog article some time ago that demonstrated adding statements to the start/end of stored procedures but cannot ... | Adding logging statements at start and end of all stored procedures | dba | 2017-04-05T18:05:36.387 |
[
{
"message": "Is it possible to set <code>keepalives_idle</code> parameter in <code>.psqlrc</code> so that every connection I open uses it?I've finally found this option and it's a remedy for my connection dropping problems.I would really like to set it globally for all sessions I open with <code>psql</code>.",... | .psqlrc - setting keepalives_idle connection parameter | dba | 2017-04-06T15:29:58.640 |
[
{
"message": "I am planning for a 3 node AG, 2 in DC and 1 in San Jose. Host OS will be Windows Server 2012 R2.We dont have an option of a 3rd site, so my question is where can I place the FSW if I have to do a planned manual failover? Also, once manual failover is performed, should I be disabling the votes of ... | Fileshare witness for 3 node Multisubnet AAG setup | dba | 2017-04-06T17:57:10.760 |
[
{
"message": "Until today after every SQL statement eg. <code>CREATE user t identified by t;</code> I had a confirmation of the execution <code>\"User created.\"</code> Now I have nothing (no confirmation) but if I check if the user exists it is positive:<pre><code>select username from all_users where username=... | Confirmation of SQL statement disappeared | dba | 2017-04-07T08:21:08.883 |
[
{
"message": "I want to get the top disposition of every ID where 1 is the lowest and 13 is the highest, however when there are IDs with similar disposition (e.g. ID #2 having multiple dispositions of '9') I cannot get the record with the latest time / timestamp.How can I group the results by ID getting the max... | MySQL: How to get the maximum disposition and the maximum date from my database | dba | 2017-04-07T09:57:51.240 |
[
{
"message": "While evaluating possibility for rolling upgrade of SQL Server 2012 instances hosting AGs to SQL Server 2016 we ran into strange issue that does not quite make sense. One of the easier way to demonstrate is as follows:Let’s say you want to add database to AG (2012 instance is being used). SSMS 201... | SSMS 2016, Availability Groups, database is encrypted error | dba | 2017-04-07T19:27:46.760 |
[
{
"message": "I am on mongo v3.0.x and have a replication set with 3 members, but the second member (and entire server) was unexpectedly taken down and destroyed. I have stood up a new server to use as a replacement for the the second member and need help bringing it back to a working state. I am not sure if th... | Mongodb Replica Member Server Changed: Status Stuck In STARTUP. Missing config | dba | 2017-04-07T20:15:09.957 |
[
{
"message": "I am new to SQL Azure and need to plan on moving some of our SQL Server Databases.We have a SQL Server Azure Pool which can take up to 50 databases.I need to restrict certain users to specific databases inside the pool.E.g. User1 can only Access Database Northwind -thus when he connects with SSMS ... | Security per database in SQL Azure Pool | dba | 2017-04-08T06:39:53.797 |
[
{
"message": "I want to calculate the difference between a status change, however the same state can have multiple records, see example below.<pre><code>create table #DeviceMessages( DoorName nvarchar(50), [StatusDoor] nvarchar(50), EventEndDate DatetIme)INSERT INTO #DeviceMessages (DoorName, [StatusD... | Duration how long a door is open, but same status records can be present more than once | dba | 2017-04-08T19:35:43.900 |
[
{
"message": "I have to setup Galera cluster in one of my production servers.<pre><code>OS: Ubuntu 14.04Existing mysql: maridb 10.1</code></pre>While installing this cluster, its asking to remove the existing <code>mariadb-server-10.1</code>How can I install this without remove anything?",
"role": "user"
... | Install galera cluster without remove existing mariadb | dba | 2017-04-09T12:23:49.147 |
[
{
"message": "I am looking to implement a table which will accessable via a Percona XtraDB cluster of 3+ nodes. I am expecting it to grow at about 1mil rows per month and the data will be kept for about 2 years (24mil rows).The schema is reletively simple, but for brevity I will ommit the boring parts, using a ... | Fragmentation with PXC setup using an ordered UUID as PK | dba | 2017-04-10T11:25:29.810 |
[
{
"message": "I am in need to fulfill a client request that wants me to create a backup solution that includes a stored procedure that will pick up the backup information from a driver table that will hold all the parameters needed such as backup file path, type of backup, no. of days to retain the backup etc a... | TSQL script to backup database using a driver table and stored procedure | dba | 2017-04-10T14:32:12.633 |
[
{
"message": "I have a requirement to write a SQL Server Query that will fetch all the records of the table excluding Friday and Saturday of all the weeks and data between 4PM to 8PM of all the days of the weekEx:If I have the following records in my table<pre><code>Name ProcessStartTime StatusName1 2017-04-01 ... | SQL Server Query to EXCLUDE Friday and Saturday of the week & 4PM to 8PM all the days of the week | dba | 2017-04-11T06:51:46.380 |
[
{
"message": "I am working with temporal tables in SQL Server and the generated time is the transaction begin time in UTC datetime2Is there a function or table in SQL Server to get that same transaction begin time to use elsewhere that does not require me to write to and select from a system versioned table fir... | Where can I get SQL Server Transaction Begin Time from? | dba | 2017-04-11T14:09:10.513 |
[
{
"message": "I have made a script that, one at a time, deletes all the foreign keys from a database, just like this:<pre><code>ALTER TABLE MyTable1 DROP CONSTRAINT FK_MyTable1_col1ALTER TABLE MyTable2 DROP CONSTRAINT FK_MyTable2_col1ALTER TABLE MyTable2 DROP CONSTRAINT FK_MyTable2_col2</code></pre>What surpris... | Why does dropping foreign keys take long? | dba | 2017-04-12T10:28:29.293 |
[
{
"message": "The scenario is based around a race event (running/jogging) Is there a way of getting a position of a person by using their race results. For example the quickest person to finish a race would be in a seperate table of race position with the value of 1. The second quickest person would get a resul... | Position of a race result using database query? | dba | 2017-04-12T11:50:34.863 |
[
{
"message": "Here's one example where such a requirement comes up:Suppose we have a table 'sample' in our database which has a column 'col1' and an auto-incremental 'id' column. We want the default value of 'col1' to be taken as the value of the 'id' column. How do I do that?I am using rails to write the migra... | How can I use value of the id column as default value of another non-nullable column when using postgresql-rails? | dba | 2017-04-12T13:17:34.177 |
[
{
"message": "We have a monthly purge process that purges data from a few tables using a somewhat complex SSIS package. Up until this time everything is running smooth and fine without any issues. However, if the purge process does fail then my only resort would be to restore those tables back to the state they... | Restoring data into a replicated table after failed purge process | dba | 2017-04-13T20:02:45.887 |
[
{
"message": "Let's imagine a stored procedure that retreives data and do some kind of pagination. This procedure has some inputs describing which set of data we want and how we sort it.Here is a very simple query, but let's take it as an example.<pre><code>create table Persons(id int, firstName varchar(50), la... | Preventing SQL injection in dynamic SQL | dba | 2017-04-14T08:29:57.267 |
[
{
"message": "HickariCP docs say:<blockquote> HikariCP relies heavily on accurate high-resolution timers for both performance and reliability. It is imperative that your server is synchronized with a time-source such as an NTP server. Especially if your server is running within a virtual machine. Do not rel... | Choice of connection pooling library for VM deploys | dba | 2017-04-14T12:25:20.433 |
[
{
"message": "I see here that we have a lot of questions about best approach to mirror a single database. I got a new job and people there is under a task to mirror all databases, to a secondary one, in a different city for security (if we lost a server, we have everything on the mirror). 1) to mirror ALL data... | Best approach to mirror All databases of a sql server | dba | 2017-04-16T04:56:54.003 |
[
{
"message": "There is no description for the duration event field for the <code>module_end</code> event and I'm struggling to find any additional documentation.I interpreted this as milliseconds but looking at some of the results this would be incorrect as I have an execution lasting 121 days. Is this duration... | module_end extended events duration in microseconds? | dba | 2017-04-17T10:52:08.037 |
[
{
"message": "In our AlwayOn environment I have two SQL servers 2014 Ent.edition (SERVER A, and SERVER B). I setup a transaction replication for [database A ], pointing to listener which shouldn't cause any issue if a failover happened. Tested, worked just fine after a failover, but when I shut off one of the s... | Transaction Replication on AlwaysOn | dba | 2017-04-17T22:21:21.780 |
[
{
"message": "I'm testing the performance of inserts between Auto increment integers vs GUIDs (v4) in tables with a lot of data. Following this <a href=\"http://kccoder.com/mysql/uuid-vs-int-insert-performance/\" rel=\"nofollow noreferrer\">blog post, i was expecting seeing a difference. But right now with more... | GUID vs Auto Increment Insert performance | dba | 2017-04-18T04:27:35.723 |
[
{
"message": "Is it possible to configure <code>sharding</code> only for slave nodes in a master slave replication scheme?",
"role": "user"
},
{
"message": "\"Sharding\" is not supported directly in MySQL. See other products, such as Spider.If you meant \"Partitioning\", then elaborate on what you ... | Sharding for slave node in master slave replication | dba | 2017-04-18T17:48:10.593 |
[
{
"message": "Would there be any drawbacks to using a normal update statement to update a json(b) column like so:<pre><code>update \"events\" set \"properties\" = '{\"type\":\"graph\"}'</code></pre>Instead of using the jsonb_set function provided by PostgreSQL, which would turn into this statement:<pre><code>up... | PostgreSQL update JSONB without jsonb_set | dba | 2017-04-19T08:18:07.660 |
[
{
"message": "I have a powershell script that I am trying to add in to a sql agent job, but the job step is failing with the following error<pre><code> A job step received an error at line 1 in a PowerShell script. The corresponding line is 'import-module SQLPS -DisableNameChecking'. Correct the script and ... | Troubleshooting Powershell errors from SQL Agent job | dba | 2017-04-19T13:29:33.270 |
[
{
"message": "When creating a new table, sometimes examples show the primary and foreign keys defined with the <code>CONSTRAINT</code> keyword and other times without the <code>CONSTRAINT</code> keyword. Is the only reason to use the <code>CONSTRAINT</code> keyword to give the constraint a name? Or are there ot... | When creating primary and foreign keys is the CONSTRAINT keyword optional? | dba | 2017-04-19T17:39:04.957 |
[
{
"message": "We are using webjob in azure which imports data every 2 hours into the tables I've created in the cloud. As I read it from <a href=\"https://docs.microsoft.com/en-us/sql/relational-databases/security/encryption/transparent-data-encryption-with-azure-sql-database\" rel=\"nofollow noreferrer\">here,... | encrypting live data in SQL Azure | dba | 2017-04-19T18:16:21.707 |
[
{
"message": "I have a table called listings. For each listing, the user can upload 5 images. In the table listings, I have a multidimensional array <code>images text[][]</code>. Each multidimensional element will hold <code>[ a base64 string, filename of image]</code>. The only time I would do a search on the ... | PostgreSQL multidimensional array - ok to use or misdesign in this case? | dba | 2017-04-19T22:58:00.350 |
[
{
"message": "This <a href=\"https://stackoverflow.com/questions/43490920/avoid-sort-operator-in-index-plan#comment74043068_43490920\">question is from SO,iflagged it move to DBA.SE..but i may not see that happening,due to upvotes..so posting here below is test data : <pre><code>--Main Table CREATE TABLE [db... | Query shows sort cost,even when required index is available | dba | 2017-04-20T03:49:31.417 |
[
{
"message": "I have 4 tables, let's name them as:table A, 15M rows table B, 40K rows, table C, 30K rows, table D, 25M rows(kk - means millions)and I had a legacy query, which was constructed like this:<pre><code>select C.<some_fields>,B.<some_fields>,D.<some_fields> from Cinner join A on C.x ... | Strange optimisation effect using WITH construction | dba | 2017-04-20T15:59:07.017 |
[
{
"message": "My MySQL server running the latest version of MySql on Ubuntu 16.x keeps crashing once or twice a day. Sometimes it repairs itself fairly quickly (10 minutes). Sometimes I have to reboot and do an fsck to get things running again.What would be causing this?Things I've tried so far:increased RAM fr... | MySql: Frequent crashes on server with substantial resources | dba | 2017-04-20T19:40:59.993 |
[
{
"message": "I have a series of events (potentially hundreds) segregated into applications. Each one of these events has a dependency on others (except the first one, of course). I'm looking to map all of these dependencies in a table, but I'm not sure the best way to do so. One event can have multiple predece... | DB Design for Event Dependencies | dba | 2017-04-21T15:04:57.623 |
[
{
"message": "Does anyone have a valid method in referencing system information to search for a stored procedure across all databases in a SQL Server 2000 instance? I am currently tasked with migrating crystal reports to SSRS and the customer has roughly 500 or more crystal reports with stored procedures spread... | Referencing a stored procedure by a name description across all databases in a SQL Server 2000 Instance | dba | 2017-04-21T16:29:03.267 |
[
{
"message": "I have a report that gathers data to be printed on labels, we want to print up to 9 labels per page, on a 3x3 grid.Am I able to use something like groupings to get this layout generated automatically, or will I need to hard-code each of the 9 labels individually? I would like to be able to do it a... | How can I display 9 rows of results in a 3x3 grid? | dba | 2017-04-21T22:44:19.750 |
[
{
"message": "Our DB is hosted in AWS MySQL RDS. The data is such that each company that signs up gets its own set of tables which then receive enormous amount of data in them.Currently we want to move a chunk of rows from existing company table (having 200+million rows) to a new company table. We need to be ca... | Move data chunk from table with 200+million rows to a new table MySQL | dba | 2017-04-22T17:27:52.957 |
[
{
"message": "I run multiple pool leagues and have been keeping the information in excel. I'm working on moving this to the web and using MySQL for the data. The largest amount of data is in the matches table, with information about every match played.I have multiple leagues based on different games, straight p... | More Fields or multiple tables | dba | 2017-04-23T18:33:58.990 |
[
{
"message": "I have read the oracle documentation for 12c on saving response files from dbca and have found this:<blockquote> Starting with Oracle Database 11g Release 2 (11.2), you can save all the installation steps into a response file during installation. You can click the Save Response File button on t... | How to save response file in DBCA oracle 12c | dba | 2017-04-24T13:22:03.710 |
[
{
"message": "I'm finding acronomes such as 'SSIS', 'SSDT', etc etc a little confusing as to how they related to SQL Server. It seems to me that SQL Server implements the T-SQL language, and that a package such as 'SSIS' is a 3rd party 'wrapper' over the T-SQL language, and effectively a plug-in to SQL Server. ... | What is SSIS in relation to SQL Server? | dba | 2017-04-24T14:41:22.063 |
[
{
"message": "I´m having problems with mysql indexes with INNODB getting corrupted. Initially I solved it by rebuilding the tables but now the tables are to large to rebuild, and i´m tired of mysql not showing consistent results.I´m inserting close to 10000 records daily among 4 or 5 tables, and I have some job... | Frequent Corrupt Indexes in MySQL 5.6. Is this a MySQL bug? | dba | 2017-04-24T21:08:16.497 |
[
{
"message": "So I've been building up over time a database, and unfortunately I was using MyISAM which didn't have any problems until the database became huge.After massive CPU spikes, I created a script to OPTIMIZE all the tables, and ran it. And everything was fixed and working fine and not using nearly as m... | MySQL MyISAM REPAIR TABLE lost connection to MySQL server during query | dba | 2017-04-24T23:42:19.957 |
[
{
"message": "We have a transactional replication setup. The publisher is on a separate SQL Server and the distributor and the subscriber together on the other server. The replication was done using restore from backup from the publisher.Now, I have to make my subscriber database as my main database, which will... | Convert existing subscriber Database to a publisher database. Current publisher will be subscriber | dba | 2017-04-25T08:29:01.980 |
[
{
"message": "I'm new to MySQL but I have experience with other major RDBMS like Oracle and MSSQL.I'm trying to find out what are some of the widely used methods (or best practices) when itcomes to refreshing one or more MySQL databases between two servers on a nightly basis.<br>For example: refresh the \"QA... | Refresh (replicate) MySQL database from server to server | dba | 2017-04-25T15:26:21.320 |
[
{
"message": "Basically the concept is that a customer can place orders from multiple addresses and an address can have multiple customers, like different members of the same family.<pre><code>CREATE TABLE Customer ( cust_id NUMBER PRIMARY KEY, cust_name VARCHAR2(100), cust_phone VARCHAR2(20));CREATE TAB... | Adding data in a bridge table automatically | dba | 2017-04-26T12:26:18.210 |
[
{
"message": "I just need a reliable Script by which I can get all the missing index report. I found many but they don't want to work.",
"role": "user"
},
{
"message": "Try this one. I do not have notes about source. Most likely from Johnathon's blog. <pre><code>WITH XMLNAMESPACES (DEFAULT 'http... | Missing Index finding queries | dba | 2017-04-26T12:40:56.070 |
[
{
"message": "First, this is for a major assignment. I am not asking any of you far more experienced SQL users to do the assignment for me, but I need your help. SO this project runs similarly to a Netflix model, where you have a customer, a queue, a rental plan, DVDs with directors/producers and genres. What I... | Parameterized Procedures in SQL Server | dba | 2017-04-26T16:56:30.907 |
[
{
"message": "What does it mean? 2017-04-28T04:37:53.126+0000 D - [conn1571] thread over memory limit, cleaning up, current: 67k2017-04-28T04:37:53.911+0000 D - [conn1585] thread over memory limit, cleaning up, current: 79kShould I make something to solve it? If I increas server memory will it hel... | mongodb - thread over memory limit | dba | 2017-04-28T04:47:39.400 |
[
{
"message": "I have created a table with 650 Numeric(19,4) columns.When I switch on Page Compression, by running<pre><code>ALTER TABLE fct.MyTable REBUILD WITH (DATA_COMPRESSION = PAGE);</code></pre>I get <blockquote> Msg 1975, Level 16, State 1<br>Index 'PK_Mytable' row length exceeds the maximum permissibl... | What is the row overhead when using Page Compression? | dba | 2017-04-28T11:23:36.580 |
[
{
"message": "I have an application for which I want to set up a master/slave mysql database, because the current db struggles under high load.I have two different servers for db replication. Lets call them A and B.A is the current db server. Let's score the CPU power of A as 10 and B as 7. B has half the memo... | Which server to be master and which one slave database? | dba | 2017-04-28T13:34:28.620 |
[
{
"message": "I have a server with 32GB RAM. I have given almost 70% InnoDB buffer pool to it. I have table with almost 40 million rows. Recently, I tried to remove one of the indexes and replace it with another. My whole system could not work any more and it was not able to see my db.I could see a lot of this ... | Removing InnoDB indexes causes database table almost not accessible and slow | dba | 2017-04-28T17:18:15.110 |
[
{
"message": "I have a table of zip codes which includes the center lat, lng for each zip code. I use it to get a list of zip codes within a given mile radius from any arbitrary point.It just occurred to me that, just because a zip's center point is not within a given radius, does not mean that the zip itself i... | Problem getting zips in radius via MySQL | dba | 2017-04-28T20:26:59.697 |
[
{
"message": "I have a table of zip codes which includes the center lat, lng for each zip code. I use it to get a list of zip codes within a given mile radius from any arbitrary point.It just occurred to me that, just because a zip's center point is not within a given radius, does not mean that the zip itself i... | Problem getting zips in radius via MySQL | dba | 2017-04-28T20:26:59.697 |
[
{
"message": "I am attempting to run a dynamic SQL statement and it works for any <code>storename</code> that does not have an apostrophe in it. However, when the <code>storename</code> has an apostrophe in it the syntax does not properly, however I am stuck using dynamic SQL in this instance.How should I amme... | Dynamic SQL With Double Quoting | dba | 2017-04-28T22:32:20.063 |
[
{
"message": "I'm working on a project in which user can create their own web services from UI by simply selecting number of fields (Max 200) and defining datatype for each field.I'm considering following table structure for the same :<pre>ServiceMaster+-----------+-------------+-------------+| ServiceId | Serv... | Best way to store different types of data in a single column, which should be query friendly - MySql | dba | 2017-04-29T07:53:29.880 |
[
{
"message": "I am looking for ways to improve the performance of some relatively complicated queries against both PostgreSQL and MySQL databases.(One of the requirements of the application which the database is supporting is that it must be \"cross-compatible\" as much as possible).For this reason, I chose to ... | Increasing query efficiency of queries spanning multiple tables | dba | 2017-04-30T11:06:40.090 |
[
{
"message": "I am running this syntax below on roughly 30,000 records. The syntax is run 4 - 5 times a day and takes anywhere between 5 and 10 minutes to execute. Below is sample DDL with a subset of data (not the 30,000 records) and I can upload my XML if someone will let me know how so you can see query ex... | Long Running Query - Query Optimization | dba | 2017-04-30T15:49:00.640 |
[
{
"message": "There's master mysql running 5.6.30. Engine InnoDB. <code>innodb_file_per_table</code> is used. Slave server is running 5.5.55Doing next steps:<pre><code> - (on master) innobackupex --no-timestamp /path/to/backup - (on master) innobackupex --apply-log - (on slave) /etc/init.d/mysql stop; clearing ... | innobackupex and creating slave | dba | 2017-04-30T18:24:10.673 |
[
{
"message": "Has anyone ever encountered the wait type QDS_Loaddb? I have found zero documentation for this wait. The description on the microsoft site says TBD.<a href=\"https://docs.microsoft.com/en-us/sql/relational-databases/system-dynamic-management-views/sys-dm-os-wait-stats-transact-sql\" rel=\"noreferr... | Undocumented Wait Type QDS Loaddb and an unusable database | dba | 2017-05-01T15:33:38.347 |
[
{
"message": "We have a job that is not scheduled to run but was kicked off by what we suspect was another job. There is no job history but it does appear in the error logs. How can we find out if this is being called by another job? I know that we could use sp_start_job to immediately call a job within a job ... | Find Job Calling Another Job | dba | 2017-05-01T16:14:16.963 |
[
{
"message": "Is there a way to calculate the growth per year of deltas in database?I would like to know if my current server is enough or should I switch to bigger server and required to check the growth over the years, is it doable?Thanks.",
"role": "user"
},
{
"message": "There are plenty of post... | Calculate the growth of deltas in SQL Server | dba | 2017-05-03T09:27:36.857 |
[
{
"message": "We are facing an issue, where at certain times there are number of commits that takes a more than a second. The time interval for this is not fixed. Our application sends thousands of commits but at some instance the commits with exact same timestamp gets slow.This is extracted from MySQL slow que... | MySQL commits taking time | dba | 2017-05-03T11:50:30.973 |
[
{
"message": "I have a <code>ROAD</code> table:<pre><code>+----+------------+| ID | ROAD_CLASS |+----+------------+| 1 | ARTERIAL A || 2 | ARTERIAL B || 3 | ARTERIAL B || 4 | ARTERIAL C || 5 | ARTERIAL C || 6 | ARTERIAL C || 7 | COLLECTOR || 8 | COLLECTOR || 9 | LOCAL || 10 | LOCAL |+----+-... | Group values: CASE text, ELSE field value | dba | 2017-05-03T15:38:12.667 |
[
{
"message": "I have a very simple setup. SQL Server X (2012) and SQL Server Y (2016). X has a linked server to Y using the setting \"Connections will: Be made using the login's current security context\". SPNs are set up, and internal users on our domain can query the linked server. I can see their connections... | SSMS connections not using KERBEROS over VPN - why? | dba | 2017-05-04T16:38:49.677 |
[
{
"message": "This is my situation right now:I'm working with SQL Server 2012, and I have 2 databases, one is 3.5 GB and the other one is 7.6 GB, and the company I work with is going to migrate the server to a new (better) one, I need to move these databases to the new server, the problem is, that these databas... | How to administer large databases? | dba | 2017-05-04T18:19:21.297 |
[
{
"message": "I have a table with ~100M rows, all of which contain <code>HSTORE</code> fields. I am creating a view that will return (convert) the <code>hstore</code> column to <code>key | value</code> columns and also add a few fields for filtering. <pre><code>id | hstore id | user_k... | Converting HSTORE to an EAV in a view using "each" or "lateral" | dba | 2017-05-05T09:19:09.363 |
[
{
"message": "I know I can compare two Oracle schemas by using <code>Tools</code> -> <code>Database Diff</code> in Oracle SQL Develop. It will open the following wizard:<br><a href=\"https://i.stack.imgur.com/QadFE.png\" rel=\"nofollow noreferrer\"><a href=\"https://i.stack.imgur.com/iA6aO.png\" rel=\"nofollow ... | Oracle SQL Developer - Database Diff tables & constraints without table data | dba | 2017-05-05T09:47:59.740 |
[
{
"message": "I have a table containing transactional events for customers:<pre><code>table: events| id | cust_id | date | amount | |------|----------|----------------------------|--------| | 78 | 211 | 2010-06-18 20:10:00.000000 | 20 | | 84 | 211 | 2010-07-18 05:53:00... | How to aggregate transactional records by month year but based on subscription period not calendar months? | dba | 2017-05-05T12:22:03.577 |
[
{
"message": "We are planning to implement Ola Hallengren's Maintenance Solution in our environment.Our organization on the other end, is planning to purchase Idera SQLSafe (requested a demo first).I see a parameter @BackupSoftware = 'SQLSAFE' in Ola's solution. Question:With Idera SQLSafe tool installed, based... | Why use Ola Hallengren DatabaseBackup method with Idera SQLSafe? | dba | 2017-05-08T13:20:45.773 |
[
{
"message": "I have been thinking about how the execution plans act in SQL SERVER after a restart of service. I know that in each query execution in the cache memory exist a process to parse, compile and optimize the requested query applying execution plans based on statistics and other parameters in SQL. All ... | Execution plans behavior after a restart in SQL server | dba | 2017-05-08T13:43:50.163 |
[
{
"message": "I'm managing a 1.5Tb DB that is growing at a rate of ~37Gb/Week. I have been asked to split the DB into 500Gb files, but I cannot use Filegroups due to restrictions from the vendor.My thinking was to create 3 devices and use the <code>DBCC SHRINKFILE</code> command to equally spread the DB across ... | Splitting a DB into multiple files | dba | 2017-05-08T17:18:51.627 |
[
{
"message": "I am currently trying to design a database model to store all the possible nutrition data, but for many products there isn't as much data available as for the others, as a result many field could end up as NULL values (I do not want to use any placeholder/default values as I will need to be able t... | Database design for varying amount of relations | dba | 2017-05-08T17:45:06.193 |
[
{
"message": "I need to design a mysql database which contains a table of cities which supports only a single query - given a point, return the city (or cities) which it falls in. I have the bounding box for each city. What should the column look like to store the city bounding box to fully take advantage of my... | MySQL database for storing city bounding boxes and names | dba | 2017-05-08T18:05:59.793 |
[
{
"message": "I have 3 tables:ve_survey_questions<pre><code>Qid | Question | CategoryId</code></pre>ve_survey_answers<pre><code>AnswerID | QuestionId | Answer</code></pre>ve_survey_useranswers<pre><code>id | UserId | QuestionId | AnswerId | Datetime</code></pre>This is a multiple choice test. So <code>ve_s_Q</c... | Select all rows from a table where a value is NOT found? | dba | 2017-05-08T21:30:24.083 |
[
{
"message": "I'm currently having an issue on 2 out of 3 SQL servers when copying large amounts of data to a MySQL table. The MySQL table currently houses ~6 million records, and the query that is running is trying to update / delete / insert another 100,000 records.I've attempted to use OPENQUERY on the comma... | MySQL client out of memory - Linked Table MsSQL to MySQL | dba | 2017-05-09T02:47:44.780 |
[
{
"message": "<a href=\"https://i.stack.imgur.com/YL52a.jpg\" rel=\"nofollow noreferrer\">On Entity1 table, could I merge the two \"a\" field in a single field ?",
"role": "user"
},
{
"message": "It depends on the data model.If it is possible and correct for a row in table 1 to have a relationship w... | Composite key as foreign key of multiple tables | dba | 2017-05-09T08:19:05.200 |
[
{
"message": "I have problem with take specific data:I have 5 tables:recipes {id_recipe, recipe_name, recipe}ingredients {id_ingredient, ingredient_name, ingredient_calories}categories {id_category, category_name}ingredients_recipes {id_recipe, id_ingredient, ingredient_weight}categories_recipes {id_recipe, id_... | Many to many query | dba | 2017-05-09T11:19:45.950 |
[
{
"message": "I've been reading all the articles (and comments) linked from <a href=\"https://www.brentozar.com/archive/2009/08/stop-shrinking-your-database-files-seriously-now/\" rel=\"noreferrer\">Stop Shrinking Your Database Files. Seriously. Now. I understand that shrinking is bad.What I have a hard time fi... | How do shrink *right* when required? | dba | 2017-05-09T12:14:37.750 |
[
{
"message": "We have two tables Parent (Id int identity, Date datetime, Name nvarchar) Child (Id int identity, ParentId int, Date datetime, Name nvarchar)The Child having a foreign key relationship to the Parent.We have enabled database level read committed snapshot isolation.We only ever insert and delete r... | Why am I getting "Snapshot isolation transaction aborted due to update conflict"? | dba | 2017-05-09T13:46:32.483 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.