Correct Syntax For Query Using Osql.exe In MSDE Setup

Nov 10, 2003

I have the following .bat file that I call to register users to my MSDE instance...





echo osql -E -S %COMPUTERNAME%OfficiumInstance -Q "sp_grantlogin '" + %COMPUTERNAME% + "ASPNET'"


echo osql -E -S %COMPUTERNAME%OfficiumInstance -d Officium -Q "sp_grantdbaccess '" + %COMPUTERNAME% + "ASPNET'"


echo osql -E -S %COMPUTERNAME%OfficiumInstance -d Officium -Q "sp_addrolemember 'db_owner', '" + %COMPUTERNAME% + "ASPNET'"





My question is how do I correctly append %COMPUTERNAME% as a string to





I have tried using + signs...





"sp_grantlogin '" + %COMPUTERNAME% + "ASPNET'"





But that doesn't work.


I have looked for .bat file tutorials on the web but can't find the correct way to do this.





Greg

View 1 Replies


ADVERTISEMENT

Incorrect Syntax Near The Keyword CONVERT When The Syntax Is Correct - Why?

May 20, 2008

Why does the following call to a stored procedure get me this error:


Msg 156, Level 15, State 1, Line 1

Incorrect syntax near the keyword 'CONVERT'.




Code Snippet

EXECUTE OpenInvoiceItemSP_RAM CONVERT(DATETIME,'01-01-2008'), CONVERT(DATETIME,'04/30/2008') , 1,'81350'




The stored procedure accepts two datetime parameters, followed by an INT and a varchar(10) in that order.

I can't find anything wrong in the syntax for CONVERT or any nearby items.


Help me please. Thank you.

View 7 Replies View Related

Osql Syntax Help

Oct 8, 2004

Dear friends,

I was trying to run this script from a dos batch file under win xp but it's not working. Please help with the syntax.
================================================== =======
OSQL -U sa -P samsde -S firebird /Q "RESTORE DATABASE NAVIMEX FROM DISK = 'C:30704' WITH

REPLACE, MOVE'NAVIMEX_Data' TO 'C:Program FilesMicrosoft SQL

ServerMSSQLDataNAVIMEX_Data.MDF',MOVE 'NAVIMEX_Log' TO 'C:Program FilesMicrosoft SQL

ServerMSSQLDataNAVIMEX_LOG.LDF'" QUIT
================================================== ========

Please provide me with the correct syntax to be put in a 'restore.bat' file :rolleyes:

Thanks in advance.
HotBird

View 4 Replies View Related

Syntax For Osql For Executing Sp With Parameters.

Dec 15, 2004

Can anyone tell me syntax for executing a stored procedure using osql which accepts 4 input parameters which are char data types?

I am getting syntax errors all the time..

View 8 Replies View Related

Correct Syntax

Sep 25, 2006

HelloI have having trouble displaying some simple columns in ascending order.I know that the database is populated and I can get the more complex code to work if I display like this: SELECT FName, LName, Town, '<a href="' + url + '">' + Site + '</a>' as LinkFROM Names_DBWHERE FName = 'Tom' And url like 'http:%'ORDER BY LName ASCBut I need a simpler view but I can't get it to workI  have tried this:SELECT FName, LNameFROM Names_DBORDER BY  LName ASCAnd thisSELECT FName, LNameFROM Names_DBORDER BY  LName ASC; And This:SELECT FName, LNameFROM Names_DBORDER BY  LName 'ASC' What is wrong with this syntax?ThanksLynn

View 2 Replies View Related

What Is The Correct Syntax For Anything

Mar 15, 2007

I have a query and I need to check to see if a field is occupied, i.e., it can have anything in it, i just want to see if something is there... this is what I want, but of course, anything isn't the right word here...

and (r.id = 'anything')

View 7 Replies View Related

Correct Syntax

Feb 25, 2008

Hi.

This is a Stored proc I am working on
I dont know much about stored procs.
This is what I am trying to achieve
The proc takes two input parameter and returns one outparameter.

This is what I have

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

CREATE PROCEDURE [dbo].[GetNextAction]

(
@Code char(10),
@Track varchar(30),
@NextAction ntext output
)
AS
BEGIN

SET NOCOUNT ON;
Declare @ID int;
@ID = Select Sequence from [dbo].[Track] where Code=@Code;
Declare @nextCode varchar;
@nextCode= Select Code from [dbo].[Track] where sequence =(@ID+1);
@NextAction= Select nextAction from [dbo].[CaseStage] where Code=@nextCode;
return @NextAction;


END
GO

I guess you can understand what I am trying in the proc but the rules and syntax are wrong. Please help me with this.
Thanks

View 4 Replies View Related

Please Correct Syntax

Dec 3, 2006



hi there

RS2005 - Layout tab

I have a field that says

txtTrackerTrue=Sum(Iif ((Fields!Tracker.Value = Fields!RecvdBy.Value), 1,0 ))

I want another field that says

txtAllTrue=Sum(Iif ((Fields!Tracker.Value, ClosedBy.Value = Fields!RecvdBy, 1,0 ))

obviously this is going to error

how would I do this please

thanks

View 19 Replies View Related

What Is Correct Syntax

Oct 19, 2007

select CONVERT(VARCHAR, stdate, 'YYYY') startyear
from tbl_emp


i want output : 2007



How can i get?

View 5 Replies View Related

Correct InsertParameters Syntax

Jan 29, 2008

If someone can show me the correct syntax for the right side of the code below, I'd appreciate it.
srcMoreInfo.InsertParameters("Address").DefaultValue =       DirectCast(cuwMoreInfo.FindControl("txtAddress"), TextBox).Text 

View 11 Replies View Related

Is Syntax Is Correct ? URGENT

Jun 21, 2000

CREATE PROCEDURE test1
@spname nvarchar(20),
@tblname nvarchar(50)
AS

declare @sqlrun varchar(8000)

set @sqlrun = "CREATE PROCEDURE @sp_name AS CREATE TABLE @tblname
(MsdsId [nvarchar] (5),
IngredId [nvarchar] (2),
Agency [nvarchar] (10),
AgencyText [nvarchar] (4) ,
nName [nvarchar] (40))"

eXEC sp_ExecuteSql @sqlrun

WHATS WRONG IN THIS CODE ?
---------------------------------
PS: I'm getting this error:
-------------------------------

Server: Msg 214, Level 16, State 2, Procedure sp_executesql, Line 7
Cannot convert parameter '@statement' to ntext/nchar/nvarchar data type expected by procedure.

View 2 Replies View Related

SYNTAX Help, Correct Way To Use LIKE In Statement

Feb 27, 2007

Hi, I'm new to SQL and was wondering if there was an easier way to filter data.

I have two tables -

The first table called Names of Companies has a column named: NAMES

NAMES
XYZ Company
ABC Limited Liability Company
ZZZ Corporation
KKK Inc.
ABC Inc.

The second table called Keywords has a column named: WORDS

WORDS
Company
Limited


I want to search for all NAMES that contain the WORDS in some form

The results should be:

NAMES
XYZ Company
ABC Limited Liability Company

Technically, I can get the results I want by manually typing into the SQL statement all the words that appear in the WORDS column.

SELECT *
FROM [Names of Companies]
WHERE [Names of Companies].Names Like "*Company*" Or ([Names of Companies].Names) Like "*limited*"));

But is there a way that I reference the table Keyword instead of typing into the query statement all the words that appear in the column WORD? I have a lot of words to search for.

Can anyone recommend a better way to do this?

Thanks for all your help!

View 8 Replies View Related

Correct Syntax For Dtsrun

May 18, 2006

Somehow I'm not getting dtsrun to work.

The server is local

The name of the package is ImportHosttrncs. It is saved under Local Packages.

There is no password.

Is this syntax correct?

dtsrun /Slocalhost /PImportHosttrncs

View 1 Replies View Related

Correct Syntax For IF EXISTS

Apr 11, 2008

What is the correct syntax for dropping a column if it exists?

Cant seem to get it to work. This is SQL 2005 if it makes a difference.





ALTER TABLE Reports_PI_Recent

IF EXISTS (DROP COLUMN RollingAverage )

View 3 Replies View Related

Correct Setup For SQL Server 2005 For Web Project!

Oct 11, 2007

Ive been trying to get some type of Blogpost tutorial Etc on how to set up SQL Server 2005 to serve data to a website1 How do I setup users?    a) Can I have 3 roles?       1a) Owner of DB can read/write       2a) reader Can Only read from database      3a) Writer. Can only write to database How would I set this up? How can I call all these from ASP.NET depending on what the user is currently using on the website?    eg:       Just serving pages with content (reader)      Forms (writter)      admin (owner)I also need to have the SQL keep sessions (Ive already ran aspnet_reqSQL.exe) and created all that im just unsure what type user can access all thisAny tutorials on how to set up a whole WEb application project from DB to VS 2005? Thanks         

View 3 Replies View Related

Correct Syntax For Parameters When Creating SQL Job

Dec 30, 2007

I'm trying to create a SQL job in SQL Server and am a little unclear about the formatting.Here's a snippet from the stored procedure that creates the job:CREATE PROCEDURE [dbo].[spArchive]     @DB            varchar(30),    @Date        DateTimeAS EXEC msdb.dbo.sp_add_jobstep @job_name = 'ArchiveIncentives'     , @step_id = 1    , @step_name = 'ArchiveAHD'    , @subsystem = 'TSQL'    , @command = 'spArchiveAHD ''@Date'''    , @on_success_action = 3     , @on_fail_action = 2     , @database_name = '@DB'     , @retry_attempts = 1   In this case, the job will be calling this stored procedure:CREATE PROCEDURE [dbo].[spArchiveAHD] (    @dtArchiveBefore DateTime)AS I'm unclear about these lines:    @command = 'spArchiveAHD ''@Date'''    @database_name = '@DB'   Do they look correct to you or should I drop some/all of the apostrophes?Robert W. 

View 5 Replies View Related

Is There Any Correct Syntax For ParameterDirection.Input ?

Apr 3, 2008

 I try to call the storeproc to perform task by allowing only input 6 of length. The syntax over here might not be relevant, im seeking for correct syntax.
 webform
Dim connString2 As String = _ConfigurationManager.ConnectionStrings("Local_LAConnectionString1").ConnectionString Using myConnection2 As New SqlConnection(connString2)
Dim test01 As IntegerDim myPuzzleCmd2 As New SqlCommand("GetRandomCode", myConnection2)
myPuzzleCmd2.CommandType = CommandType.StoredProcedure
Dim retLengthParam As New SqlParameter("@Length", SqlDbType.TinyInt, , 6)                 < --------   allow 6 letters in length to be input   
retLengthParam.Direction = ParameterDirection.InputmyPuzzleCmd2.Parameters.Add(retLengthParam) Dim retRandomCode As New SqlParameter("@RandomCode", SqlDbType.VarChar, 30)
retRandomCode.Direction = ParameterDirection.Output
myPuzzleCmd2.Parameters.Add(retRandomCode)
TryDim reader2 As SqlDataReader = myPuzzleCmd2.ExecuteReader()
myPuzzleCmd2.ExecuteNonQuery()
Catch ex As Exception Response.Write("sp value : " & retRandomCode.Value)
Dim iRandomCode(1) As StringReDim Preserve iRandomCode(1)
iRandomCode(1) = Convert.ToString(retRandomCode.Value)myPuzzleCmd2 = Nothing
Session.Remove("RandomCode") HttpContext.Current.Session("RandomCode") = iRandomCode(1) Response.Write(Session("RandomCode"))
Finally
myConnection2.Close()
End Try
End Using
 
StoredProcedure ALTER PROC [dbo].[GetRandomCode]
@Length TINYINT,
@RandomCode VARCHAR(30) OUTPUT
ASDECLARE
@Chars2BUsed VARCHAR(30),
@LookAt TINYINT,
@iCnt INT,
@CharFound CHAR(1)
 
SELECT @Chars2BUsed ='ABCDEFGHJKLMNPQRTUVWXYZ2346789'
SELECT @RandomCode = ''SELECT @iCnt = 1 WHILE @iCnt<=@Length
BEGINSELECT @LookAt = FLOOR((RAND()*LEN(@Chars2BUsed))) + 1
SELECT @CharFound = SUBSTRING(@Chars2BUsed, @LookAt, 1)IF CHARINDEX(@CharFound, @RandomCode)=0
BEGINSELECT @RandomCode = @RandomCode + @CharFound
SELECT @Chars2BUsed = REPLACE(@Chars2BUsed, @CharFound, '')SELECT @iCnt = @iCnt + 1
END
END

View 2 Replies View Related

Correct Syntax For This Select In SQL Server?

Jun 22, 2007

This (demo) statement is fine in Access, and so far as I can see, shouldbe OK in SQL Server.But Enterprise Manager barfs at the final bracket. Can anyone helpplease?select sum(field1) as sum1, sum(field2) as sum2 from(SELECT * from test where id < 3unionSELECT * from test where id 2)In fact, I can reduce it to :-select * from(SELECT * from test)with the same effect - clearly I just need telling :-)cheers,Jim--Jima Yorkshire polymoth

View 4 Replies View Related

Can You Please Correct My Syntax For If Statement In Stored Proc

Nov 23, 2004

I am using @strsql to construct the where condition for a select query.
Can you please correct my syntax.



DECLARE @strsql nvarchar(2000)


IF @ProgNO <> '' then
strsql = WHERE ProgNO = @ProgNO
end if



If @ProjNO <> '' then
if strsql <> '' then
strsql = strsql & " and ProjNO =@ProjNO
ELSE
strsql = wHERE ProjNO =@ProjNO
END IF
END IF



Thank you very much.

View 9 Replies View Related

Correct Syntax For An Update Stored Procedure

Nov 24, 2005

This is probably a very simple question but i would appreciate some helpwith the correct syntax for and update stored procedureI  have created  user form that allows the user to update the name and address fields in a datatable called  customers based on the input value customer ID =  ( datatable/Customers)customerIDI have got this far and then got lost:Create SP_UpdateCustomer(@customerID, @name, @address)As Update customers ( name, address)Where customerID =  @customerID GOCould anyone tell me what the correct sntax should be.many thanksMartin

View 3 Replies View Related

Correct Syntax For ADO.net Recordset's Select Method.

Feb 17, 2006

I have a interger stored in x.

I want to use x in a SELECT statement like so :

SELECT * from aTable WHERE A_Column = x

This select statement is then assigned to and passed as a string like :

sql = "SELECT * from aTable WHERE A_Column = x"

How does the x get interpreted correctly ?

View 1 Replies View Related

Correct Syntax Using Variables Inside SQL Queries (SqlCommand)

Mar 30, 2008

I have a test page where I'm using SqlConnection and SqlCommand to update a simple database table (decrease a number).
I'm trying to figure out how to make a number in the database table to decrease by 1 each time a button is being pressed. I know how to update the number by whatever I want to, but I have no idea what the correct syntax is for putting variables inside the query etc. Like "count -1" for instance.
The database table is called "friday" and the one and only column is called "Tickets".
Here's the code behind the button:protected void Button1_Click(object sender, EventArgs e)
{SqlConnection conn;
conn = new SqlConnection("Data Source=***;Initial Catalog=***;Persist Security Info=True;User ID=***;Password=***");
conn.Open();int count = -1;
 SqlCommand cmd = new SqlCommand("select Tickets from friday", conn);
count = (int)cmd.ExecuteScalar();if (count > 0)
{
 string updateString = @"
update friday
set Tickets = 500" ;   <------ Here I want to set Tickets like "current count -1"SqlCommand cmd2 = new SqlCommand(updateString);
cmd2.Connection = conn;
cmd2.ExecuteNonQuery();
}
else
{
}
conn.Close();
}

View 3 Replies View Related

Integration Services :: Correct Syntax To Access A Variable

Sep 30, 2015

I am having trouble finding the correct syntax to access a variable. I have a variable defined in the Variables window: The variable name is formatedDate. The DataType is String.

I am successfully setting the value of the variable in a Execute SQL Task. The SQL is as follows:

SELECT LEFT(CONVERT(VARCHAR, MAX(ReportDate), 120), 10) as formatedDate
from DimReportDates

The Result Set is set to “Single Row” and properly set up. 

No problem so far. I can see with a watch that the variable has the correct value, something like:

‘2015-09-30’

Now, in a subsequent step, a Data Flow Task, I want to access the variable. Actualy it is in the SQL statement of a OLE DB source in the Data Flow… I have the following:

Declare @sDate smalldatetime
SELECT @sDate = xxxxx

I have tried several things substituting xxxxx above, but nothing seems to work. One variation was

 @[User::formatedDate])

 Another was

((DT_WSTR, 10) @[User::formatedDate]).

I think I’m close, but just can’t get it. What is the correct syntax.

View 4 Replies View Related

Seeking Correct Syntax To Pass A NULL Value For A Datetime Field From An Asp Page To SQL

Jan 13, 2006

Hello,I've been searching the web for quite some time to resolve the problemof "1/1/1900" returning in a datetime field in SQL that resulted from ablank (not NULL) value being passed to it through an ASP page.The solution is that a NULL value needs to passed to SQL from ASP.Thats fine...I understand the why the problem is happening and thesolution around it. HOWEVER, I can't seem to get the proper syntax towork in the ASP page. It seems no matter what I try the "1/1/1900"still results. Below are a few variations of the code that I havetried, with the key part being the first section. Does anyone have anysuggestions?!?!?______________cDateClosed = ""If(Request.Form("dateClosed")= "") ThencDateClosed = (NULL)end ifsql="UPDATE rfa SET "&_"dateClosed='"& cDateClosed &"', "&_"where rfaId='"& Request.Form("RFAID")&"'"_____________________________cDateClosed = ""If(Request.Form("dateClosed") <> "") ThencDateClosed = (NULL)end ifsql="UPDATE rfa SET "&_"dateClosed='"& cDateClosed &"', "&_"where rfaId='"& Request.Form("RFAID")&"'"_____________________________cDateClosed = ""If(Request.Form("dateClosed")= "") ThencDateClosed = NULLend ifsql="UPDATE rfa SET "&_"dateClosed='"& cDateClosed &"', "&_"where rfaId='"& Request.Form("RFAID")&"'"_______________Thanks in advance!!!!

View 7 Replies View Related

Correct Syntax To Pull Back Duplicate Vendors Based On 6 Fields From Two Different Tables

Feb 20, 2015

I'm looking for the correct syntax to pull back duplicate vendors based on 6 fields from two different tables. I want to actually see the duplicate vendor information (not just a count). I am able to pull this for one of the tables, something like below:

select *
from VendTable1 a
join ( select firstname, lastname
from VendTable1
group by firstname, lastname
having count(*) > 1 ) b
on a.firstname = b.firstname
and a.lastname = b.lastname

I'm running into issues when trying to add the other table with the 4 other fields.

View 5 Replies View Related

MSDE Setup Failed

Jul 31, 2004

was installing MSDE for use with Web matrix
thot had done all correctly ie the setup.exe sapwd=xxxxx securitymode=sql from the command prompt
was told that setup has failed
where is the problem

View 1 Replies View Related

MSDE Setup Question

Dec 12, 2004

Hello:

I had partitioned my harddrive to have both XP PRO and Red Hat. Got fed up with all that and so used Partition Magic 8.0 to repartition the drive to be one 16 Gig drive. I still have over 8 Gig left on it even after installing VS .NET on it.

I have successfully installed Visual Studio .NET Pro 2003 on it and I can now write programs in VB and see it on my intranet at c:/wwwroot/.

I am now trying to install MSDE 2000 for Developers Using VS .NET. I have downloaded the file from Microsoft and then when I go to install it on my hard drive it tells me it cannot; I have to free up 92.44 Megs for it to be able to extract it to my c drive.

I am a newbee and any help will be GREATLY appreciated!!

View 2 Replies View Related

MSDE Setup Problem

Mar 1, 2005

i got prob running setup in MSDE ,
there r options to set in setup.ini to enable setting the parameter in MSDE after installed
but it cant run
i use

[Options}
SAPWD=123

after install the sapassword still null,seems like no effect
i've try running from prompt setup.exe /SAPWD 123 too

View 5 Replies View Related

MSDE Setup -- Where's The Server?

Mar 12, 2004

I am using VB.net to build ASP.net pages. I finally decided it was time to start using SQL server based code. So, I installed MSDE....or so I thought.

I have the server Icon in the bottom systray and it's green and seems to be running.

I have been able to use Microsoft Access' Database Upgrade Wizard to create BB.adp file.

An in VB.net I see a master.dbo connection in Server Explorer.

But I can't figure out how to access the database via the SQL server. When I right click on Server Explorer....the Create a New SQL database menu item is greyed out.

My concern is that my installation is not complete and/or I don't know how to locate and verify the server.

Any help would be appreciated. Thanks

View 1 Replies View Related

Setup On Localhost MSDE Permissions

Nov 20, 2003

I'm trying to setup the ASP.Net forum on my local XP Pro PC and am having problems with MSDE security. I had an old version of MSDE on the PC and uninstalled it and downloaded/setup the version on the download page with the forum.

Looking at the MSDE readme I did the Windows Authentication mode instead of the mised mode - was that wrong?

When setup tries to setup the DB I get the log entry:
Determined SQL Server version (8.00.194).

[Fail] Could not add ASPNET user to SQL Server.
SQL Server does not exist or access denied.

The server is up and running and I have already used another tool to setup its DB so the server is up an running and functioning fine.

I have search around on the net about MSDE persmissions but the hits have not been helpful - they usually refer to client tools not provided with MSDE. Even if I could find instructions on setting up a user the ASPForumSetup doesn't say what user name or permissons are needed.

I can't find any spot in the XP Pro environment to setup access permissions to MSDE - is finding that the key? My login is a member of the Administrators group.

Help!

View 3 Replies View Related

Overcoming MSDE Setup Problems

Nov 5, 2004

Here is my experience with installing MSDE.

I'm leaning C# and ASP.NET at the same time using the book "Microsoft ASP.NET Programming with Microsoft Visual C# .NET Step by Step". In Appendix C, P 577, it says to locate setup.exe under …Microsoft Visual Studio .NETSetupMSDE and "run setup.exe to install MSDE."

This was my first mistake, because there are more recent versions available with security patches (for the slammer virus). I have been unable to successfully update the old version. The install program for MSDE has got to be a hackers delight because only a hacker can make it work. I decided to uninstall the old version of MSDE 2000 and install the latest download from the MSDN website. The new version would get most of the files installed and then rollback the install, removing all the files. When I tried to reinstall the old version, it did the same thing. At least the new version requires a password parameter for the sa user. The bad news is that the new password is ignored. Since I already installed the first version with a blank sa password by running setup.exe with no parameters the password will remain blank until I change it using the user friendly osql command line utility. More about osql later…

Here is how I solved the rollback problem:

I first (after many hours trying to modify the registry to clean up the mess Windows uninstaller left there) used the command line switch /L*V <your logfile name> to get a verbose log file. I noticed a property listed called "Disablerollback" this was set to 0. So, I ran setup on the command line as below (all one line):

>setup DisableRollback=1 /L*V "C:Program FilesMicrosoft Visual Studio .NETSetupMSDEsetupbat.log" SAPWD="ignored password"

The setup still failed, but its tracks were preserved for XP to complain about on system restart.
I then restarted the system and logged in. XP threw an error dialog box with the message "Your server installation is either corrupt or has been tampered with (unknown package ID)…" I clicked OK and waited a few extra minutes for XP to finish logging me in.

After logging in, I closed the Service Manger from the taskbar notification area. I then deleted the folders 80, and MSSQL (name of default instance) from the target install directory. Finally, I ran setup.exe again as shown:

>setup /L*V "C:Program FilesMicrosoft Visual Studio .NETSetupMSDEsetupgood.log" SAPWD="ignored password"

This time, after restarting, my old MSDE worked. This approach seems to only work with the first old version of MSDE that was shipped with Visual Studio .NET. I still have yet to figure out how to upgrade and get MSDE to work again.

Once you get MSDE to work, here are some tips on how to administer it using the osql command tool.
To change the sa password do the following (use null for a blank password):
>osql -U sa
Password:
1> sp-password @old=null, @new='newpassword', @loginame='sa'
2> go
Password has been changed
3> quit

On page 113 of the authors' first attempt with the book "Microsoft ASP.NET Programming…", the hacks wrote:
Set up the SQL Server session state database by running the InstallSQLState.sql batch (located in …) against the SQL Server you plan to use. (For more information about running batch statements, check with your database administrator or the SQL Server Books Online.)

Here is how to do it with osql:

> osql -S MSSQLSERVER -U sa -i InstallSQLState.sql

For less characters than it took to write the last parenthetical sentence, they could have just given the same example I supplied here.

If you want a graphical interface to administer you MSDE server, try downloading the small package for "Microsoft SQL Web Data Administrator" from Microsoft's website. This even comes with a modern installer. Here are some tips on how to connect to your locally installed MSDE using this utility:

The main dialog just requires that you click the start button. A login page comes up. To log in as sa, do the following:

? Click the "SQL Login" radio button.
? Under "Please enter a SQL Server name:" fill in the following text boxes:
? Username: sa
? Password: [your password | leave blank if no password is set]
? Server: (local)

This should get you to the server tools page. Click "Security", then Logins. Now, on the Logins page, you can add new users. If you install MSDE for mixed mode, you can add "Windows Integrated" user accounts. This best since you won't have to put passwords in your code to allow database access to these users. To add a user, click on "Create New Login". Set Authentication Method to "Windows Integrated" in the combo box. For Login Name you need to use the form <computername><username> . For example, "MSSQLServerDan".

If you did like I did, and installed MSDE in SQL login mode only, you can do the following registry hack to change it to mixed authentication mode:

1. Locate either of the following subkeys (depending on whether you installed MSDE as the default MSDE instance or as a named instance:
HKEY_LOCAL_MACHINESoftwareMicrosoftMSSqlserverMSSqlServer

-or-

HKEY_LOCAL_MACHINESoftwareMicrosoftMicrosoft SQL Server<Instance Name>MSSQLServer

2. In the right-pane, double-click the LoginMode subkey.

3. In the DWORD Editor dialog box, set the value of this subkey to 1. Make sure that the Hex option is selected, and then click OK.

4. Restart the MSSQLSERVER and the SQLSERVERAgent services for this change to take effect.

Try this link for more details:
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q322336

View 8 Replies View Related

Trying To Setup MSDE 2000 Release A

Dec 12, 2004

Hello:

I have extracted the files from the Microsoft download and am all ready to run SETUP for the MSDE 2000 release A for Visual Studio .NET 2003 Pro.

Is there anything I need to know about or run or configure for it all to work?? I am a newbee and I am the only user on my XP Pro machine under Administrator.

Thank you in advance for any pointers.

View 1 Replies View Related

Want To Avoid Reboot After MSDE Setup

Jun 5, 2007

Hello,



OS: Windows XP Embedded

MSDE: 2000 SP3 to SP4



I want to avoid reboot after upgrading MSDE from SP3 to SP4.

setup.exe seems to no option to avoid reboot.



The resason to avoid reboot is continue to do some process after upgrade MSDE.



Regards,

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved