DB architecture: What if a table is part of another table
-
تاریخ: 1395/6/15 ساعت: 21:29
My SQL Server database has the initial table named Lead. This table has all kinds of info about a lead person. It has 3 foreign key columns: IndustryId, BusinessTypeId and ReferenceId. I have a problem in the architecture conce ing the tables Lead and Reference. This is the script of the table Lead:...
remote distribution database - Agent message code 21482. sp_MShelp_repl_agent can only be executed in the "distribution" database
-
تاریخ: 1395/6/15 ساعت: 21:29
I have a situation for which I would appreciate any valuable pointers. I have sql transactional replication configured as below. sql01sqla ---> publisher sql01sqlc --> subscriber sql01sqle ---> distributor. I am testing if I can recover my replication flow , in the event of losing the distribution h...
How can i open this .sbf file?
-
تاریخ: 1395/6/15 ساعت: 21:29
i have a micro sd card from an old phone from years ago. i put it in my computer an found a backup.sbf file on it. ive looked everywhere but i ca ot open it, it should have old pictures, contacts, call logs etc on it. Can someone point me in the right direction please? Let's block ads! (Why?)
Find the violated index on ORA-00001 (dup_val_on_index)
-
تاریخ: 1395/6/15 ساعت: 16:27
AskTom has already discussed this. This could be achieved in following ma er: BEGIN -- code containing INSERT operation EXCEPTION WHEN dup_val_on_index THEN Trace_SYS.Message(substr(sqlerrm, instr(sqlerrm, '(')+1, instr( sqlerrm, ')') - instr( sqlerrm,'(') -1 )); END; Let's block ads! (Why?)
How does PolyBase collect statistics from external tables?
-
تاریخ: 1395/6/15 ساعت: 16:27
Books online has says this to say about query optimisation in PolyBase: The query optimizer makes a cost-based decision to push computation to Hadoop when doing so will improve query performance. It uses statistics on exte al tables to make the cost-based decision. Pushing computation creates MapRed...
SQL Joins : How can i get latest record from 2nd table (one to many relationship)
-
تاریخ: 1395/6/15 ساعت: 16:27
I have two tables 1.Product table having columns prod_code alert_limit prod_description 2.Daily_data table having columns prod_code used_today date stock_left How should i join these two tables to get recent records of each product on the basis of date ? I have tried SELECT p.*, d.* FROM product p J...
This Error appear when trying to attach database
-
تاریخ: 1395/6/15 ساعت: 11:27
The operating system retu ed error 38(Reached the end of the file.) to SQL Server during a read at offset 0000000000000000 in file 'C:Program FilesMicrosoft SQL ServerMSSQL12.MSSQLSERVERMSSQLDATAbanking_sys_log.LDF'. Additional messages in the SQL Server error log and system event log may provide mo...
Hours in a month per date range
-
تاریخ: 1395/6/15 ساعت: 11:27
I have a table in mysql with the following data: | StartDateTime | FinishDateTime | | 2016-08-18 10:00:00 | 2016-08-18 11:00:00 | | 2016-08-18 12:00:00 | 2016-08-18 14:00:00 | | 2016-08-31 17:00:00 | 2016-09-01 09:00:00 | What I would like to get as the output is | Month | Duration | | Aug | 10 | | ...
mysqli error: [1093: ...]
-
تاریخ: 1395/6/15 ساعت: 11:27
I have an SQL select, that gives two rows back. The SQL update gives the error message 1093 back; mysqli error: [1093: Table 'HD_TICKET' is specified twice, both as a target for 'UPDATE' and as a separate source for data] update HD_TICKET, HD_STATUS as T5 set HD_TICKET.HD_STATUS_ID = T5.ID, HD_TICKE...
Actual Row Size vs My Estimated Row Size - SQLServer
-
تاریخ: 1395/6/15 ساعت: 6:25
I have a table of 500 million rows on SQLServer 2016. I calculate that each row should take up 12 bytes, total size should be in the order of 6GiB. However the actual size is over 10 GiB. After ru ing dbcc showcontig ('[Table]') with tableresults I see the the MinimumRecordSize and MaximumRecordSize...
How to sum measure value for all records between two dimension values
-
تاریخ: 1395/6/15 ساعت: 6:25
I have a cube, called metric_cube, with a measure of Metric and a dimension Week with the given output on SSAS from SQL Server 2014. Current Output: Week Metric ---- ------ 1 6 2 5 3 4 4 3 5 2 I want to get the cube to output the sum of the Metric for all combinations of a from Week and to Week, whe...
Alwayson - Problem with adding secondary replicas
-
تاریخ: 1395/6/15 ساعت: 6:25
I installed always on setup on my laptop (testlab) with 3 VMs. One domain controller and 2 SQL instances(Pla ed to have it as one primary and one secondary replica). Everything went well until I wanted to add the secondary replica to the Availability group. Please find screenshot attached. Yes I hav...
Sharing keys and certificates between SQL Server 2014 server for encrypted backup and restoration
-
تاریخ: 1395/6/14 ساعت: 16:53
I have six SQL Server 2014 servers. I am not using TDE, Transparent Data Encryption, on any server. I would like to be able to take an encrypted backup of a database on ANY server and restore that backup to ANY OTHER server. What actions do I need to take on each server with the service master key, ...
When, if ever, is it justified to break normalization rules and replicate a field for efficiency?
-
تاریخ: 1395/6/14 ساعت: 16:53
Suppose I have two simple models, Sentences and Persons, where each Person is a reference to person mention in a Sentence. Let's say they have the following normalized schema: CREATE TABLE sentence (id INT, doc_id TEXT, text TEXT) CREATE TABLE person (id TEXT, sentence_id INT, name TEXT) Let's say t...
MySql database replication problem with error no: 1594
-
تاریخ: 1395/6/14 ساعت: 16:52
We have maintained one MySQL master server and two slave MySQL server. One of the MySQL slave server was down for more than a week. I tried to re-import all the database and restart the slave. But got the error 1594: MySql Version (Master): mysql Ver 14.14 Distrib 5.7.13 MySql Version (Slave): mysql...
Select different combinations for same table msSQL
-
تاریخ: 1395/6/13 ساعت: 21:31
I have a table which has 2 fields OS_ID and OZ_ID. I want to select combinations of OS_ID for different OZ_ID. What would be the query for that? Input OS_ID OZ_ID ---- ---- 1 1 2 1 3 2 4 2 5 2 6 2 7 3 8 3 9 3 Output combination row 1,3,7 1,3,8 1,3,9 1,4,7 1,4,8 1,4,9 1,5,7 1,5,8 1,5,9 1,6,7 1,6,8 1,...
ORA-01691 (unable to extend lob segment) even though my tablespace has AUTOEXTEND on
-
تاریخ: 1395/6/13 ساعت: 21:30
I am getting an error: ORA-01691: unable to extend lob segment ABC.SYS_LOB0000167347C00131$$ by 1024 in tablespace XYZ But this is very strange to me because the tablespace has AUTOEXTEND on. What is the likely reason that this happens and how can I overcome it? Thanks. Let's block ads! (Why?)
How can I stop master from starting itself as a slave (in addition to master) on reboot?
-
تاریخ: 1395/6/13 ساعت: 21:30
In a simple MySQL replication Master-Slave configuration I have a problem where Master tries to co ect to itself as a slave on reboot. So when I restart MySQL on Master, I see errors related to the same server trying to replicate to itself and I have to manually run mysql -e "STOP SLAVE;" every time...
Enable Service Broker when deploying solution
-
تاریخ: 1395/6/12 ساعت: 14:06
I'm having an issue deploying the latest build of a database solution after creating some service broker objects. I am thinking that it could be related to not having service broker enabled on the database, as it gets created as part of the build, then deployed straight away. Where can I set the "EN...
How to connect Oracle 9.0.1 using Visual Studio 2015 Community
-
تاریخ: 1395/6/12 ساعت: 14:05
What I have currently done. I have created an Oracle Virtual box and install XP SP3. Install Oracle 9.0.1 on XP SP3. Restore my database on Oracle 9.0.1. Test database using SQL Plus tool. These above things work file. On my local Machine, I have already install visual studio 2015 community. And I a...