خرید بک لینک
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 conceing the tables Lead and Reference. This is the script of the table Lead: SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[Lead]( [LeadId] [int] IDENTITY(1,1) NOT NULL, [LeadName] [nvarchar](100) NOT NULL, [CompanyName] [nvarchar](100) NOT NULL, [Phone] [nvarchar](50) NOT NULL, [Address] [nvarchar](max) NOT NULL, [DOB] [date] NULL, [IndustryID] [int] NOT NULL, [BusinessTypeID] [int] NOT NULL, [IsDeleted] [bit] NOT NULL CONSTRAINT [DF_Lead_IsDeleted] DEFAULT ((0)), [ReferenceId] [int] NOT NULL, [IsLead] [bit] NOT NULL, [Email] [nvarchar](100) NOT NULL, [Website] [nvarchar](100) NOT NULL, [RepresentativeName] [nvarchar](100) NOT NULL CONSTRAINT [DF_Lead_RepresentativeName] DEFAULT (''ادامه مطلب

برچسب: database architecture of whatsapp, نویسنده: رضا رضوی تاريخ: دوشنبه 15 شهريور 1395 ساعت: 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 host, I have put distribution database in full recovery model and am taking log backups every 15mins. After configuring transactional replication, and ensuring a table is in sync, i stopped the agents (log reader and distribution ) on the distribution host. inserted a few records on publication and ensure the log back job of the publisher db is disabled as well. Now restored distribution database from backup ( latest full backup and logs). On starting the log reader agent, it gives me the below error Agent message code 21482. sp_MShelp_repl_agent can only be executed in the "distribution" database. Any ptrs as to what I should be checking here ? Many thanks in advance. Nazeer Let's bادامه مطلب

برچسب: remote distribution database, نویسنده: رضا رضوی تاريخ: دوشنبه 15 شهريور 1395 ساعت: 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 caot open it, it should have old pictures, contacts, call logs etc on it. Can someone point me in the right direction please?

برچسب: how can i open a sbf file,how open sbf file, نویسنده: رضا رضوی تاريخ: دوشنبه 15 شهريور 1395 ساعت: 21:29

AskTom has already discussed this.

This could be achieved in following maer:

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;

برچسب: نویسنده: رضا رضوی تاريخ: دوشنبه 15 شهريور 1395 ساعت: 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 exteal tables to make the cost-based decision. Pushing computation creates MapReduce jobs and leverages Hadoop's distributed computational resources. My question - how and when does the optimizer collect these statistics? Inside the SQL Server relational engine statistics can be created implicitly or explicitly, they age as writes occur, and can be refreshed explicitly or during table maintenance. Are there similar strategies employed in PolyBase? Given the data may be loaded into Hadoop/ Azure blob without SQL Server seeing it on the way in, and data volumes will be large (most likely) run-time ad hoc statistic creation through sampling or similar seems an unlikely strategy to me. ادامه مطلب

برچسب: نویسنده: رضا رضوی تاريخ: دوشنبه 15 شهريور 1395 ساعت: 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 JOIN daily_data d ON (p.product_code = d.prod_code) LEFT OUTER JOIN daily_data d2 ON (p.product_code = d.prod_code AND (d.date < d2.date OR d.date = d2.date AND d.prod_code < d2.prod_code)) WHERE d2.prod_code IS NULL; but the above is giving me one recent row of the last product added ادامه مطلب

برچسب: sql joins explained,sql joins diagram,sql joins examples,sql joins visual,sql joins tutorial,sql joins cheat sheet,sql joins practice,sql joins w3schools,sql joins types,sql joins syntax, نویسنده: رضا رضوی تاريخ: دوشنبه 15 شهريور 1395 ساعت: 16:27

The operating system retued 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 more detail. This is a severe system-level error condition that threatens database integrity and must be corrected immediately. Complete a full database consistency check (DBCC CHECKDB). This error can be caused by many factors; for more information, see SQL Server Books Online. (Microsoft SQL Server, Error: 823) ادامه مطلب

برچسب: error this appears to be a surface mesh,error this network appears to be full hamachi,error 'this' caot appear in a constant,expression,error this network appears to be full, نویسنده: رضا رضوی تاريخ: دوشنبه 15 شهريور 1395 ساعت: 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 | | Sept | 9 | I can get the right output when each record is only within 1 month but I am not sure how to go about crossing month boundaries. Can anyone point me in the right direction? ادامه مطلب

برچسب: hours in a year,hours in a week,hours in a month,hours in a work year,hours in a day,hours in a work week,hours in a day on mars,hours in a month average,hours in a work month,hours in a school year, نویسنده: رضا رضوی تاريخ: دوشنبه 15 شهريور 1395 ساعت: 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_TICKET.TIME_OPENED = IF(T5.STATE = 'opened', NOW(), HD_TICKET.TIME_OPENED), HD_TICKET.TIME_CLOSED = IF(T5.STATE = 'closed', NOW(), HD_TICKET.TIME_CLOSED), HD_TICKET.TIME_STALLED = IF(T5.STATE = 'stalled', NOW(), HD_TICKET.TIME_STALLED), HD_TICKET.SATISFACTION_RATING = IF(T5.STATE = 'closed', NULL, HD_TICKET.SATISFACTION_RATING), HD_TICKET.SATISFACTION_COMMENT = IF(T5.STATE = 'closed', NULL, HD_TICKET.SATISFACTION_COMMENT), HD_TICKET.TITLE = (SELECT NAME FROM ORG1.ASSET WHERE ORG1.ASSET.ID = (SELECT ASSET_ID FROM HD_TICKET WHERE HD_TICKET.ID = HD_TICKET.PARENT_ID)) where T5.NAME = 'New' and HD_TICKET.HD_QUEUE_ID = T5.HD_QUEUE_ID and When I write for example '69' instead of 'HD_ادامه مطلب

برچسب: نویسنده: رضا رضوی تاريخ: دوشنبه 15 شهريور 1395 ساعت: 11:27

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 ruing dbcc showcontig ('[Table]') with tableresults I see the the MinimumRecordSize and MaximumRecordSize is 19 bytes and the AverageFreeBytes is 11.023 bytes. The table is defined as the following. CREATE TABLE [dbo].[Table]( [Key] [binary](7) NOT NULL, [Value] [binary](5) NOT NULL ) ON [PRIMARY] CREATE UNIQUE CLUSTERED INDEX [ClusteredIndex-Key] ON [dbo].[Table] ( [Key] ASC ) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) My question is where is the extra 7 bytes per row coming from? And is there anything I can do about it? Also if there are any suggestions about space optimizations would also be appreciated, the table will be readonly (no updates ادامه مطلب

برچسب: oracle actual row size,sql actual row size,sql server actual row size,sql server calculate actual row size, نویسنده: رضا رضوی تاريخ: دوشنبه 15 شهريور 1395 ساعت: 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, where the from Week <= the to Week. Desired Output: Week(F) Week(T) Metric ------- ------- ------ 1 1 6 1 2 11 1 3 15 1 4 18 1 5 20 2 2 5 2 3 9 2 4 12 2 5 14 3 3 4 3 4 7 3 5 9 4 4 3 4 5 5 5 5 2 I have tried using the same dimension twice, but I get a cross join error. I have also tried creating two dimensions and applying both of them, but all that does is duplicate the Metric value from the current ادامه مطلب

برچسب: how to summon a demon,how to summon a ghost,how to sum in excel,how to summarize,how to summon plantera,how to summon a succubus,how to summon nightbane,how to summon the devil,how to summon duke fishron,how to sumo deadlift, نویسنده: رضا رضوی تاريخ: دوشنبه 15 شهريور 1395 ساعت: 6:25

I installed always on setup on my laptop (testlab) with 3 VMs. One domain controller and 2 SQL instances(Plaed 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 have already changed the port to 1433 in tcpip settings and have also added an exception for sqlserver in the windows firewall. Both of the servers are on the same cluster network. Not sure what else I am missing here enter image description here

برچسب: alwayson problems,sql alwayson problems,sql server alwayson problems,alwayson availability groups problems, نویسنده: رضا رضوی تاريخ: دوشنبه 15 شهريور 1395 ساعت: 6:25

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, master database key, and certificate? I would like to use the minimum number of keys, certificates, and backup files for these keys and certificates. What actions do I need to take if I add an additional SQL Server 2014 to the group? Thank you all. Server Fault and Stack Overflow have helped me many times in the past. ادامه مطلب

برچسب: نویسنده: رضا رضوی تاريخ: يکشنبه 14 شهريور 1395 ساعت: 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 that a significant fraction of all my queries filter persons on doc_id. When, if ever, should I denormalize my schema and replicate doc_id as a field in Person? CREATE TABLE sentence (id INT, doc_id TEXT, text TEXT) CREATE TABLE person (id TEXT, sentence_id INT, doc_id TEXT, name TEXT) If this case, would you recommend I use triggers or some other feature with postgres to ensure consistency? Some empirical observations I have some empirical observations on a small database with the above schema; the sentence table contains 39786 rows and the person table contains 76385 rows. Below, I will report the query plan for different queries and execution times for postgres. The main takeaways seادامه مطلب

برچسب: when if ever is deception permissible in journalism,when if ever is intoxication a defense to a crime,when if ever can groupthink be positive, نویسنده: رضا رضوی تاريخ: يکشنبه 14 شهريور 1395 ساعت: 16:53

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 Ver 14.14 Distrib 5.7.13 Replication method: GTID based Steps followed to re-import the DB and start the slave: mysql>stop slave; mysql>reset master; shell>mysql -u root -p < masterdbdump.sql mysql> start slave; Slave status after this: mysql> show slave statusG *************************** 1. row *************************** Slave_IO_State: Waiting for master to send event Master_Host: *.*.*.* Master_User: abcd Master_Port: 3306 Coect_Retry: 60 Master_Log_File: mysql-bin.000189 Read_Master_Log_Pos: 4945 Relay_Log_File: relay-log-slave.000ادامه مطلب

برچسب: mysql database replication,mysql database replication master master,mysql database replication tool,mysql database replication best practices,mysql database replication tutorial,mysql database replication steps,mysql database replication windows,mysql database replication phpmyadmin,mysql database replication master slave,mysql database replication on same server, نویسنده: رضا رضوی تاريخ: يکشنبه 14 شهريور 1395 ساعت: 16:52

صفحه بندی