Solved

MS SQL Server Management Studio R2

Posted on 2013-06-11
8
780 Views
Last Modified: 2013-12-13
Hello,
See/read questions marked with >>>> below;
I have googled for a solution on this, yet have not found a solution.  I have installed; MS SQL Sever Management Studio: SQL Server 2008 R2.  With it, it uses the AdventureWorksDW2008R2 samples from ;
C:\Program Files\Microsoft SQL Server\100\Samples\AdventureWorksDW2008R2

The instructions mention to set the PATH Environment variable;
Before you compile Microsoft .NET Framework common language runtime (CLR) samples for SQL Server, verify that the path of the version of the .NET Framework compiler is the first Framework directory in the PATH environment variable. The location of the compiler that is shipped with this release of SQL Server is C:\<Windows root directory>\Microsoft.NET\Framework\v2.0.x. Drive C is the installation drive, <Windows root directory> is either Windows or WINNT, and x is five digits.

This is where I am at now.  I learned that I have do download; AdventureWorks 2008R2 OLTP,
which I did and ran/executed; instawdb
The Studio then showed the content of the file, see attachment.  From this script I have these questions now;
>>> When I was installing the studio, I believe I saw the selection for this, but can't remember if I selected it.  Is there a way of checking whether this is enabled without going over the installation again?
-- Be sure to enable FULL TEXT SEARCH before running this script


I now know that I have to do this;
Create a full-text catalog.
>>> How does one create a "full text catalog?"


On each table that you want to search, create a full-text index by:

Identify each text columns that you want to include in the full-text index.



-->> WARNING: THIS SCRIPT MUST BE RUN IN SQLCMD MODE INSIDE SQL SERVER MANAGEMENT STUDIO. <<--
:on error exit

-- IMPORTANT
/*
 * In order to run this script manually, either set the environment variables,
 * or uncomment the setvar statements and provide the necessary values if
 * the defaults are not correct for your installation.
 */
0
Comment
Question by:chima
  • 4
  • 4
8 Comments
 
LVL 9

Expert Comment

by:MattSQL
ID: 39239880
Not entirely sure I have you questions understood but.

SELECT FULLTEXTSERVICEPROPERTY('IsFullTextInstalled')

This will return 1 if full text is installed or 0 if not.

Creating a full text catalog:

http://msdn.microsoft.com/en-us/library/ms189520(v=sql.90).aspx
http://technet.microsoft.com/en-us/library/bb326035(v=sql.90).aspx
0
 

Author Comment

by:chima
ID: 39241658
MattSQL, I apologize for making the question confusing.  I was troubleshooting the problem and reporting/writing what I found, as I found it.
You got the answer correct, thanks.  I did get a "1" back.  

There is a script that loads into the studio pane, which has the setvar setting, which I was trying to execute separately.  When I ran the script with the setvar, I got this back;
Command(s) completed successfully.

After successfully executing the script, my thought was/is that the AdventureWorksDW2008R2_Data and possibly the _Log databases would show up on the "Registered Databases," but they did not, even with a refresh.  All I see is this;
Expected Registered database
I manually added the SQLEXPRESS.  My goal is to get to the AdventureWorksDW2008R2 samples.  Any suggestions?





Void all these!
Using the same method, as the Select query, I tried executing this;
setvar SqlSamplesSourceDataPath "C:\Program Files\Microsoft SQL Server\100\Tools\Samples\"

and got an error.

Then tried;
setvar SqlSamplesDatabasePath   "C:\Program Files\Microsoft SQL Server\100\Samples\AdventureWorksDW2008R2"

and got an error;
Msg 102, Level 15, State 1, Line 1
Incorrect syntax near 'C:\Program Files\Microsoft SQL Server\100\Samples\AdventureWorksDW2008R2'.

At this folder I have these databases;
AdventureWorksDW2008R2_Data
AdventureWorksDW2008R2_Log

I got these "setvar" from the instructions, which states;
--:setvar SqlSamplesDatabasePath   "C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\"

--:setvar SqlSamplesSourceDataPath "C:\Program Files\Microsoft SQL Server\100\Tools\Samples\"

Msg 102, Level 15, State 1, Line 1
Incorrect syntax near 'C:\Program Files\Microsoft SQL Server\100\Tools\Samples\'.

Questions;
Am I executing the "setvar" in the right place (the center pane on the SQL Management Studio)?  I would say YES, because I do get those errors back.

I do not think that the "spaces" in the path are the cause for the error, because the installation created those paths (except the AdventureWorksDW2008R2 folder.

I did try;
setvar SqlSamplesDatabasePath   "C:\Program Files\Microsoft SQL Server\100\Samples\AdventureWorksDW2008R2\AdventureWorksDW2008R2_Data\"

And got;
Msg 102, Level 15, State 1, Line 1
Incorrect syntax near 'C:\Program Files\Microsoft SQL Server\100\Samples\AdventureWorksDW2008R2\AdventureWorksDW2008R2_Data\'.
0
 
LVL 9

Expert Comment

by:MattSQL
ID: 39242702
You need to run those scripts in SQL CMD mode. You are in the right place but you need to go to the query menu and select SQL CMD mode. Then the setvar syntax will work.

The screen shot above is from the registered servers pane - you won't see databases in there. You need to go to View menu and select object explorer.
0
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 

Author Comment

by:chima
ID: 39246138
MattSQL, I had executed the script and it was successful.  I looked at the "Object Explorer" but do not see any information/data that might be associated with the AdventureWorksDW2008R2 samples.  Of course I do not know what should be there.  I looked for the words Adventure Works.
Might you know whether the "object explorer" folders have the Adventure Works wording, in order to know whether the samples loaded correctly, if any?
0
 
LVL 9

Accepted Solution

by:
MattSQL earned 500 total points
ID: 39258316
In object explorer open the databases node - you should see the AdventureWorks database(s) there. Alternatively open a query window and run:

select name from sys.databases
0
 

Author Comment

by:chima
ID: 39261327
MattSQL, yeah I should but it is not there.  I found a link which describes how to install it.  I guess I will have to redo the installation.
This is what I got;
master
tempdb
model
msdb
ReportServer$SQLEXPRESS
ReportServer$SQLEXPRESSTempDB
0
 
LVL 9

Expert Comment

by:MattSQL
ID: 39261341
Yes, no adventure works there. Let me know how the reinstall goes...
0
 

Author Closing Comment

by:chima
ID: 39273607
I have not had time to try it, but I will.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
The article will include the best Data Recovery Tools along with their Features, Capabilities, and their Download Links. Hope you’ll enjoy it and will choose the one as required by you.
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Viewers will learn how the fundamental information of how to create a table.

815 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now