Saturday, October 28, 2017

Step by Step Configuring Transactional Replication in SQL Server 2008 R2

Step by Step Configuring Transactional Replication in SQL Server 2008 R2

There are 3 steps involved for Configuring the Transactional Replication:

1.Configuring the Distribution Database.
A database which contains all the Replication commands. Whenever any DML or DDL schema changes are performed on the publisher, the corresponding commands generated by  SQL Server are stored in the Distribution database. This database can reside on the same server as the publisher, but it is always recommended to keep it on a separate server for better performance. Normally, I have observed that if you keep the distributoion database on the same machine as that of the publisher database and if there are many publishers then it always has an impact on the performance of the system. This is because for each publisher, one distrib.exe file gets created. 
2.Creating the publisher.
The Publisher can be referred to as a database on which the DML or DDL schema changes are going to be performed.
3.Creating the subscriber.
The Subscribers the database which is going to receive the DML as well as DDL schema changes which are performed on the publisher. The subscriber database normally resides on a different server in another location.

How it works

Transactional replication is implemented by the Snapshot Agent, Log Reader Agent, and Distribution Agent. The Snapshot Agent prepares snapshot files containing schema and data of published tables and database objects, stores the files in the snapshot folder, and records synchronization jobs in the distribution database on the Distributor.
The Log Reader Agent monitors the transaction log of each database configured for transactional replication and copies the transactions marked for replication from the transaction log into the distribution database. The Distribution Agent moves the initial snapshot jobs and the transactions held in the distribution database tables to Subscribers.


Configuring the Distribution Database











Creating the Publisher
















Creating the Subscriber
















Tuesday, February 28, 2017

Windows 2012 No Remote Desktop License Servers Available

Customer site is running Windows Server 2012 Essentials and a Windows 2012 Terminal Server. User contacts me to report that she was unable to connect into the Terminal Server from Remote Web Access (RWA). I tried, and got the same error message when I tried to access the Terminal Server:
The remote session was disconnected because there are no Remote Desktop License Servers available to provide a license. Please contact the server administrator
I knew it was not an RWA issue because I could RWA into the 2012 Essentials server. A quick search and I found a post that indicates that there is a bug with 2012 RDS session hosts where they will not look to the licensing server for CALs when the grace period ends. Although I would like a permanent fix, the following solution resolved the crisis at hand.
The solution is to delete a specific registry key relating to the grace period, and then reboot the server.
  1. Open up the registry editor on the Terminal Server
  2. Browse down to: HKLM\System\CurrentControlSet\Control\Terminal Server\RCM
  3. Make a backup copy of the GracePeriod registry key
  4. Then you can Delete the GracePeriod registry key
    image
  5. Note: if you are not able to delete the key, you need to give yourself permission:
    Right click on the GracePeriod key and assign ‘full control’ permission to the administrator account.
    You should then be able to delete the key.
 Please see below step....

Step 1

access registry key permissions in windows 7 vista

Step 2

In the Permissions window that appears, Click Advanced.
advanced permissions window for registry in wnidows 7 vista

Step 3

Click the Owner tab and Select your username from the list.* Now Check the Replace owner box and Click Apply. (Yes! This is one of the few instances where the Apply button is actually useful!)
*If your username is not on this list Click Other users or groups and manually add it.
change windows 7 or vista ownership of registry key

Step 4

Click the Permissions tab and then the Add button.  In the Select User window Type your username into the white box and Press OK.
add a new user to the full permissions list in registry editor

Step 5

A new Permission Entry window should pop-up; just Check the Allow Full Control box and Click OK.
set your username to full control in registry editor for windows 7 or vista

Step 6

Back on the previous window, your username should be on the list with Permissions set to Full Control.  Now all that is left to do is to save and exit all open windows by Clicking OK a couple of times.
your user should appear on the list with full control, click ok to save changes to registry editor




6.Reboot the server and check it out.

Tuesday, November 1, 2016

Accesing Microsoft SQL Server Linked Servers


What are Microsoft SQL Server Linked Servers?
“Linked Server” is a feature of MS SQL Server that allows access to non-SQL Server databases through SQL Server. Only SQL Server Developer and SQL Server Enterprise versions support Linked Servers. SQL Server Express edition has several limitations that do not allow configuring or using Linked Servers.
A Linked Server enables the SQL Server Database Engine to execute commands against OLE DB data sources outside of the instance of SQL Server. Many types of OLE DB data sources can be configured as linked servers such as  Microsoft Access, Excel, another instance of SQL Server, etc.
Linked servers offer the following advantages:
  1. Remote server access.
  2. The ability to issue distributed queries, updates, commands, and transactions on heterogeneous data sources across the enterprise.
  3. The ability to address diverse data sources similarly.
A linked server definition specifies the following objects:
  • An OLE DB provider: DLL that manages and interacts with a specific data source
  • An OLE DB data source: Identifies the specific database that can be accessed through OLE DB (although data sources queried through linked server definitions are ordinarily databases, OLE DB providers exist for a variety of files and file formats.)

How to configure a SQL Server Linked Server to connect to Denodo?

Virtual DataPort provides access to ODBC clients through the PostgreSQL ODBC driver. To install the driver, follow the steps of the Virtual DataPort Developer Guide Section “Access through ODBC”.
Once the DSN to a Denodo database  is created on the system, a Linked Server to Denodo can be configured.
  1. Create a User DSN to a Server name (Server1)
odbc_admin.png
  1. Start the SQL Server Management Studio and under Object Browser expand Server Objects and right click Linked Servers as shown below:
  1. Click on New Linked Server. On the new window fill in the information as shown to create linked server under the General tab.
new_linked_server.png
  1. On the Security tab, select the  ‘Be made using this security context’ option and enter the credentials to the Denodo Server.
  2.  Remote Login : SQL Server login user name : sa 
  3. Password : Sql Server Password : 123 
security_tab.png
  1. Finally, under the Server Options tab, change RPC, RPC Out, and Lazy Schema Validation options to True (by default they are set to False).
server_options.png
  1. Click Ok, after making all the mentioned changes. This will create the linked server and it will be listed under SSMS Object Browser. Right Click on the new linked server and click on Test Connection
test_connection.png

Wednesday, October 12, 2016

How To Install Microsoft Security Essentials In Windows Server 2012 R2


Microsoft Security Essentials Installation Guide For Windows Server

    Download and Install

  1. Firstly you’ll want to download Microsoft Security Essentials onto your Windows server. Select the language of your choice and either 32-bit or 64-bit depending on the architecture your server operating system is using.
  2. Save the mseinstall.exe file somewhere locally on the server, do not simply run it as by default the installation will fail with the following error:
    Microsoft Security Essentials cannot be installed on your operating system.
    
    Your version of the Windows operating system is not supported by this program.
    
    Error code:0x8004FF04
    
    How to fix 0x8004FF04 error
  3. To get around this error message, right click the mseinstall.exe file and select properties. mseinstall.exe properties
  4. From the properties window, select the compatibility tab. Within the compatibility tab tick “Run this program in compatibility mode for:” under Compatibility Mode and select Windows 7 from the drop down box, as shown. mseinstall.exe compatibility mode
    Click OK to continue.
  5. If you were to run the mseinstall.exe file at this point, you would receive a different error as shown below:
    Microsoft Security Essentials cannot be installed on your operating system. 
    
    Windows Program Compatibility mode is not supported by this program.
    
    Error code:0x8004FF71
    
    How to fix error 0x8004FF71
    In order to resolve this, run command prompt as administrator and enter the folder where the mseinstall.exe file is located. Run the mseinstall.exe file with the /disableoslimit flag on the end as shown below. cd C:\Users\Administrator\Downloads
    mseinstall.exe /disableoslimit
  6. The installation wizard should now correctly open and Microsoft Security Essentials can now be installed and will proceed without the previous error messages, click Next to continue and work through the installation wizard. install1
  7. Once the installation has completed you can optionally update and perform a scan, this is recommended as the definitions database needs to be kept up to date to find newer threats. An Internet connection will be required to download any available definition updates through the application, however these can also come through from Windows updates so if you have a WSUS server you can update from here as well. After updating a quick scan will take place. Microsoft Security Essentials Installation Complete
    You can select the Settings tab to modify when the weekly automatic scheduled scan takes place, by default a quick scan is set to run every Sunday at 2am and will not use more than 50% of the available CPU resources.
    Microsoft Security Essentials Default Settings
  8. Testing

  9. Now that Microsoft Security Essentials has been successfully installed, we will test the actual functionality of the program to ensure that it will correctly identify a threat. To do this we will create a test EICARs file and see if the real-time protection automatically detects and quarantines it. Essentially we are just going to open Notepad and create a .txt file containing the test string defined on that page and then save it to the desktop.
    EICAR test file
  10. Shortly after saving the file we have been visually alerted that malware has been detected and that Microsoft Security Client is taking action to clean the detected malware. Maleware detected
    If we check the History tab of Microsoft Security Essentials we can then see the test file listed as a quarantined item, confirming that it is working correctly as intended in Windows Server 2012 R2.
    Malware quarantined

Summary

Although not officially supported, we have successfully installed Microsoft Security Essentials (a cut down Windows Defender) in Windows Server 2012 R2 and confirmed that it is working correctly and detecting security threats.
This is better than the default level of security, which is none as Windows Defender is only built into Windows 8, 8.1 and 10 client operating systems, however it is recommended that server operating systems make use of enterprise solutions such as System Center Endpoint Protection (SCEP) or some other option available from some security vendor.

Thursday, December 25, 2014

List of Android Secret Codes Tips and Tricks.

Android‬ Secrete codes:
---------------------------
1. Phone Information, Usage and
Battery – *#*#4636#*#*
2. IMEI Number – *#06#
3. Enter Service Menu On Newer Phones
– *#0*#
4. Detailed Camera Information –
*#*#34971539#*#*
5. Backup All Media Files –
*#*#273282*255*663282*#*#*
6. Wireless LAN Test – *#*#232339#*#*
7. Enable Test Mode for Service –
*#*#197328640#*#*
8. Back-light Test – *#*#0842#*#*
9. Test the Touchscreen –
*#*#2664#*#*
10. Vibration Test – *#*#0842#*#*
11. FTA Software Version –
*#*#1111#*#*
12. Complete Software and Hardware
Info – *#12580*369#
13. Diagnostic Configuration – *#9090#
14. USB Logging Control – *#872564#
15. System Dump Mode – *#9900#
16. HSDPA/HSUPA Control Menu –
*#301279#
17. View Phone Lock Status –
*#7465625#
18. Reset the Data Partition to Factory
State – *#*#7780#*#*
19. Format Your Device To Factory
State(will delete
everything on your phone) –
*2767*3855#
20. Hidden Service Menu For Motorola
Droid – ##7764726

Tuesday, November 5, 2013

How to install OS Mavericks on your PC with Unibeast

If you're interested in running Mac OS X, but you don't want to pay ridiculous prices for a normal Mac, then a Hackintosh just might be for you. Right now, the newest iteration of OS X is 10.9, known as Mavericks. Installing Mavericks on a PC is pretty much the exact same as installing Mac OS X 10.8 (Mountain Lion). This guide will follow tonymacx86's standard Unibeast method, except that we try to cover the process with more detail (and pictures!).

Requirements:
  • A compatible computer: Not every computer will work with Mac OS X, even with the help of tools like Unibeast and Multibeast. Be sure to read the Hackintosh compatibility guide very carefully, to check whether or not your computer qualifies. The hardware requirements for OS X Mavericks are identical to those for OS X Mountain Lion; AMD processors and older 32-bit Intel processors (such as Pentium M) are not supported. If your computer already has OS X Mountain Lion installed, Unibeast will just update Mountain Lion to Mavericks normally, without deleting any of your apps or files.

  • A separate hard drive: Mac OS X needs its own hard drive (a minimum of 10 GB of space is required, but at least 50 GB of space is recommended). Unibeast will not work on a hard drive where Windows was installed first. You can bypass this requirement by applying the MBR patch to Unibeast (the process for Mavericks is the exact same as for Mountain Lion).

  • Unibeast (Free): Unibeast is a Mac program that modifies the official OS X Mavericks installer, and writes it onto a USB drive. You can then use this Unibeast USB drive to run the Mavericks installer on a PC. Unibeast works with Mac OS X Snow Leopard and newer; registration on tonymacx86.com is required to download Unibeast. 

  • A Hackintosh with Snow Leopard/Lion/Mountain Lion already installed, a real Mac, or a Mac OS X virtual machine: Unibeast is a Mac app, so you need a computer with Mac OS X to run it. You could use a real Mac, if you own one. Alternatively, you could install Mountain Lion on a virtual machine, and run Unibeast on there instead. Be sure to install the Virtualbox Extension Pack to view USB drives from your virtual machine.

  • OS X Mavericks (Free): The method used by this guide requires that you download a free copy of the Mavericks installer app from the Mac App Store. Though the Mac App Store is included in Mac OS X 10.6.6 and newer, you have to be running 10.6.8 to download Mavericks. (you might be able to circumvent this requirement by spoofing your system version).

  • An empty USB drive (8 GB or larger): The USB drive used for Unibeast must be at least 8 GB in size. Since Unibeast will erase all of the files on your USB drive, make sure to back up its contents first. You can reuse this USB drive for normal stuff after you finish installing Mavericks.

  • Multibeast (Free): Multibeast is a collection of kext files that your Hackintosh will need to run properly, after the initial installation. Download it onto a USB drive. Be sure to download the newest version 6 of Multibeast, not the older versions 3, 4, or 5.

1. Format your USB drive for Unibeast
Plug your USB drive into Mac OS X, and open Disk Utility (located in the Utilities folder in the Applications folder). Select the USB drive in the sidebar of Disk Utility, go to the "Partition" tab of Disk Utility. Click the "Options" button, and check the partition scheme: it should be set to "Master Boot Record" by default.
Then, create a new partition layout with 1 partition. Set the format to "Mac OS Extended (Journaled)". Name the new partition whatever you want (I named mine "Cheesecake"), and click "Apply". 
This will erase and reformat your USB drive so that it's ready for Unibeast. The process should only take a few seconds to complete.

2. Run Unibeast
Download Unibeast and run it. Make sure that the OS X Mavericks installation app from the Mac App Store is inside your "Applications" folder of Mac OS X.

Select your USB drive as the installation destination (mine is named "Cheesecake").

Click through the pages in the Unibeast installer, until you reach the following selection page. Choose the "Mac App Store Mavericks - 10.9" option. In addition, there are two extra options you might want to select: "Legacy USB Support" and "Laptop Support". Select the first option if you use a first-generation Intel Core processor; these are Intel Core processors with 3-digit model numbers, such as the Intel Core i7-960 or i7-875K. Select the second option as well if you're installing Mavericks on a laptop. If neither of these options apply to you, simply click "Continue".

You'll come up to the installation progress bar. Chances are, Unibeast will look like it's stuck at the "Running package scripts" stage. Don't panic! This is normal-- during the "Running package scripts" stage, the progress bar is counting the number of files copied, but Unibeast is copying some really big files, so it takes forever for the number of copied files to increase.

Though Unibeast is supposed to only take 10-15 minutes to run, it may take up to an hour, depending on how fast your USB drive is.

3. Set up the parts of your PC
Before you begin your Mavericks installation, make sure to follow these procedures:
  • Unplug all USB-connected devices from your computer before you begin the setup (except your keyboard and mouse). A faulty external USB hard drive can cause your Hackintosh bootloader to give you EBIOS errors on startup.
  • Open up your computer and unplug any extra internal hard drives that your computer has, besides the hard drive that you're installing OS X on. (Just unplug the hard drive SATA cables from your motherboard.)
  • If your computer uses a discrete (separate) graphics card, unplug that card from your computer motherboard and use the integrated graphics on your CPU instead (assuming your CPU actually has integrated graphics). Doing this will reduce the number of possible points of failure in the guide-- Mac OS X tends to have a lot of problems with discrete graphics cards during the setup process. 
    • If possible, connect your monitor to the DVI port of your computer's integrated graphics. The Mac OS X installer sometimes has problems with HDMI and VGA. 
NOTE: If you're installing Mac OS X on a computer that already has Windows installed on a separate internal hard drive, you may have to enable AHCI for Windows beforehand. Otherwise, Windows won't boot afterwards. Also, after installing Mac OS X, you should also sync your clock on Windows with Mac OS X.

4. Set up your motherboard's BIOS
The BIOS is basically a settings page for your motherboard. To enter the BIOS on my own computer's Gigabyte P67A-D3-B3 motherboard, I have to press the delete key when it boots (before the operating system starts). Different manufacturers set different keys for opening the BIOS.

NOTE: If you have a newer Gigabyte motherboard that uses the UEFI interface instead of BIOS, check out our guide for setting up the UEFI instead. New motherboards with the LGA 1150 socket (the boards that support Intel "Haswell" processors) generally don't need much tweaking at all.

If your Hackintosh already has Mac OS X Snow Leopard, Lion, or Mountain Lion installed, the only thing you'll need to change in the BIOS is the "Boot Device", so that USB drives have highest priority.

If your Hackintosh doesn't have any version of Mac OS X installed yet, you have to change a few extra BIOS settings. Before starting, reset all of your BIOS settings to their factory defaults. On Gigabyte motherboards, you can reset your BIOS settings to their default by selecting "Load Optimized Defaults" on the main page of the BIOS. Once your BIOS is running on its defaults, you need to change these three settings:

Boot Device - Change the boot device of your computer so that "USB-HDD" is first. You need to do this for Unibeast to work. After you finish installing Mac OS X, you should change this setting back to default, so that "Hard Disk" is the first boot device (this optional, but it will speed up your boot times).

HPET - Change this to 64-bit.
SATA Control Mode (your BIOS might call this a different name) - This will probably already be set to "SATA", "IDE", or "RAID". Change it to "AHCI". Mac OS X only works with AHCI.

Keep in mind that the BIOS on most motherboards do not support using a mouse, so you'll probably have to navigate through the BIOS with the arrow keys on your keyboard. Press "Enter" to change a selected option in the BIOS. On my Gigabyte motherboard, I have to press F10 to save my changes.

5. Boot into Unibeast
Restart your Hackintosh, and plug in your Unibeast USB drive. If things go well, your computer will boot from the USB drive instead of booting from your normal hard disk. You will then be able to view the Unibeast menu.

If you do not manage to reach the Unibeast menu, check your motherboard's BIOS settings to make sure that the changes you made in Step 4 were properly applied. If they were, but you still cannot boot from the Unibeast USB drive, unplug your USB drive, and go back to Step 1. Reformat your USB drive with Disk Utility and try again. If all else fails, try using a different USB drive for Unibeast.

At the Unibeast menu, select the name of your Unibeast USB drive, by using the left/right arrow keys on your keyboard, and then press the enter key (or return key) to start the OS X Mavericks installer.

In the worst case scenarios, instead of loading the Mac OS X installer, you may end up at a dark gray screen that tells you to restart your computer (a kernel panic), or you may end up with a small crossed-out sign (a loading error). If you get a kernel panic/loading error (or if the Mac OS X installer simply won't start within 10 minutes), you'll need to enter some boot flags.

To enter boot flags, manually restart your computer by pressing your computer's power button. Then, once you've booted back into the Unibeast menu, try typing any necessary boot flags before pressing the enter/return key. Check out this list of common boot flags for reference ( PCIRootUID=0 and -x are two popular boot flags).
6. Install Mavericks
Continue, and you will eventually come up to a page that asks you for a "destination" for your Mac install. Select the hard drive that you want to install OS X Mavericks on, and continue.

If you're installing Mavericks on an empty hard drive, the hard drive selection box will be blank. You'll have to erase that hard drive with Disk Utility first (check out Step 4 of our Snow Leopard installation guide for more details).

Otherwise, select the hard drive you want to install OS X Mavericks on, and click "Install". Mavericks will now install itself. This will take at least 30 minutes.

Restart. If your Hackintosh already had Mac OS X Snow Leopard, Lion, or Mountain Lion installed beforehand, you can unplug the Unibeast USB drive. Otherwise, keep the USB drive plugged in. At the boot screen, you'll see an icon for the hard drive where you installed Mavericks. Select it (use the arrow keys on your computer) and press "Enter".

If everything works properly, then Mavericks will boot. Mission accomplished!

Once again, if you get a kernel panic/loading error when you try to boot your new Mavericks installation (or if the installation simply won't start within 10 minutes), you'll need to enter some boot flags.

To enter boot flags, manually restart your computer by pressing your computer's power button. Then, once you've booted back into the Unibeast menu, try type any necessary boot flags before pressing the enter/return key. Check out this list of common boot flags for reference ( PCIRootUID=0 and -x are two popular boot flags).

7. Multibeast
Multibeast is a collection of kext files that you'll need to install for your Hackintoshes to have sound, internet, a high resolution screen, and more. Different Hackintosh builds require different Multibeast setups, though most setups are very similar. Find out what Multibeast options you need to install. If you have a Gigabyte GA-P67A-D3-B3 motherboard like me, check out my own Multibeast setup.

If you're just updating your Hackintosh from Mac OS X Snow Leopard, Lion, or Mountain Lion, you don't have to reinstall UserDSDT or Easybeast in Multibeast after installing OS X Mavericks. Mac OS X treats Mavericks as just another update-- this generally means that the only things you have to reinstall in Multibeast are audio kexts and ethernet kexts. You might also have to reinstall miscellaneous kexts, such as TRIM Enabler (for SSDs).

To run Multibeast in OS X Mavericks, you have to go the "Security" section of System Preferences in Mac OS X, go to the "General" section, and check "Anywhere" in the "Allow applications" section. After running Multibeast, you'll also probably want to change your BIOS settings back to normal (from Step 4).

Once that's done with, you should be running a fully functional copy of OS X Mavericks on your PC. If you plan on updating Mac OS X in the future, check out our guide to updating your Hackintosh. Congratulations!