Showing posts with label msde. Show all posts
Showing posts with label msde. Show all posts

Thursday, March 22, 2012

Adding Users to MSDE

I am having a authentication problem.. users log into my website... I authenticate them against Active Directory.. and then I try to query a MSDE database... my connection string is as follows:


Dim connectionString As String = "server='srv_sql'; user id='sa'; password='MyPassword'; Database='MyDB'"
Dim dbConnection As System.Data.SqlClient.SqlConnection = New System.Data.SqlClient.SqlConnection(connectionString)

However since I have


<identity impersonate=true>

in my web.config file... it tries to login to the MSDE database as the user.. not as the user SA.

I cannot change the web.config file, since I need that for the active directory authentication to work...

in SQL Server you can add users to a database through the enterprise manager.. how can I do a similar thing using MSDE ?

Is it even possible? or do I have to upgrade to a full SQL instance?

any help would be appreciatedTo answer your question, use the osql command line utility. See this KB article for more info:HOW TO: Manage the SQL Server Desktop Engine (MSDE 2000) by Using the Osql Utility.

what you need to do is use the sp_grantlogin system sp to add the login:

EXEC sp_grantlogin 'Corporate\Test'

Then give it access like this:

EXEC sp_grantdbaccess 'Corporate\BobJ', 'Bob'

You'll also need to give it permissions.

That said, there may need to be adjustments for use with Active Directory.

BUT, you should never, ever, NEVER use the sa login for database access. Not for any app and certainly not for an ASP.NET app. You're opening yourself up to a whole lot of hurt doing it this way. Instead, create a login that has only the specific permissions needed to run the app. No more.

It's more work, but you'll have made the app far more secure.

Don|||...for sure don't use SA on the page itself. What about permissioning the database with Windows authenticated logins since you are using AD...if you haven't already. If you do then you can set windows authentication via Internet Services Manager on the directory hosting the page (be sure to get rid of anonymous users)

Adding users and giving permissions in MSDE

How can I add users and give permissions to access a database in MSDE.
Hi
Have a look at
sp_addrole
sp_dropuser
sp_grantdbaccess
sp_grantlogin
sp_helpuser
"Antonin Koudelka" <Antonin.Koudelka@.fmc.sa.gov.au> wrote in message
news:u5etHL9FFHA.1292@.TK2MSFTNGP10.phx.gbl...
> How can I add users and give permissions to access a database in MSDE.
>

Adding users and giving permissions in MSDE

How can I add users and give permissions to access a database in MSDE.Hi
Have a look at
sp_addrole
sp_dropuser
sp_grantdbaccess
sp_grantlogin
sp_helpuser
"Antonin Koudelka" <Antonin.Koudelka@.fmc.sa.gov.au> wrote in message
news:u5etHL9FFHA.1292@.TK2MSFTNGP10.phx.gbl...
> How can I add users and give permissions to access a database in MSDE.
>

Adding users and giving permissions in MSDE

How can I add users and give permissions to access a database in MSDE.Hi
Have a look at
sp_addrole
sp_dropuser
sp_grantdbaccess
sp_grantlogin
sp_helpuser
"Antonin Koudelka" <Antonin.Koudelka@.fmc.sa.gov.au> wrote in message
news:u5etHL9FFHA.1292@.TK2MSFTNGP10.phx.gbl...
> How can I add users and give permissions to access a database in MSDE.
>

Adding users

Hi
I want to programatically attach a DB to an instance of MSDE, and then
create the user, and give permissions to the DB I've just attached.
I can successfully attach the DB, but cannot get the permissions correct
Which sequence of T-SQL commands should I be calling to:
a). create the login in the instance of MSDE
b). associate the login with the newly attached DB
I have played around with:
sp_attach_single_file_db
sp_addlogin
sp_grantdbaccess
sp_grantlogin
but I cannot get a successful logon with the new account, even though the
T-SQL commands run successfully.
Thanks
Hi Paul,
Is there any chance the users already exist in the database you're
attaching? If so, you get into a weird situation because you have users with
the same name but different SID's. If you download a copy of MSDE Manager
from our site (free for personal use), it's got a menu option that lets you
list and fix security ID problems. Might well help.
To avoid these, we normally create the users on the target system by
supplying the sid parameter.
HTH,
Greg Low [MVP]
MSDE Manager SQL Tools
www.whitebearconsulting.com
"Paul Aspinall" <paul@.aspy.co.uk> wrote in message
news:m%IUd.241292$K7.73273@.fe2.news.blueyonder.co. uk...
> Hi
> I want to programatically attach a DB to an instance of MSDE, and then
> create the user, and give permissions to the DB I've just attached.
> I can successfully attach the DB, but cannot get the permissions correct
> Which sequence of T-SQL commands should I be calling to:
> a). create the login in the instance of MSDE
> b). associate the login with the newly attached DB
> I have played around with:
> sp_attach_single_file_db
> sp_addlogin
> sp_grantdbaccess
> sp_grantlogin
> but I cannot get a successful logon with the new account, even though the
> T-SQL commands run successfully.
> Thanks
>
>
|||Hi Greg,
I was reading Paul message and experienced the same problems setting up MSDE.
I installed the MSDE on a machine i was using for the server.
Used (local)netSDK for instance as in the documentation .
Then I accessed the database NorthWind using the SQLClient.
The samples in VB.net now work ok when ran from the server where I installed
MSDE.
However, I then got very bold, and tried to access the NorthWind database
from another computer that was setup on our network.
I added a login name, added a role and a member, granted premission.
Then in the vb.net program I tried to open the database with the same code
from the program on the server. I did change the server name to the Name of
the computer that MSDE was installed on. I also tried the IP address as the
server.
I kept getting the error "Server not found or do not have premission.
WHAT AM I DOING WRONG?
Best regards,
Dave
"Greg Low [MVP]" wrote:

> Hi Paul,
> Is there any chance the users already exist in the database you're
> attaching? If so, you get into a weird situation because you have users with
> the same name but different SID's. If you download a copy of MSDE Manager
> from our site (free for personal use), it's got a menu option that lets you
> list and fix security ID problems. Might well help.
> To avoid these, we normally create the users on the target system by
> supplying the sid parameter.
> HTH,
> --
> Greg Low [MVP]
> MSDE Manager SQL Tools
> www.whitebearconsulting.com
> "Paul Aspinall" <paul@.aspy.co.uk> wrote in message
> news:m%IUd.241292$K7.73273@.fe2.news.blueyonder.co. uk...
>
>

Tuesday, March 6, 2012

Adding MS Access Project

I am VERY NEW to this.
I'm installed the MSDE and it's running on my desktop.
I'm trying to make a new Ms Access Project.
It asks for a user name and password and I supply sa as the user and leave
the password blank.
I get an error back saying that:
Connection Failed
SQLState: '01000'
SQL Server Error: 10054
and more...is that enough of the error for you to know what I'm doing
wrong?
Thanks.
Also, I'm familiar with MS Access frontend/backend setup. When I get it
working, does the project work as the frontend and the SQL database the
backend?
Is there a link to intro info on all of this?
Thanks.
Sorry for the double post. Didn't mean to.
I found that Norton Personal Firewall is blocking this from running. Which
program do I need to allow access. MS Access has access.
Thanks.
"SAC" <someone@.microsoft.com> wrote in message
news:OY3Xbjr8EHA.2900@.TK2MSFTNGP09.phx.gbl...
> I am VERY NEW to this.
> I'm installed the MSDE and it's running on my desktop.
> I'm trying to make a new Ms Access Project.
> It asks for a user name and password and I supply sa as the user and leave
> the password blank.
> I get an error back saying that:
> Connection Failed
> SQLState: '01000'
> SQL Server Error: 10054
> and more...is that enough of the error for you to know what I'm doing
> wrong?
> Thanks.
> Also, I'm familiar with MS Access frontend/backend setup. When I get it
> working, does the project work as the frontend and the SQL database the
> backend?
> Is there a link to intro info on all of this?
> Thanks.
>
>
|||hi,
"SAC" <someone@.microsoft.com> ha scritto nel messaggio
news:OY3Xbjr8EHA.2900@.TK2MSFTNGP09.phx.gbl
> I am VERY NEW to this.
> I'm installed the MSDE and it's running on my desktop.
> I'm trying to make a new Ms Access Project.
> It asks for a user name and password and I supply sa as the user and
> leave the password blank.
> I get an error back saying that:
> Connection Failed
> SQLState: '01000'
> SQL Server Error: 10054
> and more...is that enough of the error for you to know what I'm doing
> wrong?
> Thanks.
> Also, I'm familiar with MS Access frontend/backend setup. When I get
> it working, does the project work as the frontend and the SQL
> database the backend?
> Is there a link to intro info on all of this?
> Thanks.
please have a look at http://tinyurl.com/4vho5
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.9.1 - DbaMgr ver 0.55.1
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply

Friday, February 24, 2012

Adding Full Text Indexing to Sharepoint in SQL Server

We had Sharepoint running on SBS with an MSDE database. We then upgraded
SBS to full blown SLQ Server.
I want to add full text indexing to SharePoint database but I cannot find
it. When I open Enterpise Manager I do not see a Sharepoint database.
Can anyone tell me how I add full text indexing to a Sharepoint database?
Hi Dave,
Thanks for your posting!
For using SQL Full-text indexing for WSS, you will need to migrate the
database from MSDE to SQL server; this WSS admin guide article will
introduce the detailed steps for you:
Migrating from WMSDE to SQL Server
http://www.microsoft.com/resources/d...inguide/en-us/
stsf17.mspx
Please ensure your SQL server has installed Full text indexing. No any
searching particular component is developed at WSS which depends SQL server
to perform the searching.
Then from the "Central Administration" page of WSS (start->Control
Panels->Administrative Tools->Sharepoint Central Administration), click the
link "Configure full-text search" under Component Configuration; then
select the checkbox "Enable full-text search and index component".
You are encourage to raise this question to Sharepoint newsgroup, which I
believe will let you get more quickly and better from Support Professionals
for SharePoint.
Thank you for your patience and corporation. If you have any questions or
concerns, don't hesitate to let me know. We are always here to be of
assistance!
Sincerely yours,
Michael Cheng
Online Partner Support Specialist
Partner Support Group
Microsoft Global Technical Support Center
Get Secure! - http://www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
Please reply to newsgroups only, many thanks!

Adding Full Text Indexing to Sharepoint in SQL Server

We had Sharepoint running on SBS with an MSDE database. We then upgraded
SBS to full blown SLQ Server.
I want to add full text indexing to SharePoint database but I cannot find
it. When I open Enterpise Manager I do not see a Sharepoint database.
Can anyone tell me how I add full text indexing to a Sharepoint database?Hi Dave,
Thanks for your posting!
For using SQL Full-text indexing for WSS, you will need to migrate the
database from MSDE to SQL server; this WSS admin guide article will
introduce the detailed steps for you:
Migrating from WMSDE to SQL Server
http://www.microsoft.com/resources/...minguide/en-us/
stsf17.mspx
Please ensure your SQL server has installed Full text indexing. No any
searching particular component is developed at WSS which depends SQL server
to perform the searching.
Then from the "Central Administration" page of WSS (start->Control
Panels->Administrative Tools->Sharepoint Central Administration), click the
link "Configure full-text search" under Component Configuration; then
select the checkbox "Enable full-text search and index component".
You are encourage to raise this question to Sharepoint newsgroup, which I
believe will let you get more quickly and better from Support Professionals
for SharePoint.
Thank you for your patience and corporation. If you have any questions or
concerns, don't hesitate to let me know. We are always here to be of
assistance!
Sincerely yours,
Michael Cheng
Online Partner Support Specialist
Partner Support Group
Microsoft Global Technical Support Center
---
Get Secure! - http://www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
Please reply to newsgroups only, many thanks!

Adding Full Text Indexing to Sharepoint in SQL Server

We had Sharepoint running on SBS with an MSDE database. We then upgraded
SBS to full blown SLQ Server.
I want to add full text indexing to SharePoint database but I cannot find
it. When I open Enterpise Manager I do not see a Sharepoint database.
Can anyone tell me how I add full text indexing to a Sharepoint database?Hi Dave,
Thanks for your posting!
For using SQL Full-text indexing for WSS, you will need to migrate the
database from MSDE to SQL server; this WSS admin guide article will
introduce the detailed steps for you:
Migrating from WMSDE to SQL Server
http://www.microsoft.com/resources/documentation/wss/2/all/adminguide/en-us/
stsf17.mspx
Please ensure your SQL server has installed Full text indexing. No any
searching particular component is developed at WSS which depends SQL server
to perform the searching.
Then from the "Central Administration" page of WSS (start->Control
Panels->Administrative Tools->Sharepoint Central Administration), click the
link "Configure full-text search" under Component Configuration; then
select the checkbox "Enable full-text search and index component".
You are encourage to raise this question to Sharepoint newsgroup, which I
believe will let you get more quickly and better from Support Professionals
for SharePoint.
Thank you for your patience and corporation. If you have any questions or
concerns, don't hesitate to let me know. We are always here to be of
assistance!
Sincerely yours,
Michael Cheng
Online Partner Support Specialist
Partner Support Group
Microsoft Global Technical Support Center
---
Get Secure! - http://www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
Please reply to newsgroups only, many thanks!

Adding Field or Stored Procedure to MSDE

Is there a way to add a field or a stored procedure to a server running MSDE? Like a script on the command line or?? how can this be done.

Thank you,Sure can. Check out the osql command-line utility, which lets you run individual T-SQL statements or script files. Or, there are several tools you can use to manage MSDE:

ASP.NET Enterprise Manager, an open source SQL Server and MSDE management tool.

ASP.NET WebMatrix (which includes a database management tool) from this web site (click on the Web Matrix tab at the top of this page).

Microsoft's Web Data Administrator is a free web-based MSDE management program written using C# and ASP.NET, and includes source code.

You can also access MSDE using Access.

Don|||If I write a stored procedure and then script it, how can I use osql to run the script and add the sp to a database on the server? Can you show me an example? Do I create a cmd file that contains the script?

Thank you,|||Here's how you run a script file:

osql -E -i "myScripts.sql"

And to run a line of T-SQL directly:

osql -E -Q "DROP DATABASE pubs"

There are a gaggle of options for osql, so you'll need to look at the docs to use the ones appropriate for your setup.

Don|||Can you show me a sample of a stored procedure to add a field to a table that is already in a database?

Thanks again for your help,|||

CREATE PROCEDURE MyProc
AS
ALTER TABLE myTable ADD newCol VARCHAR(20) NULL
GO