SQL
SQL
Definitions:
SQL Server Management Studio Used to manage the SQL Server, create
databases, display data, setup views
SQL Instance A database server that does not share its system and user databases
with other servers running on the same computer. To create a new instance for SQL
server you just re-run the SQL installation. When creating a connection to a SQL
server specify the server name\Instance name.
SQL Installation:
Note:
From the Site Edition installation media navigate to the Redist\SQLServer2008 and
select an installation of SQL Server. (See above for an explanation of the installation
files).
The installation will start up:
Select OK.
Select Next.
Select Install
Select Next.
Depending on the installation run and what you currently have installed you may
get the screen above or the following screen. In the screen above there is no option
to install the Management tools. This is usually the case when running the
installation from the batch file or from the SQLEXPR_x86_ENU.exe. Check Database
Engine Services and Next. If you have the display below check Database Engine
Services and the Management Tools Basic then select Next.
The display above will be seen if the SQL installation was run from
SQLEXPRWT_x86_ENU.exe. In this case check Database Engine Services and the
Management Tools Basic then select Next.
Enter a name for this Instance of SQL server. This instance name will be used
along with the server name when creating a connection to the SQL server.
Remember to connect to the SQL server for logging data use the Windows
Computer name\Instance name. If there are any other Instances installed they
should be listed in the Installed instances box.
Select Mixed Mode for the Windows Authentication Mode and enter a password. This
password is for the built-in sa account for this Instance of SQL. If you want to add
the current user performing the installation then select Add Current User. This is
recommended in case the sa account password is forgotten. The current user can
always be removed later.
Select Next.
Select Next.
Select Install.
Select Next.
You see the status of the Services and the Instance name in parenthesis.
Remember to connect to the SQL server for logging data use the Windows
Computer name\Instance name.
Connecting to the SQL Server Remotely
If you plan on accessing the SQL server remotely you will need to enable the TCP/IP
protocol. You may also need to enable the SQL Server Browser. Set this service to
start Automatically.
Check that the SQL server will allow remote connections. From the SQL
Management right click on your SQL server and select Properties Connections.
Make sure Allow remote connections to this server is checked.
Make sure the Firewall is configured. The following Microsoft articles explain how to
open up the firewall or you can just disable it.
http://support.microsoft.com/kb/914277 (SQL 2005)
http://msdn.microsoft.com/en-us/library/cc646023.aspx (SQL 2012)
http://blogs.msdn.com/b/walzenbach/archive/2010/04/14/how-to-enable-remoteconnections-in-sql-server-2008.aspx (SQL 2008)
5. Enter the Database user name. If the defaults were used during the
installation use the sa account.
6. Enter the password for the user that was entered.
7. Enter a database name. It will be created if it does not exist. If the user name
and password are correct from the above steps then before you enter the
database name you can select the box to the right with the three periods and
you should be able to browse the existing databases.
Configure RSLinx Enterprise or the Tag Alarm and Event Server to log to
SQL
1. Right click on RSLinx Enterprise and select Properties Alarm and Events
2. Make sure Enable Alarm and Event support is checked and also check the box
to Enable history under the Alarm and Event History section.
3. Select the database definition in the drop down box.
4. For the Tag Alarm and Event server right click on it and select Priorities and
History. Then check the appropriate check boxes.
Problems with Database user name and password
1. Start the SQL Management Studio and connect to your SQL server name and
instance.
2. Expand Security Logins.
3. Bring up the properties for the sa account (or the account you want to use).
4. You can change the password here. Also chck the Status of the account to
make sure it is Enabled and not locked out and Permission to connect is set to
Grant.
Solution:
Delete/rename the following folder and it should work.
C:/Program Files (x86)/Microsoft SQL Server/100/Setup Bootstrap/SQLServer2008R2/
Problem:
Do not log to the SQL server Master Database.
The following is from Microsoft :
The master database records all the system-level information for a SQL Server system.
This includes instance-wide metadata such as logon accounts, endpoints, linked servers, and
system configuration settings. In SQL Server, system objects are no longer stored in
the master database; instead, they are stored in the Resource database. Also, master is
the database that records the existence of all other databases and the location of those
database files and records the initialization information for SQL Server. Therefore, SQL
Server cannot start if the master database is unavailable.