Monday, March 12, 2012
Is SQL Native Client required on a client machine?
features in SQL Server 2005. What if I just want to access SQL Server 2005
but don't use any new feature, can I not install it onto client machine and
just use SQL Server driver comes with ODBC?Hi
MDAC 2.6 and later is supported if you are not using any new features.
IMHO, it would be best to be on MDAC 2.8
Regards
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"Peter" <Peter@.discussions.microsoft.com> wrote in message
news:B420C925-C42C-4DE3-A5E6-B337637B7BB3@.microsoft.com...
> If I understand correctly, SQL Native Client must be used to access the
> new
> features in SQL Server 2005. What if I just want to access SQL Server
> 2005
> but don't use any new feature, can I not install it onto client machine
> and
> just use SQL Server driver comes with ODBC?
>
Is SQL Native Client required on a client machine?
features in SQL Server 2005. What if I just want to access SQL Server 2005
but don't use any new feature, can I not install it onto client machine and
just use SQL Server driver comes with ODBC?
Hi
MDAC 2.6 and later is supported if you are not using any new features.
IMHO, it would be best to be on MDAC 2.8
Regards
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"Peter" <Peter@.discussions.microsoft.com> wrote in message
news:B420C925-C42C-4DE3-A5E6-B337637B7BB3@.microsoft.com...
> If I understand correctly, SQL Native Client must be used to access the
> new
> features in SQL Server 2005. What if I just want to access SQL Server
> 2005
> but don't use any new feature, can I not install it onto client machine
> and
> just use SQL Server driver comes with ODBC?
>
Friday, March 9, 2012
Is SQL Express required...
Does SQL Express 2005 have to be installed for SQL Developer 2005 to work correctly in VB 2005 Pro?
Thank you,
David
Nope, SQL Express and SQL Developer are just two different editions of SQL Server 2005. You can have either one for your VB install to connect to.
Thanks,
Sam Lester (MSFT)
Monday, February 20, 2012
is my sql server 2005 installed correctly?
a Vista business system. problem is I am getting a "no server
connection" message in MS sql server mgmt studio and config manager.
do I have to start the server? How do I do that?
I selected the options to install the northwind database. Where do I
find it?
greatness would be if I could get a TSQL command line prompt. also, I
want to connect to this sql server from my development PC.
thanks,
-SteveHi Steve
"Steve Richter" wrote:
> I installed sql server 2005 enterprise from my MSDN subscription onto
> a Vista business system. problem is I am getting a "no server
> connection" message in MS sql server mgmt studio and config manager.
> do I have to start the server? How do I do that?
> I selected the options to install the northwind database. Where do I
> find it?
> greatness would be if I could get a TSQL command line prompt. also, I
> want to connect to this sql server from my development PC.
> thanks,
> -Steve
>
You require SP2 for SQL Server to work on windows vista. Check the readme
file for additional information required for setting up vista.
You can check the combination of SQL Server and OS at
http://msdn2.microsoft.com/en-us/library/ms143506.aspx
The SQL Server configuration manager tool will show which services are
installed and allow you to stop/start the services.
You may also want to check the setup log files see
http://msdn2.microsoft.com/en-us/library/ms144287.aspx
John|||On Mar 15, 5:28 am, John Bell <jbellnewspo...@.hotmail.com> wrote:
> Hi Steve
>
>
> "Steve Richter" wrote:
> > I installed sql server 2005 enterprise from my MSDN subscription onto
> > a Vista business system. problem is I am getting a "no server
> > connection" message in MS sql server mgmt studio and config manager.
> > do I have to start the server? How do I do that?
> > I selected the options to install the northwind database. Where do I
> > find it?
> > greatness would be if I could get a TSQL command line prompt. also, I
> > want to connect to this sql server from my development PC.
> > thanks,
> > -Steve
> You require SP2 for SQL Server to work on windows vista. Check the readme
> file for additional information required for setting up vista.
> You can check the combination of SQL Server and OS athttp://msdn2.microsoft.com/en-us/library/ms143506.aspx
> The SQL Server configuration manager tool will show which services are
> installed and allow you to stop/start the services.
> You may also want to check the setup log files seehttp://msdn2.microsoft.com/en-us/library/ms144287.aspx
> John- Hide quoted text -
> - Show quoted text -
thanks. I checked the summary.txt file. It says my PC does not meet
the hardware requirements of sql server. ( it has 512 meg of
memory ).
Is there any way to run sql server w/less than 1 gig of memory?
Microsoft SQL Server 2005 9.00.1399.06
==============================OS Version : Professional (Build 6000)
Time : Sun Mar 11 15:04:51 2007
VISTA2_PC : The current system does not meet the minimum hardware
requirements for this SQL Server release. For system requirements, see
Hardware and Software Requirements, in the readme file or in SQL
Server Books Online.
VISTA2_PC : The current system does not meet minimum hardware
requirements for this SQL Server release. For detailed hardware
requirements, see the readme file or SQL Server Books Online.
VISTA2_PC : Microsoft Internet Information Services (IIS) is either
not installed or is disabled. IIS is required by some SQL Server
features. Without IIS, some SQL Server features will not be available
for installation. To install all SQL Server features, install IIS from
Add or Remove Programs in Control Panel or enable the IIS service
through the Control Panel if it is already installed, and then run SQL
Server Setup again. For a list of features that depend on IIS, see
Features Supported by Editions of SQL Server in Books Online.
Machine : VISTA2_PC
Product : Microsoft SQL Server Setup Support Files (English)
Product Version : 9.00.1399.06
Install : Successful
Log File : C:\Program Files\Microsoft SQL Server\90\Setup
Bootstrap\LOG\Files\SQLSetup0001_VISTA2_PC_SQLSupport_1.log
----
Machine : VISTA2_PC
Product : Microsoft SQL Server Native Client
Product Version : 9.00.1399.06
Install : Successful
Log File : C:\Program Files\Microsoft SQL Server\90\Setup
Bootstrap\LOG\Files\SQLSetup0001_VISTA2_PC_SQLNCLI_1.log
----
Machine : VISTA2_PC
Product : Microsoft Visual Studio 2005 Premier Partner Edition
- ENU
Product Version : 8.0.50727.42
Install : Successful
Log File : C:\Program Files\Microsoft SQL Server\90\Setup
Bootstrap\LOG\Files\SQLSetup0001_VISTA2_PC_PPESku_1.log
----
Machine : VISTA2_PC
Product : Microsoft Office 2003 Web Components
Product Version : 11.0.6558.0
Install : Successful
Log File : C:\Program Files\Microsoft SQL Server\90\Setup
Bootstrap\LOG\Files\SQLSetup0001_VISTA2_PC_OWC11_1.log
----
Machine : VISTA2_PC
Product : Microsoft SQL Server 2005 Books Online (English)
Product Version : 9.00.1399.06
Install : Successful
Log File : C:\Program Files\Microsoft SQL Server\90\Setup
Bootstrap\LOG\Files\SQLSetup0001_VISTA2_PC_BOL_1.log
----
Machine : VISTA2_PC
Product : Microsoft SQL Server 2005 Backward compatibility
Product Version : 8.05.1054
Install : Successful
Log File : C:\Program Files\Microsoft SQL Server\90\Setup
Bootstrap\LOG\Files\SQLSetup0001_VISTA2_PC_BackwardsCompat_1.log
----
Machine : VISTA2_PC
Product : SQLXML4
Product Version : 9.00.1399.06
Install : Successful
Log File : C:\Program Files\Microsoft SQL Server\90\Setup
Bootstrap\LOG\Files\SQLSetup0001_VISTA2_PC_SQLXML4_1.log
----
Machine : VISTA2_PC
Product : Microsoft SQL Server 2005 Tools
Product Version : 9.00.1399.06
Install : Successful
Log File : C:\Program Files\Microsoft SQL Server\90\Setup
Bootstrap\LOG\Files\SQLSetup0001_VISTA2_PC_Tools.log
----
Setup succeeded with the installation, inspect the log file
completely for status on all the components.
Time : Sun Mar 11 23:10:41 2007|||Hi Steve
"Steve Richter" wrote:
> thanks. I checked the summary.txt file. It says my PC does not meet
> the hardware requirements of sql server. ( it has 512 meg of
> memory ).
> Is there any way to run sql server w/less than 1 gig of memory?
>
According to http://msdn2.microsoft.com/en-us/library/ms143506.aspx 512Mb is
the minimum hardware requirement, I assume that not all of it is available
e.g onboard graphics? This requirement will not stop setup, therefore it may
be something else such as processor (which does stop the install) as there
are two failures for the H/W requirements.
John|||On Mar 15, 11:42 am, John Bell <jbellnewspo...@.hotmail.com> wrote:
> Hi Steve
> "Steve Richter" wrote:
> > thanks. I checked the summary.txt file. It says my PC does not meet
> > the hardware requirements of sql server. ( it has 512 meg of
> > memory ).
> > Is there any way to run sql server w/less than 1 gig of memory?
> According tohttp://msdn2.microsoft.com/en-us/library/ms143506.aspx512Mb is
> the minimum hardware requirement, I assume that not all of it is available
> e.g onboard graphics? This requirement will not stop setup, therefore it may
> be something else such as processor (which does stop the install) as there
> are two failures for the H/W requirements.
> John
my pc reports 511MB of memory. ;)
I called MSFT support and they say sql server 2005 enterprise does not
run on Vista.
just trying to mimic a production envirornment. at this point I am
concluding I have to install more memory and install windows server
2003.
-Steve|||Hi Steve
"Steve Richter" wrote:
> On Mar 15, 11:42 am, John Bell <jbellnewspo...@.hotmail.com> wrote:
> > Hi Steve
> >
> > "Steve Richter" wrote:
> > > thanks. I checked the summary.txt file. It says my PC does not meet
> > > the hardware requirements of sql server. ( it has 512 meg of
> > > memory ).
> >
> > > Is there any way to run sql server w/less than 1 gig of memory?
> >
> > According tohttp://msdn2.microsoft.com/en-us/library/ms143506.aspx512Mb is
> > the minimum hardware requirement, I assume that not all of it is available
> > e.g onboard graphics? This requirement will not stop setup, therefore it may
> > be something else such as processor (which does stop the install) as there
> > are two failures for the H/W requirements.
> >
> > John
> my pc reports 511MB of memory. ;)
> I called MSFT support and they say sql server 2005 enterprise does not
> run on Vista.
http://msdn2.microsoft.com/en-us/library/ms143506.aspx says 32 bit on 32 bit
for ultimate and above is a valid combination, one must be wrong!
> just trying to mimic a production envirornment. at this point I am
> concluding I have to install more memory and install windows server
> 2003.
If you wish to mimic the environment then having the same OS is important!
Otherwise you could have used developer edition!
> -Steve
John
is my sql server 2005 installed correctly?
a Vista business system. problem is I am getting a "no server
connection" message in MS sql server mgmt studio and config manager.
do I have to start the server? How do I do that?
I selected the options to install the northwind database. Where do I
find it?
greatness would be if I could get a TSQL command line prompt. also, I
want to connect to this sql server from my development PC.
thanks,
-Steve
Hi Steve
"Steve Richter" wrote:
> I installed sql server 2005 enterprise from my MSDN subscription onto
> a Vista business system. problem is I am getting a "no server
> connection" message in MS sql server mgmt studio and config manager.
> do I have to start the server? How do I do that?
> I selected the options to install the northwind database. Where do I
> find it?
> greatness would be if I could get a TSQL command line prompt. also, I
> want to connect to this sql server from my development PC.
> thanks,
> -Steve
>
You require SP2 for SQL Server to work on windows vista. Check the readme
file for additional information required for setting up vista.
You can check the combination of SQL Server and OS at
http://msdn2.microsoft.com/en-us/library/ms143506.aspx
The SQL Server configuration manager tool will show which services are
installed and allow you to stop/start the services.
You may also want to check the setup log files see
http://msdn2.microsoft.com/en-us/library/ms144287.aspx
John
|||On Mar 15, 5:28 am, John Bell <jbellnewspo...@.hotmail.com> wrote:
> Hi Steve
>
>
> "Steve Richter" wrote:
>
>
>
> You require SP2 for SQL Server to work on windows vista. Check the readme
> file for additional information required for setting up vista.
> You can check the combination of SQL Server and OS athttp://msdn2.microsoft.com/en-us/library/ms143506.aspx
> The SQL Server configuration manager tool will show which services are
> installed and allow you to stop/start the services.
> You may also want to check the setup log files seehttp://msdn2.microsoft.com/en-us/library/ms144287.aspx
> John- Hide quoted text -
> - Show quoted text -
thanks. I checked the summary.txt file. It says my PC does not meet
the hardware requirements of sql server. ( it has 512 meg of
memory ).
Is there any way to run sql server w/less than 1 gig of memory?
Microsoft SQL Server 2005 9.00.1399.06
==============================
OS Version : Professional (Build 6000)
Time : Sun Mar 11 15:04:51 2007
VISTA2_PC : The current system does not meet the minimum hardware
requirements for this SQL Server release. For system requirements, see
Hardware and Software Requirements, in the readme file or in SQL
Server Books Online.
VISTA2_PC : The current system does not meet minimum hardware
requirements for this SQL Server release. For detailed hardware
requirements, see the readme file or SQL Server Books Online.
VISTA2_PC : Microsoft Internet Information Services (IIS) is either
not installed or is disabled. IIS is required by some SQL Server
features. Without IIS, some SQL Server features will not be available
for installation. To install all SQL Server features, install IIS from
Add or Remove Programs in Control Panel or enable the IIS service
through the Control Panel if it is already installed, and then run SQL
Server Setup again. For a list of features that depend on IIS, see
Features Supported by Editions of SQL Server in Books Online.
Machine : VISTA2_PC
Product : Microsoft SQL Server Setup Support Files (English)
Product Version : 9.00.1399.06
Install : Successful
Log File : C:\Program Files\Microsoft SQL Server\90\Setup
Bootstrap\LOG\Files\SQLSetup0001_VISTA2_PC_SQLSupp ort_1.log
Machine : VISTA2_PC
Product : Microsoft SQL Server Native Client
Product Version : 9.00.1399.06
Install : Successful
Log File : C:\Program Files\Microsoft SQL Server\90\Setup
Bootstrap\LOG\Files\SQLSetup0001_VISTA2_PC_SQLNCLI _1.log
Machine : VISTA2_PC
Product : Microsoft Visual Studio 2005 Premier Partner Edition
- ENU
Product Version : 8.0.50727.42
Install : Successful
Log File : C:\Program Files\Microsoft SQL Server\90\Setup
Bootstrap\LOG\Files\SQLSetup0001_VISTA2_PC_PPESku_ 1.log
Machine : VISTA2_PC
Product : Microsoft Office 2003 Web Components
Product Version : 11.0.6558.0
Install : Successful
Log File : C:\Program Files\Microsoft SQL Server\90\Setup
Bootstrap\LOG\Files\SQLSetup0001_VISTA2_PC_OWC11_1 .log
Machine : VISTA2_PC
Product : Microsoft SQL Server 2005 Books Online (English)
Product Version : 9.00.1399.06
Install : Successful
Log File : C:\Program Files\Microsoft SQL Server\90\Setup
Bootstrap\LOG\Files\SQLSetup0001_VISTA2_PC_BOL_1.l og
Machine : VISTA2_PC
Product : Microsoft SQL Server 2005 Backward compatibility
Product Version : 8.05.1054
Install : Successful
Log File : C:\Program Files\Microsoft SQL Server\90\Setup
Bootstrap\LOG\Files\SQLSetup0001_VISTA2_PC_Backwar dsCompat_1.log
Machine : VISTA2_PC
Product : SQLXML4
Product Version : 9.00.1399.06
Install : Successful
Log File : C:\Program Files\Microsoft SQL Server\90\Setup
Bootstrap\LOG\Files\SQLSetup0001_VISTA2_PC_SQLXML4 _1.log
Machine : VISTA2_PC
Product : Microsoft SQL Server 2005 Tools
Product Version : 9.00.1399.06
Install : Successful
Log File : C:\Program Files\Microsoft SQL Server\90\Setup
Bootstrap\LOG\Files\SQLSetup0001_VISTA2_PC_Tools.l og
Setup succeeded with the installation, inspect the log file
completely for status on all the components.
Time : Sun Mar 11 23:10:41 2007
|||Hi Steve
"Steve Richter" wrote:
> thanks. I checked the summary.txt file. It says my PC does not meet
> the hardware requirements of sql server. ( it has 512 meg of
> memory ).
> Is there any way to run sql server w/less than 1 gig of memory?
>
According to http://msdn2.microsoft.com/en-us/library/ms143506.aspx 512Mb is
the minimum hardware requirement, I assume that not all of it is available
e.g onboard graphics? This requirement will not stop setup, therefore it may
be something else such as processor (which does stop the install) as there
are two failures for the H/W requirements.
John
|||On Mar 15, 11:42 am, John Bell <jbellnewspo...@.hotmail.com> wrote:
> Hi Steve
> "Steve Richter" wrote:
>
> According tohttp://msdn2.microsoft.com/en-us/library/ms143506.aspx512Mb is
> the minimum hardware requirement, I assume that not all of it is available
> e.g onboard graphics? This requirement will not stop setup, therefore it may
> be something else such as processor (which does stop the install) as there
> are two failures for the H/W requirements.
> John
my pc reports 511MB of memory. ;)
I called MSFT support and they say sql server 2005 enterprise does not
run on Vista.
just trying to mimic a production envirornment. at this point I am
concluding I have to install more memory and install windows server
2003.
-Steve
|||Hi Steve
"Steve Richter" wrote:
> On Mar 15, 11:42 am, John Bell <jbellnewspo...@.hotmail.com> wrote:
> my pc reports 511MB of memory. ;)
> I called MSFT support and they say sql server 2005 enterprise does not
> run on Vista.
http://msdn2.microsoft.com/en-us/library/ms143506.aspx says 32 bit on 32 bit
for ultimate and above is a valid combination, one must be wrong!
> just trying to mimic a production envirornment. at this point I am
> concluding I have to install more memory and install windows server
> 2003.
If you wish to mimic the environment then having the same OS is important!
Otherwise you could have used developer edition!
> -Steve
John
is my sql server 2005 installed correctly?
a Vista business system. problem is I am getting a "no server
connection" message in MS sql server mgmt studio and config manager.
do I have to start the server? How do I do that?
I selected the options to install the northwind database. Where do I
find it?
greatness would be if I could get a TSQL command line prompt. also, I
want to connect to this sql server from my development PC.
thanks,
-SteveHi Steve
"Steve Richter" wrote:
> I installed sql server 2005 enterprise from my MSDN subscription onto
> a Vista business system. problem is I am getting a "no server
> connection" message in MS sql server mgmt studio and config manager.
> do I have to start the server? How do I do that?
> I selected the options to install the northwind database. Where do I
> find it?
> greatness would be if I could get a TSQL command line prompt. also, I
> want to connect to this sql server from my development PC.
> thanks,
> -Steve
>
You require SP2 for SQL Server to work on windows vista. Check the readme
file for additional information required for setting up vista.
You can check the combination of SQL Server and OS at
http://msdn2.microsoft.com/en-us/library/ms143506.aspx
The SQL Server configuration manager tool will show which services are
installed and allow you to stop/start the services.
You may also want to check the setup log files see
http://msdn2.microsoft.com/en-us/library/ms144287.aspx
John|||On Mar 15, 5:28 am, John Bell <jbellnewspo...@.hotmail.com> wrote:
> Hi Steve
>
>
> "Steve Richter" wrote:
>
>
>
>
>
> You require SP2 for SQL Server to work on windows vista. Check the readme
> file for additional information required for setting up vista.
> You can check the combination of SQL Server and OS athttp://msdn2.microsof
t.com/en-us/library/ms143506.aspx
> The SQL Server configuration manager tool will show which services are
> installed and allow you to stop/start the services.
> You may also want to check the setup log files seehttp://msdn2.microsoft.c
om/en-us/library/ms144287.aspx
> John- Hide quoted text -
> - Show quoted text -
thanks. I checked the summary.txt file. It says my PC does not meet
the hardware requirements of sql server. ( it has 512 meg of
memory ).
Is there any way to run sql server w/less than 1 gig of memory?
Microsoft SQL Server 2005 9.00.1399.06
==============================
OS Version : Professional (Build 6000)
Time : Sun Mar 11 15:04:51 2007
VISTA2_PC : The current system does not meet the minimum hardware
requirements for this SQL Server release. For system requirements, see
Hardware and Software Requirements, in the readme file or in SQL
Server Books Online.
VISTA2_PC : The current system does not meet minimum hardware
requirements for this SQL Server release. For detailed hardware
requirements, see the readme file or SQL Server Books Online.
VISTA2_PC : Microsoft Internet Information Services (IIS) is either
not installed or is disabled. IIS is required by some SQL Server
features. Without IIS, some SQL Server features will not be available
for installation. To install all SQL Server features, install IIS from
Add or Remove Programs in Control Panel or enable the IIS service
through the Control Panel if it is already installed, and then run SQL
Server Setup again. For a list of features that depend on IIS, see
Features Supported by Editions of SQL Server in Books Online.
Machine : VISTA2_PC
Product : Microsoft SQL Server Setup Support Files (English)
Product Version : 9.00.1399.06
Install : Successful
Log File : C:\Program Files\Microsoft SQL Server\90\Setup
Bootstrap\LOG\Files\SQLSetup0001_VISTA2_
PC_SQLSupport_1.log
----
--
Machine : VISTA2_PC
Product : Microsoft SQL Server Native Client
Product Version : 9.00.1399.06
Install : Successful
Log File : C:\Program Files\Microsoft SQL Server\90\Setup
Bootstrap\LOG\Files\SQLSetup0001_VISTA2_
PC_SQLNCLI_1.log
----
--
Machine : VISTA2_PC
Product : Microsoft Visual Studio 2005 Premier Partner Edition
- ENU
Product Version : 8.0.50727.42
Install : Successful
Log File : C:\Program Files\Microsoft SQL Server\90\Setup
Bootstrap\LOG\Files\SQLSetup0001_VISTA2_
PC_PPESku_1.log
----
--
Machine : VISTA2_PC
Product : Microsoft Office 2003 Web Components
Product Version : 11.0.6558.0
Install : Successful
Log File : C:\Program Files\Microsoft SQL Server\90\Setup
Bootstrap\LOG\Files\SQLSetup0001_VISTA2_
PC_OWC11_1.log
----
--
Machine : VISTA2_PC
Product : Microsoft SQL Server 2005 Books Online (English)
Product Version : 9.00.1399.06
Install : Successful
Log File : C:\Program Files\Microsoft SQL Server\90\Setup
Bootstrap\LOG\Files\SQLSetup0001_VISTA2_
PC_BOL_1.log
----
--
Machine : VISTA2_PC
Product : Microsoft SQL Server 2005 Backward compatibility
Product Version : 8.05.1054
Install : Successful
Log File : C:\Program Files\Microsoft SQL Server\90\Setup
Bootstrap\LOG\Files\SQLSetup0001_VISTA2_
PC_BackwardsCompat_1.log
----
--
Machine : VISTA2_PC
Product : SQLXML4
Product Version : 9.00.1399.06
Install : Successful
Log File : C:\Program Files\Microsoft SQL Server\90\Setup
Bootstrap\LOG\Files\SQLSetup0001_VISTA2_
PC_SQLXML4_1.log
----
--
Machine : VISTA2_PC
Product : Microsoft SQL Server 2005 Tools
Product Version : 9.00.1399.06
Install : Successful
Log File : C:\Program Files\Microsoft SQL Server\90\Setup
Bootstrap\LOG\Files\SQLSetup0001_VISTA2_
PC_Tools.log
----
--
Setup succeeded with the installation, inspect the log file
completely for status on all the components.
Time : Sun Mar 11 23:10:41 2007|||Hi Steve
"Steve Richter" wrote:
> thanks. I checked the summary.txt file. It says my PC does not meet
> the hardware requirements of sql server. ( it has 512 meg of
> memory ).
> Is there any way to run sql server w/less than 1 gig of memory?
>
According to http://msdn2.microsoft.com/en-us/library/ms143506.aspx 512Mb is
the minimum hardware requirement, I assume that not all of it is available
e.g onboard graphics? This requirement will not stop setup, therefore it may
be something else such as processor (which does stop the install) as there
are two failures for the H/W requirements.
John|||On Mar 15, 11:42 am, John Bell <jbellnewspo...@.hotmail.com> wrote:
> Hi Steve
> "Steve Richter" wrote:
>
> According tohttp://msdn2.microsoft.com/en-us/library/ms143506.aspx512Mb is
> the minimum hardware requirement, I assume that not all of it is available
> e.g onboard graphics? This requirement will not stop setup, therefore it m
ay
> be something else such as processor (which does stop the install) as there
> are two failures for the H/W requirements.
> John
my pc reports 511MB of memory. ;)
I called MSFT support and they say sql server 2005 enterprise does not
run on Vista.
just trying to mimic a production envirornment. at this point I am
concluding I have to install more memory and install windows server
2003.
-Steve|||Hi Steve
"Steve Richter" wrote:
> On Mar 15, 11:42 am, John Bell <jbellnewspo...@.hotmail.com> wrote:
> my pc reports 511MB of memory. ;)
> I called MSFT support and they say sql server 2005 enterprise does not
> run on Vista.
http://msdn2.microsoft.com/en-us/library/ms143506.aspx says 32 bit on 32 bit
for ultimate and above is a valid combination, one must be wrong!
> just trying to mimic a production envirornment. at this point I am
> concluding I have to install more memory and install windows server
> 2003.
If you wish to mimic the environment then having the same OS is important!
Otherwise you could have used developer edition!
> -Steve
John
Is my SProc written correctly?
I am very new to SQL server and I'm using stored procedures for my program. So far I wrote one tonight, that works just fine.
I haven't really written one before, but its kind of similar syntax since I know C++/C# and VB.
My question is, even though this works for what I need it do, is it written correctly? Can you see any problems with it, or would you have done it differently?
I want to make sure its done correctly, and it runs as fast as possible.
Thanks!
[pre]
CREATE PROCEDURE CreateNewUser
@.UserID int out,
@.LoginID nvarchar(30),
@.Password nvarchar(30),
@.RegisterDate smalldatetime,
@.LoginIDExists nvarchar(30)
AS
/* Check to see if the loginID is already in use before attempting to save it.
We MUST have a unique loginID for each user */
SELECT @.LoginIDExists = loginID FROM users WHERE loginID = @.LoginID
/* If we pulled a value from the database, then the loginID already exists, return with error code 1 */
IF (@.LoginIDExists = @.LoginID)
BEGIN
SELECT 1
RETURN
END
ELSE BEGIN
/* The loginID does not already exist, attemp to add the new user to the database. */
INSERT INTO users (
loginID,
loginpassword,
registerDate )
VALUES (
@.LoginID,
@.Password,
@.RegisterDate )
/* Grab the UserID for the new user. */
SELECT @.UserID = @.@.identity
/* return with error code 0 */
SELECT 0
RETURN
END
GO
[/pre]
I think it's ok, only some suggestions:
Replace the @.@.IDENTITY toSCOPE_IDENTITY()
Instead of using the SELECT statement to return the error code, you can use the RETURN statement. If you use the RETURN statement, you need to add a parameter and set the ParameterDirection to ReturnValue to the ADO.Net Command object.
|||Personally, I'd simplify it a bit more by removing the @.LoginExistsparameter. I'd take Fredrik's suggestions, plus I'd do the RETURNvalues slightly differently, and I'd do an @.@.ERROR check:CREATE PROCEDURE CreateNewUser
@.UserID int OUTPUT,
@.LoginID nvarchar(30),
@.Password nvarchar(30),
@.RegisterDate smalldatetime
AS
DECLARE @.Result INT
/* Check to see if the loginID is already in use before attempting to save it.
We MUST have a unique loginID for each user */
IF EXISTS(SELECT loginID FROM users WHERE loginID = @.LoginID)
/* If we pulled a value from the database, then the loginID already exists, return with error code -1 */
BEGIN
SELECT @.RESULT = -1
END
ELSE
BEGIN
/* The loginID does not already exist, attempt to add the new user to the database. */
INSERT INTO users (
loginID,
loginpassword,
registerDate )
VALUES (
@.LoginID,
@.Password,
@.RegisterDate )
/* Grab the @.@.Error and the UserID for the new user. */
SELECT @.Result = @.@.Error, @.UserID = Scope_Identity()
END
/* @.Result = -1 if the user was already on file, 0 if the user was added, and something else if the
user was attempted to be inserted and the INSERT failed */
RETURN @.Result
CREATE PROCEDURE CreateNewUser
@.UserID int OUTPUT,
@.LoginID nvarchar(30),
@.Password nvarchar(30),
@.RegisterDate smalldatetime
AS
DECLARE @.Result INT
/* Check to see if the loginID is already in use before attempting to save it.
We MUST have a unique loginID for each user */
BEGIN TRANSACTION
IF EXISTS(SELECT loginID FROM usersWITH (UPDLOCK) WHERE loginID = @.LoginID)
/* If we pulled a value from the database, then the loginID already exists, return with error code -1 */
BEGIN
SELECT @.RESULT = -1
END
ELSE
BEGIN
/* The loginID does not already exist, attempt to add the new user to the database. */
INSERT INTO users (
loginID,
loginpassword,
registerDate )
VALUES (
@.LoginID,
@.Password,
@.RegisterDate )
/* Grab the @.@.Error and the UserID for the new user. */
SELECT @.Result = @.@.Error, @.UserID = Scope_Identity()
END
/* @.Result = -1 if the user was already on file, 0 if the user was added, and something else if the
user was attempted to be inserted and the INSERT failed . COMMIT the transaction if there
were no errors, otherwise, ROLLBACK */
BEGIN
COMMIT
END
ELSE
BEGIN
ROLLBACK
END
RETURN @.Result|||
Thank's that's pretty cool. I need to get a book on SQL Server so I can learn to do all this stuff better.
I copied the code so I can modify my procedure later. I was going to make one procedure for each function, like CreateUser, EditUser, DeleteUser, ChangePassword, etc...
Do you think this is a good idea or should I include them all in one procedure.
I wanted to keep them small and simple. I didn't want to end up with a 100+ line procedure. I figured it would be better to do everything seperatly, and there's less code to run on each procedure so maybe they will be a little faster.
Thanks.
|||
Bluebarry wrote:
I copied the code so I can modify my procedure later. I was going tomake one procedure for each function, like CreateUser, EditUser,DeleteUser, ChangePassword, etc...
Personally, I like separate procedures. I think each storedprocedure should have one function. But if you have a lotof tables, that could mean a lot of lot of stored procedures.|||
tmorton wrote:
Bluebarry wrote:
I copied the code so I can modify my procedure later. I was going to make one procedure for each function, like CreateUser, EditUser, DeleteUser, ChangePassword, etc...
Personally, I like separate procedures. I think each stored procedure should have one function. But if you have a lot of tables, that could mean a lot of lot of stored procedures.
I dont care too much how many procedures i have unless its going to effect performance. i think having one large procedure would hurt performance more then several smaller procedures. That single procedure has to run more lines of code and do more calculations, like (If we are inserting to this, otherwise do this)... I write my programs in the same way I create many small simple methods rather then a few large methods. It makes it easier to keep bugs out of the program too.