vendredi 27 mars 2015

Reporting services - High availability setup - SQL server 2012


I need some guidance on best practices and setup for SSRS. I have a SQLServer 2012 setup with data source on 1 instance and SSRS on a separate server. There is a need to setup HA and I understand what is involved with the setup for the data source server. This is a large instance with many databases.


The SSRS instance is very small (350 MB). Should I setup AOAG for the report server db? OR configure a scale-out deployment? The goal is for smooth transition should one server go down. I am not very familiar with SSRS i.e setup beyond report db - the report manager etc. Would failover cluster manager take care of the rest. I will have to guide the application team with this.


Getting some input as to the direction I need to look and research will be gratefully appreciated.


Thank you, Debbie.





How do you repair a 'Suspect' database?


My database has gone offline, it is highlighted as 'Suspect'.


Foolishly, I haven't got a recent back up.


Is there a way of quickly restoring the database?


I'm using MS SQL-Server (2008).





Moving DB Log destination?


I currently have SQL DB and Log files going to the same drive. I would like to move the Log files to their own drive. Is there an easy way to achieve this and will it require downtime/reboot of the server?





What will be the Better database design for following table?


I am designing database schema for bulk mail system.


campaign table is used to store the campaign details.



Table Campaign
-------------------------------------------------------------------------------
id | subject | message | status | sent | opened | bounced |senttime | User_id
-------------------------------------------------------------------------------


campaign_log table will used to store the every recipents status like he opens mail or mail bounces for this email or sent etc.



Table Campaign_log
--------------------------------
id | campaign_id | email |status
---------------------------------


My questions is



  1. should I make the columns in table campaign for storing the count of sent,opened and bounced mails

  2. Should I make the another table for storing the statistical data like sent,opend and bounced mail ? can it improve a performance.

  3. I like to explain the second question to describe my doubt (may be it silly stupid idea) I am explaining my doubt with above example. In campaign table id,subject message fields are filled by the user while sent, opened and bounced columns are fills after sending the campaign. Is there more unused column at the inserting or updating affects the performance I mean to say when inserting the campaign, the sent opened and bounced are just like unused we are not filiing them

  4. I read about OLTP AND OLAP databases. But I am confuse about my application nature. because there is because my database is going to store the thousands of row in tables such as mailing list also there is more updates operation will be performs and it's also have the reporting, analysis system.


and when updatingthe count for each column sent opened and bounced other columns are unused.


I am sorry I think it's very silly but I am beginnig to database design and have the doubt and I want to clear it.





Can I setup database triggers to run on a defined secondary set of servers only?


This might sound a bit off, but here's what I have been thinking for a while now:


Use Case


You want to build an activity log for each user action on your application using database (postgreSQL) triggers on every relevant table, outputting to an activity_log table. The triggers should do the trick, but how do we eliminate the burden of every user action triggering an action on the production servers, delaying the whole application?


Purposed Architecture


What I have in mind is a complex structure where one or more secondary postgres nodes would take the entire activity_log trigger activity. The triggers would be disabled on all primary nodes (the ones the application reads and writes to) and enabled on some/all secondary nodes (let's call them "workers"). Data would be written to a primary server (no trigger runs) and replication would forward it to all other nodes. When a "worker" node get's the data, the triggers process it and update the activity_log. activity_log table should be replicated across ALL servers which means that a "worker" node should be able to read, write and send selected data upstream.


Is there anything even close to this? Is this even possible to achieve without having to rewrite a replication model from scratch?





Change MySQL master to a slave


I have a MySQL master/slave configuration



-------- --------
| master | -> | slave1 |
-------- --------


I want to kill my current master, transform slave1 to be the new master and have another slave pointing to slave1



-------- ------------ --------
| master | | new master | -> | slave2 |
-------- ------------ --------
KILLED


What is the best way to do this without database downtime? I am using MariaDB 10.0.17





How to create a communication link failure in MySQL


For testing purposes I would like my MySQL server to generate a communication link failure (com.mysql.jdbc.exceptions.jdbc4.CommunicationsException). How can I tweak MySQL that this error is easily created?