Thursday, February 16, 2012
can't install SQL Server on a partition other than c:\
My laptop drive is partitioned into c: and e:. I want to install on
e:.
During Install, in Feature Selection, when I click the icon for Client
Components, the Browse button to allow an install path other than c:
\... is disabled, indicating that the shared path has already been
configured).
Can someone tell me
1 - what I installed prior that does not allow me to install the
complete SQL Server on e:?
2 - what must I uninstall and then reinstall, and, in what sequence,
to be able to install on e:?
Thanks in advance for any help.
Larry MehlYou can't install the whole SQL Server related files into your "e:" drive.
Some files are installed to the default path "C:\Program Files\Microsoft SQL
Server...". Generally, you can say "Common components like SSIS, Client
Components etc. will be installed to this default path"
--
Ekrem Önsoy
"mehlREMOVETHIS@.cyvest.com" <mehl@.cyvest.com> wrote in message
news:5581b71e-f6de-4d58-833e-e931a8d5c3b3@.t12g2000prg.googlegroups.com...
> Hello --
> My laptop drive is partitioned into c: and e:. I want to install on
> e:.
> During Install, in Feature Selection, when I click the icon for Client
> Components, the Browse button to allow an install path other than c:
> \... is disabled, indicating that the shared path has already been
> configured).
> Can someone tell me
> 1 - what I installed prior that does not allow me to install the
> complete SQL Server on e:?
> 2 - what must I uninstall and then reinstall, and, in what sequence,
> to be able to install on e:?
> Thanks in advance for any help.
> Larry Mehl
>
>|||Unfortunately, that's one of the fundamentally flawed design choices that SQL
Server seems to be stuck with. It's fundamentally flawed because this forces
the system to store states on the local machine. Not being able to choose an
arbitrary drive is just a minor inconvenience in comparison.
Linchi
"mehlREMOVETHIS@.cyvest.com" wrote:
> Hello --
> My laptop drive is partitioned into c: and e:. I want to install on
> e:.
> During Install, in Feature Selection, when I click the icon for Client
> Components, the Browse button to allow an install path other than c:
> \... is disabled, indicating that the shared path has already been
> configured).
> Can someone tell me
> 1 - what I installed prior that does not allow me to install the
> complete SQL Server on e:?
> 2 - what must I uninstall and then reinstall, and, in what sequence,
> to be able to install on e:?
> Thanks in advance for any help.
> Larry Mehl
>
>|||On May 4, 2:09 am, Ekrem =D6nsoy <ek...@.compecta.com> wrote:
> You can't install the whole SQL Server related files into your "e:" drive.=
> Some files are installed to the default path "C:\Program Files\Microsoft S=QL
> Server...". Generally, you can say "Common components like SSIS, Client
> Components etc. will be installed to this default path"
> --
> Ekrem =D6nsoy
> "mehlREMOVET...@.cyvest.com" <m...@.cyvest.com> wrote in message
> news:5581b71e-f6de-4d58-833e-e931a8d5c3b3@.t12g2000prg.googlegroups.com...
> > Hello --
> > My laptop drive is partitioned into c: and e:. I want to install on
> > e:.
> > During Install, in Feature Selection, when I click the icon for Client
> > Components, the Browse button to allow an install path other than c:
> > \... is disabled, indicating that the shared path has already been
> > configured).
> > Can someone tell me
> > 1 - what I installed prior that does not allow me to install the
> > complete SQL Server on e:?
> > 2 - what must I uninstall and then reinstall, and, in what sequence,
> > to be able to install on e:?
> > Thanks in advance for any help.
> > Larry Mehl
Ekrem --
Thank you.
How do I install "Common components like SSIS, Client Components
etc. ... to the default path" so that I can then install the remaining
part of SQL Server to my "e:" drive?
Do I execute the install process twice ... so that
- I first install the common components (in c:) and
- then install I install the remaining components in e: ?
Is it only the common components that cause this, or was it the
installation of other applications such as .NET, Document Explorer,
2005 Samples, Native Client, Setup Support Files, VSS Writer that
installed into c: and are consequently causing this limitation?
If I must, I will enlarge the c: partition to allow installation of
everything into c: What partition manager do you recommend for this?
I will appreciate any further information.
Larry Mehl|||You can install services and components to different paths at once.
In SQL Server Setup, click Advanced button in Components to Install window.
Click on the item and then click the Browse button to install it to a
different path in the Feature Selection window.
For example you can install Database Engine, Analysis Services, Reporting
Services to a different path, but you can't change the path of Documentation
and Samples or Client Components...
--
Ekrem Önsoy
"mehlREMOVETHIS@.cyvest.com" <mehl@.cyvest.com> wrote in message
news:24957b8a-c6ce-426e-9221-04e844f32777@.t12g2000prg.googlegroups.com...
On May 4, 2:09 am, Ekrem Önsoy <ek...@.compecta.com> wrote:
> You can't install the whole SQL Server related files into your "e:" drive.
> Some files are installed to the default path "C:\Program Files\Microsoft
> SQL
> Server...". Generally, you can say "Common components like SSIS, Client
> Components etc. will be installed to this default path"
> --
> Ekrem Önsoy
> "mehlREMOVET...@.cyvest.com" <m...@.cyvest.com> wrote in message
> news:5581b71e-f6de-4d58-833e-e931a8d5c3b3@.t12g2000prg.googlegroups.com...
> > Hello --
> > My laptop drive is partitioned into c: and e:. I want to install on
> > e:.
> > During Install, in Feature Selection, when I click the icon for Client
> > Components, the Browse button to allow an install path other than c:
> > \... is disabled, indicating that the shared path has already been
> > configured).
> > Can someone tell me
> > 1 - what I installed prior that does not allow me to install the
> > complete SQL Server on e:?
> > 2 - what must I uninstall and then reinstall, and, in what sequence,
> > to be able to install on e:?
> > Thanks in advance for any help.
> > Larry Mehl
Ekrem --
Thank you.
How do I install "Common components like SSIS, Client Components
etc. ... to the default path" so that I can then install the remaining
part of SQL Server to my "e:" drive?
Do I execute the install process twice ... so that
- I first install the common components (in c:) and
- then install I install the remaining components in e: ?
Is it only the common components that cause this, or was it the
installation of other applications such as .NET, Document Explorer,
2005 Samples, Native Client, Setup Support Files, VSS Writer that
installed into c: and are consequently causing this limitation?
If I must, I will enlarge the c: partition to allow installation of
everything into c: What partition manager do you recommend for this?
I will appreciate any further information.
Larry Mehl|||On May 4, 12:04 pm, Ekrem =D6nsoy <ek...@.compecta.com> wrote:
> You can install services and components to different paths at once.
> In SQL Server Setup, click Advanced button in Components to Install window=.
> Click on the item and then click the Browse button to install it to a
> different path in the Feature Selection window.
> For example you can install Database Engine, Analysis Services, Reporting
> Services to a different path, but you can't change the path of Documentati=on
> and Samples or Client Components...
> --
> Ekrem =D6nsoy
> "mehlREMOVET...@.cyvest.com" <m...@.cyvest.com> wrote in message
> news:24957b8a-c6ce-426e-9221-04e844f32777@.t12g2000prg.googlegroups.com...
> On May 4, 2:09 am, Ekrem =D6nsoy <ek...@.compecta.com> wrote:
>
> > You can't install the whole SQL Server related files into your "e:" driv=e.
> > Some files are installed to the default path "C:\Program Files\Microsoft=
> > SQL
> > Server...". Generally, you can say "Common components like SSIS, Client
> > Components etc. will be installed to this default path"
> > --
> > Ekrem =D6nsoy
> > "mehlREMOVET...@.cyvest.com" <m...@.cyvest.com> wrote in message
> >news:5581b71e-f6de-4d58-833e-e931a8d5c3b3@.t12g2000prg.googlegroups.com...=
> > > Hello --
> > > My laptop drive is partitioned into c: and e:. I want to install on
> > > e:.
> > > During Install, in Feature Selection, when I click the icon for Client=
> > > Components, the Browse button to allow an install path other than c:
> > > \... is disabled, indicating that the shared path has already been
> > > configured).
> > > Can someone tell me
> > > 1 - what I installed prior that does not allow me to install the
> > > complete SQL Server on e:?
> > > 2 - what must I uninstall and then reinstall, and, in what sequence,
> > > to be able to install on e:?
> > > Thanks in advance for any help.
> > > Larry Mehl
> Ekrem --
> Thank you.
> How do I install "Common components like SSIS, Client Components
> etc. ... to the default path" so that I can then install the remaining
> part of SQL Server to my "e:" drive?
> Do I execute the install process twice ... so that
> - I first install the common components (in c:) and
> - then install I install the remaining components in e: ?
> Is it only the common components that cause this, or was it the
> installation of other applications such as .NET, Document Explorer,
> 2005 Samples, Native Client, Setup Support Files, VSS Writer that
> installed into c: and are consequently causing this limitation?
> If I must, I will enlarge the c: partition to allow installation of
> everything into c: What partition manager do you recommend for this?
> I will appreciate any further information.
> Larry Mehl
Ekrem --
Thank you for the method.
Linchi -- Thanks for responding. His response seems to conflict with
yours. What do you think?
Larry|||And just to elaborate, some of the components/items are customizable, some
are not.
Also I don't see how Linchi's reply conflicts with anything else that has
been stated in this thread.
On 5/4/08 3:04 PM, in article
6C568227-DB0D-428C-AF70-BD0AC2BE835E@.microsoft.com, "Ekrem Önsoy"
<ekrem@.compecta.com> wrote:
> You can install services and components to different paths at once.
> In SQL Server Setup, click Advanced button in Components to Install window.
> Click on the item and then click the Browse button to install it to a
> different path in the Feature Selection window.
> For example you can install Database Engine, Analysis Services, Reporting
> Services to a different path, but you can't change the path of Documentation
> and Samples or Client Components...|||To be clearer, what is the confliction do you think?
--
Ekrem Önsoy
"mehlREMOVETHIS@.cyvest.com" <mehl@.cyvest.com> wrote in message
news:ef59ea4d-a2e7-4cb1-af9a-8475dc81f80f@.j9g2000prn.googlegroups.com...
On May 4, 12:04 pm, Ekrem Önsoy <ek...@.compecta.com> wrote:
> You can install services and components to different paths at once.
> In SQL Server Setup, click Advanced button in Components to Install
> window.
> Click on the item and then click the Browse button to install it to a
> different path in the Feature Selection window.
> For example you can install Database Engine, Analysis Services, Reporting
> Services to a different path, but you can't change the path of
> Documentation
> and Samples or Client Components...
> --
> Ekrem Önsoy
> "mehlREMOVET...@.cyvest.com" <m...@.cyvest.com> wrote in message
> news:24957b8a-c6ce-426e-9221-04e844f32777@.t12g2000prg.googlegroups.com...
> On May 4, 2:09 am, Ekrem Önsoy <ek...@.compecta.com> wrote:
>
> > You can't install the whole SQL Server related files into your "e:"
> > drive.
> > Some files are installed to the default path "C:\Program Files\Microsoft
> > SQL
> > Server...". Generally, you can say "Common components like SSIS, Client
> > Components etc. will be installed to this default path"
> > --
> > Ekrem Önsoy
> > "mehlREMOVET...@.cyvest.com" <m...@.cyvest.com> wrote in message
> >news:5581b71e-f6de-4d58-833e-e931a8d5c3b3@.t12g2000prg.googlegroups.com...
> > > Hello --
> > > My laptop drive is partitioned into c: and e:. I want to install on
> > > e:.
> > > During Install, in Feature Selection, when I click the icon for Client
> > > Components, the Browse button to allow an install path other than c:
> > > \... is disabled, indicating that the shared path has already been
> > > configured).
> > > Can someone tell me
> > > 1 - what I installed prior that does not allow me to install the
> > > complete SQL Server on e:?
> > > 2 - what must I uninstall and then reinstall, and, in what sequence,
> > > to be able to install on e:?
> > > Thanks in advance for any help.
> > > Larry Mehl
> Ekrem --
> Thank you.
> How do I install "Common components like SSIS, Client Components
> etc. ... to the default path" so that I can then install the remaining
> part of SQL Server to my "e:" drive?
> Do I execute the install process twice ... so that
> - I first install the common components (in c:) and
> - then install I install the remaining components in e: ?
> Is it only the common components that cause this, or was it the
> installation of other applications such as .NET, Document Explorer,
> 2005 Samples, Native Client, Setup Support Files, VSS Writer that
> installed into c: and are consequently causing this limitation?
> If I must, I will enlarge the c: partition to allow installation of
> everything into c: What partition manager do you recommend for this?
> I will appreciate any further information.
> Larry Mehl
Ekrem --
Thank you for the method.
Linchi -- Thanks for responding. His response seems to conflict with
yours. What do you think?
Larry
Friday, February 10, 2012
cant get sqldatasource to return results from a stored procedure
I thought I would impliment a new feature of my web page using stored procedures and the SqlDataSource object, for practice or whatever, since I don't normally use that stuff.
This is the stored procedure:
set ANSI_NULLSONset QUOTED_IDENTIFIERONgo-- =============================================-- Author:Lance Colton-- Create date: 7/31/06-- Description:Find the contest winner-- =============================================ALTER PROCEDURE [dbo].[AppcheckContest]-- Add the parameters for the stored procedure here@.BeginDatedatetime ='1/1/2006', @.EndDatedatetime ='12/31/2006', @.SectionIDint = 10,@.WinnerIDint = 0OUTPUTASBEGIN-- SET NOCOUNT ON added to prevent extra result sets from-- interfering with SELECT statements.SET NOCOUNT ON;-- Insert statements for procedure hereSELECT top 1 @.WinnerID = P.UserIDFROM cs_Posts PWHERE P.PostDateBETWEEN @.BeginDateAND @.EndDateAND P.SectionID = @.SectionIDAND P.UserID <> 2100-- I don't want to win my own contest...AND SettingsID = 1000-- This number could be different if i had more than one CS installed?AND IsApproved = 1ORDER BYNEWID()-- yes this is slow, but it works...RETURN @.WinnerIDEND
It's really simple - just needs to return the one randomly chosen integer userID. I've tested it in query designer or whatever it's called in Management Studio and it works fine there at least.
Thinking I was done the hard part, I created a new web form in visual studio, dropped a SqlDataSource on it, and used the 'configure data source' wizard from the smart tag to do all the work for me. I didn't have any trouble using the wizard to select my stored procedure, and i'm using the sa connection string to simplify my debugging. I tried using the FormParameter / FormField way of getting the output and setting the input parameters. I can't seem to get it working though. There's no errors or anything, just the output isn't coming through.
Here's the code from the aspx codebehind file:
Partial Class Contest Inherits System.Web.UI.Page Protected Sub btnSelectWinner_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSelectWinner.Click Dim stuff As New System.Web.UI.DataSourceSelectArguments SqlDataSource1.Select(stuff) SqlDataSource1.DataBind() lblWinnerID.Text = SqlDataSource1.SelectParameters("WinnerID").ToString End SubEnd ClassAs you can see, I wasn't sure if you're supposed to call databind() or select() to actually get the stored procedure to execute, so I tried both. I was hoping the last line of code there would set the label to the value contained in the @.WinnerID parameter, but instead it sets it to "WinnerID".
Here's the code from the .aspx file. Most of this was generated by the Wizard, but I messed around with it a bit.
<%@. Page Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false" CodeFile="Contest.aspx.vb" Inherits="Contest" title="Untitled Page" %><asp:Content ID="Content1" ContentPlaceHolderID="CPHMain" Runat="Server"> <asp:Button ID="btnSelectWinner" runat="server" Text="Find Winner" /> <asp:Calendar ID="Calendar_From" runat="server"></asp:Calendar> <asp:Calendar ID="Calendar_To" runat="server"></asp:Calendar> <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:appcheck-csConnectionString-sa%>" SelectCommand="AppcheckContest" SelectCommandType="StoredProcedure" CancelSelectOnNullParameter="False"> <SelectParameters> <asp:FormParameter FormField="Calendar_From" Name="BeginDate" Type="DateTime" /> <asp:FormParameter FormField="Calendar_To" Name="EndDate" Type="DateTime" /> <asp:Parameter DefaultValue="10" Name="SectionID" Type="Int32" /> <asp:formParameter FormField="lblWinnerID" defaultvalue="666" Direction="InputOutput" Name="WinnerID" Type="Int32" /> </SelectParameters> </asp:SqlDataSource> <asp:Label ID="lblWinnerID" runat="server" Text="?"></asp:Label></asp:Content>
okay well i gave up on using a sqldatasource since nobody replied.
here's my final working code using an sqlCommand object instead:
PartialClass ContestInherits System.Web.UI.PageProtected Sub btnSelectWinner_Click(ByVal senderAs Object,ByVal eAs System.EventArgs)Handles btnSelectWinner.ClickDim objCommandAs New SqlClient.SqlCommandDim objConnAs New SqlClient.SqlConnectionDim strQueryResultAs New Object objConn.ConnectionString = ConfigurationManager.ConnectionStrings("appcheck-csConnectionString-sa").ConnectionString objCommand.Connection = objConn objCommand.CommandType = CommandType.StoredProcedure objCommand.CommandText ="AppcheckContest"Dim intWinnerIDParamAs New SqlClient.SqlParameter("@.WinnerID", SqlDbType.Int)Dim DateFromParamAs New SqlClient.SqlParameter("@.BeginDate", SqlDbType.DateTime)Dim DateToParamAs New SqlClient.SqlParameter("@.EndDate", SqlDbType.DateTime) intWinnerIDParam.Direction = ParameterDirection.Output DateFromParam.Direction = ParameterDirection.Input DateToParam.Direction = ParameterDirection.Input objCommand.Parameters.Add(intWinnerIDParam) DateFromParam.Value = Calendar_From.SelectedDate DateToParam.Value = Calendar_To.SelectedDate objCommand.Parameters.Add(DateFromParam) objCommand.Parameters.Add(DateToParam) objConn.Open() objCommand.ExecuteScalar() objConn.Close()Try lblWinnerID.Text ="Winner ID: <a target='_blank' href='http://forum.appcheck.net/web/user/Profile.aspx?UserID=" & intWinnerIDParam.Value & "'>" & intWinnerIDParam.Value & "</a>" Catch ex As Exception lblWinnerID.Text = "error"End Try End SubEnd Class <%@. Page Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false" CodeFile="Contest.aspx.vb" Inherits="Contest" title="Untitled Page" %><asp:Content ID="Content1" ContentPlaceHolderID="CPHMain" Runat="Server"> Contest Start Date:<asp:Calendar ID="Calendar_From" runat="server"></asp:Calendar> Contest End Date:<asp:Calendar ID="Calendar_To" runat="server"></asp:Calendar> <asp:Button ID="btnSelectWinner" runat="server" Text="Find Winner" /> <asp:Label ID="lblWinnerID" runat="server" Text="?"></asp:Label></asp:Content>
set ANSI_NULLSONset QUOTED_IDENTIFIERONgo-- =============================================-- Author:Lance Colton-- Create date: 7/31/06-- Description:Find the contest winner-- =============================================ALTER PROCEDURE [dbo].[AppcheckContest] @.BeginDatedatetime, @.EndDatedatetime, @.SectionIDint = 10,@.WinnerIDint = 0OUTPUTASBEGINSET NOCOUNT ON;SELECT top 1 @.WinnerID = P.UserIDFROM cs_Posts PWHERE P.PostDateBETWEEN @.BeginDateAND @.EndDateAND P.SectionID = @.SectionIDAND P.UserID <> 2100-- I don't want to win my own contest...AND SettingsID = 1000-- This number could be different if i had more than one CS installed?AND IsApproved = 1ORDER BYNEWID()-- yes this is slow, but it works...END|||Hi,
I've had a similar issue for the last few days.
I only found 1 page that helped me solve it:
http://dotnetjunkies.com/QuickStartv20/util/srcview.aspx?path=~/aspnet/samples/data/RetValAndOutputParamsInsert.src
I hope this helps you.|||Cheers
Luke
The above posters link is correct. The output/return value parameters are only available during the "ED" events (Inserted/Updated/Deleted). So if you want them, you have to capture them during that event.
And just a FYI - NewID isn't random, not even close. Google a better random method, which usually involves taking the last 32 bits of newid and feeding it into the rand function.