I love visual basic, seriously.. http://visualbasic.about.com/b/2012/05/29/iran-virus-detection-in-vb.htm
Installing SQL Server 2012 on Windows Server Core Part 1
Windows Server Core has been around since Windows Server 2008. I have been wanting to install SQL Server 2008 on Windows Server Core but could not do so because it wasn’t officially supported. However, SQL Server 2012 now is. How do I install SQL Server 2012 on Windows Server Core?
When Windows Server 2008 was launched a few years ago, there was a lot of hype about the features introduced in the new operating system. It boasts of a lean, mean operating system that you can spin up with very little overhead. You’re probably aware of the marketing campaign that Microsoft came up with for the launch back in 2008: the crouching server. With Windows Server 2008 comes a variation of installation called Server Core.
What is Windows Server Core?
Windows Server Core is a stripped-down, minimal configuration installation option of Windows Server 2008. When it first came out, I called it the Linux version of Windows just because you don’t have the fancy GUI and Windows Explorer shell that all Windows administrators have gotten used to. Managing the server means going back to the good-old-days of MS DOS, ramping up on Windows PowerShell or managing it remotely using the Remote Server Administration Tools (RSAT). You do have minimal GUI available such as Task Manager, Notepad and Registry Editor. Having a stripped-down version of the operating system provides several benefits:
- More secure. Because of the limited features, you have reduced surface area for any potential attacks, especially for servers that are constantly connected to the Internet.
- Relatively perform better. One of the things I do with my test Windows servers is to disable all of the unnecessary services running on the machine – Windows Audio, Print Spooler, etc. I also do this on my Windows workstation. I want to maximize all the resources available on the server so that my other applications can utilize those resources when necessary. With Windows Server Core, I no longer have to do this since the only services available are those that you turn on.
- Reduced management. With fewer components come less patches to install. And less patches to install mean reduced downtime. I have dealt with server downtime in the past that was caused by a .NET Framework security patch causing web applications to become inaccessible.
When Windows Server 2008 was released, Server Core did not include the .NET Framework, thus, limiting its ability to run managed code, including SQL Server 2005 and higher. Server Core on Windows Server 2008 R2, however, included both the .NET Framework 2.0 and 3.5, neither of which are enabled by default. In keeping with the vision of minimal configuration of the Server Core components, the .NET Framework did not include some components such as those pertaining to graphical user interface (Windows Presentation Foundation and Windows Forms elements.) However, even with the support for .NET Framework on Server Core, SQL Server 2008 R2 was still not supported. While others have attempted to install SQL Server 2008 on Server Core, Microsoft does not officially support it – until now. SQL Server 2012 is the first version of SQL Server officially supported on Windows Server Core.
Configuring Windows Server Core
Installing Windows Server Core is pretty straight-forward. During the installation process, in the Select the operating system you want to install dialog box, make sure you select those with the (Server Core Installation) option, depending of course on your license. Once installed, there’s no turning back because you can’t convert a Server Core installation to a full blown installation without having to reinstall. And since you have minimal configuration with Server Core, the installation will be relatively fast as compared to the full blown version. On my virtual machine running with 1GB of memory, the installation took less than 15 minutes.
After logging in, you will be presented with a command-line interface for you to start configuring the server. This is where you take those rusty old MS DOS commands from your toolkit and start pounding away. The first thing you need to do after the installation is to activate Windows. This can be done via the slmgr.vbs script. You can use the /ipk switch to provide the Product Key and the /ato switch to activate Windows. Activation will be a bit more challenging when the Server Core machine is not connected to the Internet. A workaround for this is to temporarily request access to the Internet just for the purpose of activation.
NOTE: SQL Server 2012 requires Windows Server 2008 R2 Service Pack 1 so make sure you download and install it on all server operating systems that you intend to use.
For configuring the server, you have the option to use the following:
- Native MS DOS commands
- Windows PowerShell
- CoreConfigurator, an open source tool available from CodePlex that makes managing Windows Server via GUI
I am including command-line options such as native MS DOS commands and Windows PowerShell for configuring Windows Server Core so you can choose depending on your preference. This tip will focus more on the native MS DOS commands so you can leverage your previous knowledge.
Since sconfig.cmd is very intuitive and user-response driven, I’ll skip that as well. I will slightly talk about CoreConfigurator since it’s a GUI-based utility which we are all very familiar with.
You can launch sconfig.cmd by typing in sconfig from the command prompt.
Notice that you have everything you need to start configuring the server – change server hostname, configure network settings, etc. However, since it is driven by the user response, you still have to manually type everything. If you use native MS DOS commands and Windows PowerShell, you can easily write up a script to perform all of the tasks and run the script once, eliminating the need to manually type and potentially make mistakes in the process. Windows PowerShell has to be enabled first before you can even use it.
Change the Time Zone Settings (MS DOS)
To change the time zone on the Server Core machine, you can use the tzutil.exe command below, replacing the time zone value as appropriate.
C:> tzutil /s "Eastern Standard Time"
To display the list of time zones that you can select from, you can use the /l switch.
Configure Network Settings (MS DOS)
Before we can even join the server to the domain, we need to configure the network settings – specify static IP address, subnet mask, gateway and DNS servers. For this server, I will use the following network configuration.
- IP Address: 172.16.0.51
- Subnet Mask: 255.255.0.0
- Default Gateway: 172.16.0.5
- Preferred DNS server: 172.16.0.100
- Alternate DNS server: 192.168.0.100
For standardization purposes, I will first rename my network adapter. This will be helpful especially when you have multiple network adapters, as in the case of a Failover Cluster. We need to display the name and properties of the network interface that we need to configure. For all network-related configuration tasks, we will use the netsh.exe command.
C:> netsh interface ip show config
In my environment, the network adapter named “Local Area Connection” is the one that I will configure. To rename the network adapter to LAN, type the following netsh command below.
C:> netsh interface set interface name="Local Area Connection" newname="LAN"
Next, we will change the IP address, subnet mask and default gateway values
C:> netsh interface ip set address "LAN" static 172.16.0.51 255.255.0.0 172.16.0.5 1
Finally, we will assign the primary and alternate DNS servers. I used the validate=no parameter on my netsh command because even if the IP address of the DNS servers have been successfully assigned, you will still get the error message “The configured DNS server is incorrect or does not exist.”
C:> netsh interface ip set dnsservers "LAN" 172.16.0.100 index=1 validate=no C:> netsh interface ip set dnsservers "LAN" 192.168.0.100 index=2 validate=no
Rename the Server and Join it to the Domain
We need to rename the server and provide a meaningful name to the machine prior to joining it to the domain. In order for us to rename the server, we need to first identify the current server name that was assigned during the installation. The command hostname can be used for this purpose.
Once we have the current server hostname, we will use it with the netdom command. In my environment, the current server hostname is WIN-ANFURVALTKP. Alternatively, we can just pass the %COMPUTERNAME% variable in the netdom command so we don’t have to worry about the current server hostname.
C:> netdom renamecomputer %COMPUTERNAME% /newname:SQL-SERVERCORE
This will prompt you to reboot the machine. Use the shutdown command with the /r switch to reboot the machine.
C:> shutdown /r
After rebooting the machine, we are now ready to join it to the domain. We will use the netdom command to accomplish this task.
C:> netdom join SQL-SERVERCORE /domain:TESTDOMAIN.local /userD:administrator /passwordD:yourPassword
This will again prompt you to reboot the machine. Use the shutdown command with the /r switch to reboot the machine.
Enable Remote Administration
While we can log in directly to the Windows Server Core machine, we probably won’t do so since most of our servers are in the data center. We need to enable the server to allow remote management via Remote Desktop, Windows Remote Shell or MMC.
- To enable Remote Desktop access on the machine, type the following command.
C:> cscript C:WindowsSystem32Scregedit.wsf /ar 0
You can verify this by connecting to your Windows Server Core machine from another workstation using Remote Desktop.
- To allow Remote Administration from the Windows Firewall, type the following command
C:>netsh advfirewall firewall set rule group="Remote Administration" new enable=Yes
You can also disable the Windows Firewall altogether if you have internal firewalls that are managed by your network team. Be sure to check with your security policies before doing so.
- To enable Windows Remote Shell, type the following command
Add the .NET Framework 2.0 and 3.5
Both the .NET Framework 2.0 and 3.5 are prerequisites for installing Windows PowerShell 2.0 and SQL Server 2012. As both are disabled by default, we need to add both of them as features in Windows Server Core. To do so, we will be using the Deployment Image Servicing and Management tool, or the dism.exe command.
C:>DISM.exe /online /enable-feature /featurename:NetFx2-ServerCore C:>DISM.exe /online /enable-feature /featurename:NetFx3-ServerCore C:>DISM.exe /online /enable-feature /featurename:NetFx2-ServerCore-WOW64 C:>DISM.exe /online /enable-feature /featurename:NetFx3-ServerCore-WOW64
Enable Windows PowerShell
Now that the .NET Framework has been enabled on Windows Server Core, we can now enable Windows PowerShell. We will perform this task using the dism.exe command
C:>DISM.exe /online /enable-feature /featurename:MicrosoftWindowsPowerShell C:>DISM.exe /online /enable-feature /featurename:MicrosoftWindowsPowerShell-WOW64
So far, we’ve prepared the Windows Server Core machine for the SQL Server 2012 installation using mostly MS DOS commands available in Windows Server 2008 R2. In the next tip in this series, we will look at performing some of these steps using Windows PowerShell so that you can compare between the two approaches and see which one you prefer. This will also give you some insights on how you can create scripted installation and configuration of your base operating system prior to installing SQL Server 2012.
Compatibility between Access and SQL Server versions
Access 2010 .adp files are compatible with SQL Server 2008 and earlier. Later versions of SQL Server may also be compatible with Access 2010 .adp files, but as a general rule of thumb, if you want to modify SQL objects from within an Access .adp file, the Access version must be higher than the SQL Server version. For example, you cannot modify objects in a SQL Server 2008 database by using Access 2007. Likewise, you cannot modify objects in a SQL Server 2005 database by using Access 2003.
Important Before upgrading to a new version of Access or SQL Server, always test your Access project with the new version(s) to be sure all the features work correctly.
Data type and diagram support
Date/time data types
Access 2010 provides limited support for four new date/time data types that were added in SQL Server 2008:
In an Access project, you can create and design tables and views that use these new data types. However, on forms and reports, fields of these data types behave as if they are text fields. As a result, you cannot use date formats or the date pickers with these data types.
Variable-length data types
The following variable-length data types can be used in Access 2010 projects:
However, you cannot add or modify fields that use MAX specifiers from within an Access project.
BIGINT data type
Access 2010 supports the SQL Server BIGINT data type. However, the Access user interface enforces a lower limit of -999999999999999999 (approximately -2^60) as opposed to the actual lower limit of -2^63. The upper limit in the Access user interface is 2^63-1, the same as in SQL Server.
The following new SQL Server 2008 data types are not supported in Access projects:
Access blocks design mode for tables or views that use these types.
Database diagrams (relationship view)
As a result of the three unsupported data types listed in the previous section, you cannot open SQL Server 2008 database diagrams in an Access project.
Create an Access project
Use this procedure to create a new Access project (.adp) file in Access 2010.
- On the File tab, click New.
- Do one of the following:
Create an Access project in the default file location
- Under Blank Database, type a name for the project in the File Name box using the .adp file name extension.
Create an Access project in a different file location
- Under Blank Database, click Browse for a location in which to save your database.
- In the File New Database dialog box, browse to the location where you want to save the project, or accept the default location.
- Type a file name for the project in the File name box.
- In the Save as type list, select Microsoft Office Access Projects (*.adp), and then click OK.
- Under New Project, click Create.
Access prompts you with the following message:
Do you want to connect to an existing SQL Server database?
If you want to connect to an existing SQL Server database, click Yes and continue with step 4; otherwise, click No and skip to step 5 to create a new SQL Server database.
- Connect to an existing SQL Server database
- In the Data Link Properties dialog box, enter the required information for the following:
- Server name
- Information needed to log on to the server
- Database name
- Click Test Connection to verify that the settings are correct and that the connection succeeds.
If the connection does not succeed, the Microsoft Data Link Error dialog box displays a message describing the problem. Click OK to close the message, check your settings in the Data Link Properties dialog box, and then click Test Connection again. Also, you might need to check with the SQL Server database administrator for the database you are connecting to, to make sure your settings are correct or that the computer is available.
- After the Microsoft Data Link dialog box displays the message Test connection succeeded, click OK to close the dialog box, and then click OK to close the Data Link Properties dialog box.
Access connects the project to the SQL Server database.
- Create a new SQL Server database
- On the first page of the Microsoft SQL Server Database Wizard, enter the following information:
- The SQL Server computer you want to use for this database
- Your logon information
- A name for the SQL Server database
Note To skip the connection process at this time, click Cancel. Access creates the project, but it is not connected to a SQL Server database. Before you can do anything with the project, you will need to connect it to a SQL Server database, which you can do by using the steps in the next section.
- Click Next to continue.
Access attempts to connect to the SQL server computer you specified. If Access cannot connect to the SQL server computer, it displays an error message describing the problem. The SQL server computer name or logon information might be incorrect, or you might not have the necessary permissions to create a database on the SQL Server computer that you specified. You might need to check with the SQL Server database administrator for the database you are creating, to make sure your settings are correct or that the computer is available.
- After Access successfully connects to the SQL Server computer, the wizard displays the message: The wizard has all the information it needs to create your SQL Server database. Click Finish to continue.
Access creates the SQL Server database and connects it to the project.
Bring back bill gates, maybe he can revive visual basic.. dead serious microsoft lost my attention when they tried to con everyone into using c# http://m.tomshardware.com/news/Forbes-Steve-Ballmer-CEO-Top-10-Fired,15637.html