3 Answers, 1 is accepted
First of all I want to thank you for your interest to our new product and for the fast and useful feedback.
In order to setup working examples of the telerik Reporting on a client machine we need any version of SQL Server 2005 - not exactly the Express Edition. During the installation process we're looking trough every installed instance of SQL Server 2005 and try to connect to it using the current Windows account credentials. Then we use the 1st successful connection to deploy the sample database.
As you can see, in addition to the possible problems in the installation itself, there are several reasons of the setup of the sample database to fail. We need some time to investigate and eliminate all the possible problems with sample database deployment for the upcoming releases.
Anyway, the easiest (but not the most correct) way to work round this issue now is to install the SQL Server Express Edition. You can download it from Microsoft Web site.
The other way is to manually install and configure the sample database. All the telerik Reporting examples use connection strings against the default SQL Server Express Edition instance name - (local)\sqlexpress. If you use different SQL Server instance you should modify all the connection strings to let the examples work correctly.
You must have a SQL Server instance installed for which you have permissions. If you installed SQL Server 2005 Express, the default instance name is (local)\sqlexpress. All the scripts below are will be executed against this instance. If the target SQL Server instance has different name you should replace sqlexpress with the name of your instance: (local)\[SqlServerInstanceName]. For the default SQL Server instance you should use only (local).
To download AdventureWorksDB.msi:
- Navigate to this download Microsoft Web site. Double-click AdventureWorksDB.msi.
- Click Run and complete the installation wizard. AdventureWorks_Data.mdf and AdventureWorks_Log.ldf are copied to your SQL Server data directory. For SQL Server 2005 Express, the default is c:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\.
To attach AdventureWorksT to your SQL Server:
The telerik Reporting examples are configured to use database named AdventureWorksT.
- Open a Visual Studio 2005 command window. From the Start menu, click All Programs, Microsoft Visual Studio 2005, Visual Studio Tools, Visual Studio 2005 Command Prompt.
- Open a connection to a local SQL Server Express instance by typing or copying the following command into the command line:
SQLCMD -S (local)\sqlexpress -E
- Press Enter.
- At the SQLCMD 1> prompt, call the sp_attach_db stored procedure to attach the AdventureWorksT database in the data directory determined in the previous step. The line below uses the default location for SQL Server 2005 Express. Edit the text as necessary to use the data directory confirmed in the previous steps. Type or copy and paste the following statement into the command window (the statement must not have line breaks).
exec sp_attach_db @dbname=N'AdventureWorksT', @filename1=N'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\AdventureWorks_Data.mdf', @filename2=N'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\AdventureWorks_log.ldf'
- Type go.
- Press ENTER. You may see a series of messages about converting and upgrading the database.
- Type exit to close the command window.
To verify AdventureWorksT is attached:
- Open Visual Studio 2005. You do not need to open a project.
- From the View menu, choose Server Explorer.
- In the Server Explorer window, right-click on Data Connections and choose Add Connection. The Add Connection dialog box opens.
- Confirm Data source is set to Microsoft SQL Server (SqlClient).
- In the Server name textbox, enter (local)\sqlexpress.
- In Log on to the server, choose your method of authentication.
- In Select or enter a database name, expand the list of databases.
- Select AdventureWorksT.
- Click the Test Connection button to confirm that you have connected to AdventureWorksT successfully.
To configure AdventureWorksT to work with Web server controls:
- Open a Visual Studio 2005 command window to run SQLCMD. You will use SQLCMD to grant access to the database and ASP.NET account.
On Windows Server 2003, the ASP.NET process used by the Web server control runs under NT AUTHORITY\NETWORK SERVICE. On other Windows operating systems, the process runs under MACHINENAME\ASPNET.
If you installed SQL Server Express 2005, type or copy the following SQLCMD below to grant login authority to the service. Otherwise, you must specify the SQL Server instance you want to use in place of (local)\sqlexpress.
The following example works for Windows Server 2003 and must have no line breaks.
sqlcmd -E -S (local)\sqlexpress -Q "sp_grantlogin N'NT AUTHORITY\NETWORK SERVICE'"
- To grant access to AdventureWorksT for this service, use the following command with no line breaks.
sqlcmd -E -S (local)\sqlexpress -d AdventureWorksT -Q "sp_grantdbaccess N'NT AUTHORITY\NETWORK SERVICE'"
- To add this service to the owner role account for AdventureWorksT, use the following command with no line breaks.
sqlcmd -E -S (local)\sqlexpress -d AdventureWorksT -Q "sp_addrolemember 'db_owner', N'NT AUTHORITY\NETWORK SERVICE'"
- Close the command window.
At the moment of writing this response we've already discovered a problem with installing the sample database to the default SQL Server instance and we will fix it in the upcoming days.
the telerik team