Monday, March 19, 2012
How can you enable remote connections using TSQL?
Seems there would also be a way to configure it using a TSQL command/procedure call.
thanks,
- Paul -
You can use sp_configure to enable the features exposed by Surface Area Configuration tool. To see the options, run following first:
exec sp_configure 'show advanced options', 1;
reconfigure with override;
Please take a look at topic below in Books Online for more details.
ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/scsql9/html/f741169c-1453-4ad2-830b-bf2be27d712f.htm
For remote connections, you have to use SMO to do it. Doing it from TSQL directly is not possible since it requires manipulation of registry values and please don't use the undocumented XPs for registry manipulation.
Wednesday, March 7, 2012
How can I use Sql Express instead of Sql Server 2005 for asp.net providers
Hi all,
Since I activated the aspnet_regsql.exe tool, it has been a bad day - here's why:
Originally I installed VS2005 Pro (without Sql Express) and then Sql Server 2005 Dev. I then started to learn asp.net from the ".NET FRAMEWORK 2.0 Web-Based client Development" Training kit from Micorsoft. I have compiled and run every exercise up till Chapter 9 lesson 2 exercise 1, without the need to start the Sql Server 2005. In exercise 2 I should learn about asp.net profilers and the exercise showed me to use the aspnet_regsql.exe tool if I was using Sql Server 2005 - and so I did, and exercise 2 worked fine after a couple of adjustment in the connection string, because it was configured to use the SQLEXPRESS server by default.
However - in Chapter 9 lesson 3, I should not use asp.net providers, so I shut down the Sql Server 2005, because I don't have that much memory to spend. Now the trouble comes - every website I have made afterwards require that the Sql Server 2005 is running or else I get some errors.
How can I get back to the way it was before I activated the aspnet_regsql.exe, so I don't have to have the Sql Server 2005 running every time I want to make a website using aspx?
Thanks in advance
From your description, it sounds like you need to change the connection strings to use the SQL Express instance instead of the SQL Developer instance.|||My connection string in both the machine.config and web.config, located in <Win dir>\Microsoft.NET\Framework\v2.0.50727\CONFIG, looks like this:
<connectionStrings>
<add name="LocalSqlServer" connectionString="data source=.\SQLEXPRESS;
Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;UserInstance=true"
providerName="System.Data.SqlClient" />
</connectionStrings>
And I do not use an web.config at the website level.
I have also tried to reverse the action done by aspnet_regsql, by selecting the "Remove application services information from an existing database" option when starting aspnet_regsql.exe. Then detaching the aspnetdb database in Sql Server 2005 and deleted the aspnetdb files (mdb and log files) from Sql Server 2005 - all with out luck.
Friday, February 24, 2012
How can I use MDX functions in SQL Query Analyzer (Client Tool)
DBMA to speak of. Thus, I'm a bit on my own - except for you helpful
people...
I just installed the Client Tools on my workstation and tried a simple query:
SELECT IIf(TBL.fld is NULL, "-N/A-", TBL.fld) FROM TBL;
and get the following error message:
Server: Msg 156, Level 15, State 1, Line 1
Incorrect syntax near the keyword 'is'.
According to the help files, this should work, but clearly not. Is there
something(s) I need to enable, install, configure, tweek, activate, cajole,
or otherwise beg into acquiesence?
See reply in microsoft.public.sqlserver.setup
HTH
Jasper Smith (SQL Server MVP)
http://www.sqldbatips.com
I support PASS - the definitive, global
community for SQL Server professionals -
http://www.sqlpass.org
"slintz" <slintz@.discussions.microsoft.com> wrote in message
news:A2D102C1-1023-413A-94D3-B82440DB08EC@.microsoft.com...
> I'm very new to using MS-SQL stuffs and the IT dept here doesn't have any
> DBMA to speak of. Thus, I'm a bit on my own - except for you helpful
> people...
> I just installed the Client Tools on my workstation and tried a simple
> query:
> SELECT IIf(TBL.fld is NULL, "-N/A-", TBL.fld) FROM TBL;
> and get the following error message:
> Server: Msg 156, Level 15, State 1, Line 1
> Incorrect syntax near the keyword 'is'.
>
> According to the help files, this should work, but clearly not. Is there
> something(s) I need to enable, install, configure, tweek, activate,
> cajole,
> or otherwise beg into acquiesence?
>