Solved

MS SQL Server Management Studio R2

Posted on 2013-06-11
8
769 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
 

Author Comment

by:chima
Comment Utility
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
Get up to 2TB FREE CLOUD per backup license!

An exclusive Black Friday offer just for Expert Exchange audience! Buy any of our top-rated backup solutions & get up to 2TB free cloud per system! Perform local & cloud backup in the same step, and restore instantly—anytime, anywhere. Grab this deal now before it disappears!

 
LVL 9

Accepted Solution

by:
MattSQL earned 500 total points
Comment Utility
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
Comment Utility
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
Comment Utility
Yes, no adventure works there. Let me know how the reinstall goes...
0
 

Author Closing Comment

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

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
Skype is a P2P (Peer to Peer) instant messaging and VOIP (Voice over IP) service – as well as a whole lot more.
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

771 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

10 Experts available now in Live!

Get 1:1 Help Now