Showing posts with label access. Show all posts
Showing posts with label access. Show all posts

Thursday, March 29, 2012

Attach Error

Cannot access the specified path or file on the server. Verify that you have the necessary security privileges and that the path or file exists.

If you know that the service account can access a specific file, type in the full path for the file in the File Name control in the Locate dialog box.


I get this error when I try to attcah a Database file sitting in "My Documents" folder.

Any help will be appreciated

--Thanks

Have you verified that the file actually exists, and that there is no misspelling in the path, and all else that the message tells you to verify?

If all that is ok, maybe try to enclose the path in double quotes. (in case it's the spacing that gives you trouble.
"C:\My Documents\myfile.dat"

/Kenneth

Tuesday, March 27, 2012

Attach database from network drive

Hello,

when I attach an database from a network drive in SQL Express 2005 the access permissions on the data and log files will be change.
This ends in a deadlock when the user doesn't have administrator right on the network server, because the permissions will allow access only for administrators and an unknown Usergroup on the network server. I think it's the SQLServer2005MSSQLUser$xxx$MSSQLSERVER group from the local server.

Example:

DBCC TRACEON(1807)
GO
PRINT 'ATTACH FIRST'
CREATE DATABASE TEST ON
( FILENAME = N'\\server\tmp\test.mdf' ),
( FILENAME = N'\\server\tmp\test_log.ldf' )
FOR ATTACH;
GO
PRINT 'Detach'
exec sp_detach_db TEST
GO

When this batch runs again after some minutes you will get

Msg 5120, Level 16, State 101, Line 2

Die physikalische Datei "\\server\tmp\test.mdf" kann nicht ge?ffnet werden. Betriebssystemfehler 5: "5(Zugriff verweigert)".

This could be translated like:

The physical file "\\server\tmp\test.mdf" could not be opend. OS Error 5 (Access Denied).

This error is the same when the user doesn't have full access on the share and db files.

In SQL2000/MSDE no security permissions will be changed, so the database could always be attached.

Is there any workaround?

Perhaps setting the security permissions could switched off?

You also need full access permissions on the share and files, wich also doesn't make sense.

Hi Dieter (thanks for translating ;-)),

you have to make sure that the SERVICE account which is starting up the SQL Server service has the appropiate permissions on the network drive. Unless this can′be accomplished you can′t attach the database via network.

HTH, Jens Suessmeyer.

|||

Hi Jens,

The Service account has permissions on the network drive.

The problem is that SQL Express need full rights because of changing the permissions when attaching the db files.

First time the database could attached, but then the permissions are changed an the database could not attach again.

Dieter Pelz

Sunday, March 25, 2012

Attach an sql express edition database file to Sql Developer Edition instanse

Hi i have two version of SQL server express (with Visual Studio 2005) and developer edition i am trying to access an sql database file -created by the express edition integrated with Visual studio- using a developer edition instance can i just attach it and access it. and can i use BI and reporting services on that fileHi,

files created are by SQL Server Express are full featured data files. You can do everything with them that you do with those created by the othwer editions of SQL Server 2k5.

HTH; Jens K. Suessmeyer.

http://www.sqlserver2005.de

Attach Access Database to SQLServer

Attach Access Database to SQLServer?

It seems it is necessary if I want to put it on the internet through IIS.

I tried add data source through tools and tried most combinations, but nothing led in that direction.

I also did a search.

If not, the alternative is importing the data into sqlserver 2005. What worries me about this is incrementally importing new tables, views, etc., and new rows. Is this later possible?

dennist685

> It seems it is necessary if I want to put it on the internet through IIS.

No. My guess is that you might security issues. The account of which runs your statement (IIS account or ASP account, I guess) to have the rights to read your mdb file. Should be mentioned in numerous threads.

> If not, the alternative is importing the data into sqlserver 2005. What worries me about this is incrementally importing new tables, views, etc., and new rows. Is this later possible?

This would be my soulution. I would use SQL Server (maybe Express) to serve data.

You can access Access tables from within SQL Server queries. I would keep away from doing this for normal processing. For import of data, it is OK, I guess.

-- Sample to SELECT against object in access db:

EXEC sp_configure 'show advanced options', 1

GO

RECONFIGURE

GO

EXEC sp_configure 'Ad Hoc Distributed Queries', 1

GO

RECONFIGURE

GO

SELECT * FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0', 'x:\dir\mymdb.mdb';'admin';'',objectname)

GO

The sp_configure statments are neccessary because distributed queries are turned off by default for security reasons

Hope this helps

sql

Tuesday, March 20, 2012

Asymmetric communication from ms-sql-m protocol from an SQL Cluster

We are installing an application that requires access to the ms-sql-m
protocol (UDP/1434) as well as the data port (TCP/1433). The SQL Server
we are using is part of an N+1 cluster. The issue is that when we try
to communicate to the node instance xxx.xxx.123.226 recieve the
ms-sql-m response from the physical device ip xxx.xxx.123.222 causing
an asymmetric IP communication and the response appears to be dropped
by the request as one might expect. This causing our installation to
fail.
Has anyone run into this issue before, no of a common misconfiguration
in clustering services that leads to this, or aware of any documented
bug?
Thanks in advance for you posts.
Actually, this is typical of MS cluster applications. The response comes
back from the underlying NIC address, not the cluster virtual address. It
ain't a bug, it's a feature. Or at least it has always operated this way
and could therefore be considered a standard.
Sorry this isn't the answer you were looking for, but it is the way the
system actually works.
Geoff N. Hiten
Senior Database Administrator
Microsoft SQL Server MVP
<ddnash@.gmail.com> wrote in message
news:1165524543.657106.172130@.79g2000cws.googlegro ups.com...
> We are installing an application that requires access to the ms-sql-m
> protocol (UDP/1434) as well as the data port (TCP/1433). The SQL Server
> we are using is part of an N+1 cluster. The issue is that when we try
> to communicate to the node instance xxx.xxx.123.226 recieve the
> ms-sql-m response from the physical device ip xxx.xxx.123.222 causing
> an asymmetric IP communication and the response appears to be dropped
> by the request as one might expect. This causing our installation to
> fail.
> Has anyone run into this issue before, no of a common misconfiguration
> in clustering services that leads to this, or aware of any documented
> bug?
>
> Thanks in advance for you posts.
>
|||I found the following article that does acknowledge the issue and
states that MS has chosen not to address it at this point, but there
are a couple of workarounds.
http://blogs.msdn.com/sql_protocols/archive/2006/02/27/539706.aspx
Thanks for the post.
Geoff N. Hiten wrote:[vbcol=seagreen]
> Actually, this is typical of MS cluster applications. The response comes
> back from the underlying NIC address, not the cluster virtual address. It
> ain't a bug, it's a feature. Or at least it has always operated this way
> and could therefore be considered a standard.
> Sorry this isn't the answer you were looking for, but it is the way the
> system actually works.
> --
> Geoff N. Hiten
> Senior Database Administrator
> Microsoft SQL Server MVP
>
> <ddnash@.gmail.com> wrote in message
> news:1165524543.657106.172130@.79g2000cws.googlegro ups.com...
sql

Asymmetric communication from ms-sql-m protocol from an SQL Cluster

We are installing an application that requires access to the ms-sql-m
protocol (UDP/1434) as well as the data port (TCP/1433). The SQL Server
we are using is part of an N+1 cluster. The issue is that when we try
to communicate to the node instance xxx.xxx.123.226 recieve the
ms-sql-m response from the physical device ip xxx.xxx.123.222 causing
an asymmetric IP communication and the response appears to be dropped
by the request as one might expect. This causing our installation to
fail.
Has anyone run into this issue before, no of a common misconfiguration
in clustering services that leads to this, or aware of any documented
bug?
Thanks in advance for you posts.Actually, this is typical of MS cluster applications. The response comes
back from the underlying NIC address, not the cluster virtual address. It
ain't a bug, it's a feature. :) Or at least it has always operated this way
and could therefore be considered a standard.
Sorry this isn't the answer you were looking for, but it is the way the
system actually works.
--
Geoff N. Hiten
Senior Database Administrator
Microsoft SQL Server MVP
<ddnash@.gmail.com> wrote in message
news:1165524543.657106.172130@.79g2000cws.googlegroups.com...
> We are installing an application that requires access to the ms-sql-m
> protocol (UDP/1434) as well as the data port (TCP/1433). The SQL Server
> we are using is part of an N+1 cluster. The issue is that when we try
> to communicate to the node instance xxx.xxx.123.226 recieve the
> ms-sql-m response from the physical device ip xxx.xxx.123.222 causing
> an asymmetric IP communication and the response appears to be dropped
> by the request as one might expect. This causing our installation to
> fail.
> Has anyone run into this issue before, no of a common misconfiguration
> in clustering services that leads to this, or aware of any documented
> bug?
>
> Thanks in advance for you posts.
>|||I found the following article that does acknowledge the issue and
states that MS has chosen not to address it at this point, but there
are a couple of workarounds.
http://blogs.msdn.com/sql_protocols/archive/2006/02/27/539706.aspx
Thanks for the post.
Geoff N. Hiten wrote:
> Actually, this is typical of MS cluster applications. The response comes
> back from the underlying NIC address, not the cluster virtual address. It
> ain't a bug, it's a feature. :) Or at least it has always operated this way
> and could therefore be considered a standard.
> Sorry this isn't the answer you were looking for, but it is the way the
> system actually works.
> --
> Geoff N. Hiten
> Senior Database Administrator
> Microsoft SQL Server MVP
>
> <ddnash@.gmail.com> wrote in message
> news:1165524543.657106.172130@.79g2000cws.googlegroups.com...
> > We are installing an application that requires access to the ms-sql-m
> > protocol (UDP/1434) as well as the data port (TCP/1433). The SQL Server
> >
> > we are using is part of an N+1 cluster. The issue is that when we try
> > to communicate to the node instance xxx.xxx.123.226 recieve the
> > ms-sql-m response from the physical device ip xxx.xxx.123.222 causing
> > an asymmetric IP communication and the response appears to be dropped
> > by the request as one might expect. This causing our installation to
> > fail.
> >
> > Has anyone run into this issue before, no of a common misconfiguration
> > in clustering services that leads to this, or aware of any documented
> > bug?
> >
> >
> > Thanks in advance for you posts.
> >

Asymmetric communication from ms-sql-m protocol from an SQL Cluster

We are installing an application that requires access to the ms-sql-m
protocol (UDP/1434) as well as the data port (TCP/1433). The SQL Server
we are using is part of an N+1 cluster. The issue is that when we try
to communicate to the node instance xxx.xxx.123.226 recieve the
ms-sql-m response from the physical device ip xxx.xxx.123.222 causing
an asymmetric IP communication and the response appears to be dropped
by the request as one might expect. This causing our installation to
fail.
Has anyone run into this issue before, no of a common misconfiguration
in clustering services that leads to this, or aware of any documented
bug?
Thanks in advance for you posts.Actually, this is typical of MS cluster applications. The response comes
back from the underlying NIC address, not the cluster virtual address. It
ain't a bug, it's a feature. Or at least it has always operated this way
and could therefore be considered a standard.
Sorry this isn't the answer you were looking for, but it is the way the
system actually works.
Geoff N. Hiten
Senior Database Administrator
Microsoft SQL Server MVP
<ddnash@.gmail.com> wrote in message
news:1165524543.657106.172130@.79g2000cws.googlegroups.com...
> We are installing an application that requires access to the ms-sql-m
> protocol (UDP/1434) as well as the data port (TCP/1433). The SQL Server
> we are using is part of an N+1 cluster. The issue is that when we try
> to communicate to the node instance xxx.xxx.123.226 recieve the
> ms-sql-m response from the physical device ip xxx.xxx.123.222 causing
> an asymmetric IP communication and the response appears to be dropped
> by the request as one might expect. This causing our installation to
> fail.
> Has anyone run into this issue before, no of a common misconfiguration
> in clustering services that leads to this, or aware of any documented
> bug?
>
> Thanks in advance for you posts.
>|||I found the following article that does acknowledge the issue and
states that MS has chosen not to address it at this point, but there
are a couple of workarounds.
http://blogs.msdn.com/sql_protocols.../27/539706.aspx
Thanks for the post.
Geoff N. Hiten wrote:[vbcol=seagreen]
> Actually, this is typical of MS cluster applications. The response comes
> back from the underlying NIC address, not the cluster virtual address. It
> ain't a bug, it's a feature. Or at least it has always operated this w
ay
> and could therefore be considered a standard.
> Sorry this isn't the answer you were looking for, but it is the way the
> system actually works.
> --
> Geoff N. Hiten
> Senior Database Administrator
> Microsoft SQL Server MVP
>
> <ddnash@.gmail.com> wrote in message
> news:1165524543.657106.172130@.79g2000cws.googlegroups.com...

Monday, March 19, 2012

Assistance with selecting first visit record of patients

Hi all

I saw a similar query on another thread but was unable to use the answers to resolve my problem.

I have an access database with two tables - the first contains demographic data for patients (Initial visit table) and the second (followup visit) contains all visit records for these patients linked by a PID. Some of the data was entered retrospectively so the record number is not a reflection of date of visit. Have 25000 visits captured.

I need to devise a query to extract the first CD4 count (a blood result) available for each patient - cd4 not done on every visit. Have tried using:

SELECT InitialVisitID, VisitDatetime, CD4CountPercentage

FROM [FollowUpVisit] AS a

WHERE (((a.InitialVisitID)=(select top 1 InitialVisitID from [FollowUpVisit]b

where a.InitialVisitID = b.InitialVisitID

order by VisitDatetime desc)));

This initially generates a table with duplicates followed shortly thereafter by a warning that only one record can be returned by the subquery and then blanking out of all records in the query output.

Please help!

I believe you want something like this:

SELECT a.InitialVisitID, a.VisitDatetime, a.CD4CountPercentage

FROM FollowUpVisit a

inner join

(select Min(InitialVisitID) as InitialVisitID, VisitDatetime, CD4CountPercentage

from FollowUpVisit

group by InitialVisitID

) as b

on a.InitialVisitID = b.InitialVisitID

order by a.VisitDatetime desc

|||

Try:

SELECT InitialVisitID, VisitDatetime, CD4CountPercentage

FROM [FollowUpVisit] AS a

WHERE (((a.InitialVisitID)=(select top 1 InitialVisitID from [FollowUpVisit] b

where b.PID = a.PID

order by VisitDatetime desc)));

AMB

|||

Thanks for the quick response AMB

Your suggestion has the same result - except asks for the PID paramter to be entered.

Just for clarification InitialVisitID in this database is in fact the PID. So i tried it with changing PID to InitialVisitID but same outcome.

h

|||

Thanks for the response

For clarification the "InitialVisitId" is the PID - so selecting for min InitialVisitID does not work as every patient only has one InitialVisitID (is unique identifier and primary key). Your solution also gives a circular reference problem within the Selection list. Tried making it:

SELECT a.InitialVisitID, a.VisitDatetime, a.CD4CountPercentage
FROM FollowUpVisit a
inner join
(select Min(VisitDateTime) as VisitDateTime, InitialVisitID, CD4CountPercentage
from FollowUpVisit
group by InitialVisitID
) as b
on a.InitialVisitID = b.InitialVisitID
order by a.VisitDatetime desc

but got same problem

h

|||

Please, do not make us to guess your enviroment. Post some DDL, including constraints and indexes, sample data and expected result.

Can you post the error msg you are getting?. I do not think that (select top 1 c1, ..., cn from ... order by) can bring more than one row, without using keywords WITH TIES.

AMB

|||

I am confused by this table FollowUpVisit. If this was a Visit table, I might understand, but is the InitialVisit stored in the FollowUpVisit table?

And this seems to imply that you can have >1 InitialVisit?

In your query, be sure and use aliases for every column, just to be careful with the output:

SELECT a.InitialVisitID, a.VisitDatetime, a.CD4CountPercentage

FROM [FollowUpVisit] AS a

WHERE (((a.InitialVisitID)=(select top 1 b.InitialVisitID from [FollowUpVisit] b

where a.InitialVisitID = b.InitialVisitID

order by b.VisitDatetime desc)));

I agree with Hunchback, in that I don't know how that top 1 query can return > 1 row.

Sunday, March 11, 2012

Assigning User to a Database

Hi

I am using SQL SERVER 2000. Until now my application used the default user "sa", but now the illigal access to my database make me move to a more secure login.

i am new to this concept.

i need to create a login, which i am successful in creating, but my problem is

I need to allow only this user to access my database and no other user should login my database.

please can any one explain how to do this.

its very urgent.

regards

James Alvin

Noone is granted access to a database unless you allow it, so go ahead and create a user and give him the appropiate permissions on the database. Make in addition sure, that if you want to restrict the sysadmin users (which is by default the sa and the members of the sysadmin group, e.g. the local administrators) you will have to remove them from the groups / disable the sa account.

Jens K. Suessmeyer

http://www.sqlserver2005.de

|||

hi

how can we disable sa account in sql server 2000

|||

You can't disable sa on a SQL Server 2000 instance. Not in any way that would be supported. Some time ago, a few people hacked at the system tables and eventually removed sa but then they had continual problems, couldn't apply service packs and were on an unsupported system. So not in any way that would be supported or stable.

Another option, depending on your application, would be to use just Windows Authentication and use impersonation in your application to log in with just the one windows account you add to the users for this database.

Sysadmins will still be able to access that database though. If it's that critical to lock out everyone, you would want to look at auditing as well as explore third party options for encryption.

-Sue

.

|||

Yes, I ment dismanteling instead of disabling. What I do in reality is to give the sa a cryptic (long and non-guessable) password and lock this in the (virtual) safe. Noone should use that account beside emergencies (like locked accounts etc.) Then I create a new login which has the same rights but a non well-known name (like sa, everyone know that this is the system adminstrator and therefore you only have to guess the password as you already know the name). This account is then mainly used for tasks that cannot be done with the Windows authentication (like users which are not present in the AD). If you are able only use Windows authentication you can even discard this task.

Jens K. Suessmeyer

http://www.sqlserver2005.de

Assigning priority to users or logins

Is there a way in Sql ( 7 and 2000) where I can assign low
priorities to certain users? That would mean that they
would have the last access to resources. If a higher
priority user came along, that would get priority for
resources.
I havent seen anything but was wondering if there is
anything like that.
TIA,
Hack
Jack,
There's no such option in SQL Server, nor can you set priority for a connection.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"Jack A" <anonymous@.discussions.microsoft.com> wrote in message news:967a01c43386$8d1a45c0$a001280a@.phx.gbl...
> Is there a way in Sql ( 7 and 2000) where I can assign low
> priorities to certain users? That would mean that they
> would have the last access to resources. If a higher
> priority user came along, that would get priority for
> resources.
> I havent seen anything but was wondering if there is
> anything like that.
> TIA,
> Hack
|||Agree with Tibor, but just to add, Ken Henderson presented an extended
stored procedure called xp_setpriority, in his book, "The Guru's Guide to
SQL Server Stored Procedures, XML, and HTML". This xp can do what you are
after.
HTH,
Vyas, MVP (SQL Server)
http://vyaskn.tripod.com/
Is .NET important for a database professional?
http://vyaskn.tripod.com/poll.htm
"Jack A" <anonymous@.discussions.microsoft.com> wrote in message
news:967a01c43386$8d1a45c0$a001280a@.phx.gbl...
Is there a way in Sql ( 7 and 2000) where I can assign low
priorities to certain users? That would mean that they
would have the last access to resources. If a higher
priority user came along, that would get priority for
resources.
I havent seen anything but was wondering if there is
anything like that.
TIA,
Hack
|||Tibor, is your time off, or am I missing something :-) Sure, I had a late
night last night!
Vyas, MVP (SQL Server)
http://vyaskn.tripod.com/
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:e5t$1e4MEHA.3988@.TK2MSFTNGP09.phx.gbl...
Jack,
There's no such option in SQL Server, nor can you set priority for a
connection.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"Jack A" <anonymous@.discussions.microsoft.com> wrote in message
news:967a01c43386$8d1a45c0$a001280a@.phx.gbl...
> Is there a way in Sql ( 7 and 2000) where I can assign low
> priorities to certain users? That would mean that they
> would have the last access to resources. If a higher
> priority user came along, that would get priority for
> resources.
> I havent seen anything but was wondering if there is
> anything like that.
> TIA,
> Hack
|||Thats a shame. I hope they make that an enhancment in
later versions. I worked with Sybase and that is a really
useful feature. It prevents non technical (reporting)
users from bringing the machine down to its kness.

>--Original Message--
>Jack,
>There's no such option in SQL Server, nor can you set
priority for a connection.
>--
>Tibor Karaszi, SQL Server MVP
>http://www.karaszi.com/sqlserver/default.asp
>
>"Jack A" <anonymous@.discussions.microsoft.com> wrote in
message news:967a01c43386$8d1a45c0$a001280a@.phx.gbl...[vbcol=seagreen]
low[vbcol=seagreen]
is
>
>.
>

Assigning priority to users or logins

Is there a way in Sql ( 7 and 2000) where I can assign low
priorities to certain users? That would mean that they
would have the last access to resources. If a higher
priority user came along, that would get priority for
resources.
I havent seen anything but was wondering if there is
anything like that.
TIA,
HackJack,
There's no such option in SQL Server, nor can you set priority for a connection.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"Jack A" <anonymous@.discussions.microsoft.com> wrote in message news:967a01c43386$8d1a45c0$a001280a@.phx.gbl...
> Is there a way in Sql ( 7 and 2000) where I can assign low
> priorities to certain users? That would mean that they
> would have the last access to resources. If a higher
> priority user came along, that would get priority for
> resources.
> I havent seen anything but was wondering if there is
> anything like that.
> TIA,
> Hack|||Agree with Tibor, but just to add, Ken Henderson presented an extended
stored procedure called xp_setpriority, in his book, "The Guru's Guide to
SQL Server Stored Procedures, XML, and HTML". This xp can do what you are
after.
--
HTH,
Vyas, MVP (SQL Server)
http://vyaskn.tripod.com/
Is .NET important for a database professional?
http://vyaskn.tripod.com/poll.htm
"Jack A" <anonymous@.discussions.microsoft.com> wrote in message
news:967a01c43386$8d1a45c0$a001280a@.phx.gbl...
Is there a way in Sql ( 7 and 2000) where I can assign low
priorities to certain users? That would mean that they
would have the last access to resources. If a higher
priority user came along, that would get priority for
resources.
I havent seen anything but was wondering if there is
anything like that.
TIA,
Hack|||Tibor, is your time off, or am I missing something :-) Sure, I had a late
night last night!
--
Vyas, MVP (SQL Server)
http://vyaskn.tripod.com/
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:e5t$1e4MEHA.3988@.TK2MSFTNGP09.phx.gbl...
Jack,
There's no such option in SQL Server, nor can you set priority for a
connection.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"Jack A" <anonymous@.discussions.microsoft.com> wrote in message
news:967a01c43386$8d1a45c0$a001280a@.phx.gbl...
> Is there a way in Sql ( 7 and 2000) where I can assign low
> priorities to certain users? That would mean that they
> would have the last access to resources. If a higher
> priority user came along, that would get priority for
> resources.
> I havent seen anything but was wondering if there is
> anything like that.
> TIA,
> Hack|||Thats a shame. I hope they make that an enhancment in
later versions. I worked with Sybase and that is a really
useful feature. It prevents non technical (reporting)
users from bringing the machine down to its kness.
>--Original Message--
>Jack,
>There's no such option in SQL Server, nor can you set
priority for a connection.
>--
>Tibor Karaszi, SQL Server MVP
>http://www.karaszi.com/sqlserver/default.asp
>
>"Jack A" <anonymous@.discussions.microsoft.com> wrote in
message news:967a01c43386$8d1a45c0$a001280a@.phx.gbl...
>> Is there a way in Sql ( 7 and 2000) where I can assign
low
>> priorities to certain users? That would mean that they
>> would have the last access to resources. If a higher
>> priority user came along, that would get priority for
>> resources.
>> I havent seen anything but was wondering if there
is
>> anything like that.
>> TIA,
>> Hack
>
>.
>

Assigning priority to users or logins

Is there a way in Sql ( 7 and 2000) where I can assign low
priorities to certain users? That would mean that they
would have the last access to resources. If a higher
priority user came along, that would get priority for
resources.
I havent seen anything but was wondering if there is
anything like that.
TIA,
HackJack,
There's no such option in SQL Server, nor can you set priority for a connect
ion.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"Jack A" <anonymous@.discussions.microsoft.com> wrote in message news:967a01c43386$8d1a45c0$a
001280a@.phx.gbl...
> Is there a way in Sql ( 7 and 2000) where I can assign low
> priorities to certain users? That would mean that they
> would have the last access to resources. If a higher
> priority user came along, that would get priority for
> resources.
> I havent seen anything but was wondering if there is
> anything like that.
> TIA,
> Hack|||Agree with Tibor, but just to add, Ken Henderson presented an extended
stored procedure called xp_setpriority, in his book, "The Guru's Guide to
SQL Server Stored Procedures, XML, and HTML". This xp can do what you are
after.
--
HTH,
Vyas, MVP (SQL Server)
http://vyaskn.tripod.com/
Is .NET important for a database professional?
http://vyaskn.tripod.com/poll.htm
"Jack A" <anonymous@.discussions.microsoft.com> wrote in message
news:967a01c43386$8d1a45c0$a001280a@.phx.gbl...
Is there a way in Sql ( 7 and 2000) where I can assign low
priorities to certain users? That would mean that they
would have the last access to resources. If a higher
priority user came along, that would get priority for
resources.
I havent seen anything but was wondering if there is
anything like that.
TIA,
Hack|||Tibor, is your time off, or am I missing something :-) Sure, I had a late
night last night!
--
Vyas, MVP (SQL Server)
http://vyaskn.tripod.com/
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:e5t$1e4MEHA.3988@.TK2MSFTNGP09.phx.gbl...
Jack,
There's no such option in SQL Server, nor can you set priority for a
connection.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"Jack A" <anonymous@.discussions.microsoft.com> wrote in message
news:967a01c43386$8d1a45c0$a001280a@.phx.gbl...
> Is there a way in Sql ( 7 and 2000) where I can assign low
> priorities to certain users? That would mean that they
> would have the last access to resources. If a higher
> priority user came along, that would get priority for
> resources.
> I havent seen anything but was wondering if there is
> anything like that.
> TIA,
> Hack|||Thats a shame. I hope they make that an enhancment in
later versions. I worked with Sybase and that is a really
useful feature. It prevents non technical (reporting)
users from bringing the machine down to its kness.

>--Original Message--
>Jack,
>There's no such option in SQL Server, nor can you set
priority for a connection.
>--
>Tibor Karaszi, SQL Server MVP
>http://www.karaszi.com/sqlserver/default.asp
>
>"Jack A" <anonymous@.discussions.microsoft.com> wrote in
message news:967a01c43386$8d1a45c0$a001280a@.phx.gbl...
low[vbcol=seagreen]
is[vbcol=seagreen]
>
>.
>

Assigning Permissions!

Suppose a SQL Server 7.0 database table has, say, 9 columns
[Column1...Column9] & only 3 users can access this table. Each user
has a password. Assume that the passwords of the 3 users are 'pwd1',
'pwd2' & 'pwd3' (without the quotes).
I want that if the password is 'pwd1', then that user should be allowed
to access the records of the columns Column1, Column2 & Column3. If the
password is 'pwd2', then that user should be allowed to access the
records of the columns Column4, Column5 & Column6. If the password is
'pwd3', then that user should be allowed to access the records of the
columns Column7, Column8 & Column9.
Now is it possible to assign permissions to these 3 users column-wise
on such a table so that the first user can access the first 3 columns,
the second user can access the next 3 columns & the third user can
access the last 3 columns exisitng in that table? If so, how do I do
this?
Please note that by "access", I mean the user can do anything with the
records (edit them or delete them).
Thanks,
ArpanIt is possible to assign permissions on a per-column basis:
grant all on MyTable(MyCol1, MyCol2) to User1
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinpub.com
"Arpan" <arpan_de@.hotmail.com> wrote in message
news:1125796276.421444.185340@.g47g2000cwa.googlegroups.com...
> Suppose a SQL Server 7.0 database table has, say, 9 columns
> [Column1...Column9] & only 3 users can access this table. Each user
> has a password. Assume that the passwords of the 3 users are 'pwd1',
> 'pwd2' & 'pwd3' (without the quotes).
> I want that if the password is 'pwd1', then that user should be allowed
> to access the records of the columns Column1, Column2 & Column3. If the
> password is 'pwd2', then that user should be allowed to access the
> records of the columns Column4, Column5 & Column6. If the password is
> 'pwd3', then that user should be allowed to access the records of the
> columns Column7, Column8 & Column9.
> Now is it possible to assign permissions to these 3 users column-wise
> on such a table so that the first user can access the first 3 columns,
> the second user can access the next 3 columns & the third user can
> access the last 3 columns exisitng in that table? If so, how do I do
> this?
> Please note that by "access", I mean the user can do anything with the
> records (edit them or delete them).
> Thanks,
> Arpan
>

Assigning Permissions to a Database

I'm trying to grant a user full access to a database.
Although I've given this user the role of db_owner, he still doesnt have the
same access as ,for example, the "dbo" user.
When I look at the table permissions, the "dbo" user has everything selected
while my user has nothing selected. Do I have to go into each table and
manually assign these permissions or can I somhow apply all of the
permissions using the database roles?
Thanks!Db_owner role members and the 'dbo' user hare full permissions over all
objects in the database. There is no need to grant object permissions
because object permissions are not checked for db_owner role members.
Hope this helps.
Dan Guzman
SQL Server MVP
"newbie" <newbie@.sql.com> wrote in message
news:eI8ZEZ7ZGHA.4788@.TK2MSFTNGP02.phx.gbl...
> I'm trying to grant a user full access to a database.
> Although I've given this user the role of db_owner, he still doesnt have
> the same access as ,for example, the "dbo" user.
> When I look at the table permissions, the "dbo" user has everything
> selected while my user has nothing selected. Do I have to go into each
> table and manually assign these permissions or can I somhow apply all of
> the permissions using the database roles?
>
> Thanks!
>|||Besides, if a user belongs to db_owner role, he isn't dbo user. For example,
if that user creates a table, this table will be created as user.tabla but
if the dbo user creates a table, this table will be created as dbo.tabla .
Then, the user should create the table hardcoding the dbo.tabla
Mpia
"Dan Guzman" <guzmanda@.nospam-online.sbcglobal.net> wrote in message
news:%23W$9p9$ZGHA.5088@.TK2MSFTNGP03.phx.gbl...
> Db_owner role members and the 'dbo' user hare full permissions over all
> objects in the database. There is no need to grant object permissions
> because object permissions are not checked for db_owner role members.
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> "newbie" <newbie@.sql.com> wrote in message
> news:eI8ZEZ7ZGHA.4788@.TK2MSFTNGP02.phx.gbl...
>

Thursday, March 8, 2012

assign the Null value to a variable that is not a Variant data type.

Hello Everyone,

I trying to upgrade our Alpha 4v4 Dos Database to MS SQL 2000 with Access XP front end and I have four tables that won't let import my data into them. I keep recieveing a message that says "You tried to assign the Null value to a variable that is not a Variant data type. (Error 3162)"
What can I do to get rid of this stupid error, is it a problem with Access XP or SQL 2000.Sounds like an Access problem to me. Can you bypass Access and load the data directly into the server?|||Originally posted by Paul Young
Sounds like an Access problem to me. Can you bypass Access and load the data directly into the server?

I tried that and I get a MS Jet Database Engine Error when I tried the import function, I know that in Access you can append data in, can you do that in SQL. What I mean is could I just link my Alpha tables into the SQL Database and then try to Append/Insert into my SQL tables. SQL is all new to me and I'm still in the process of learning it and it is alot different then Alphav4 and Access 97 functionality that I'm used to.|||Originally posted by Paul Young
Sounds like an Access problem to me. Can you bypass Access and load the data directly into the server?

Paul,

I can't import, append or insert. But I can copy and paste my old records into the new tables with a few error messages and only 65000 at a time. I guess that something is better than nothing. If anyone has a better way, I'm always open to try something new.|||Yes, you can append data in SQL.

There would be many ways to do this. The very first one that comes to mind would be to use DTS if you are using SQL 7/2k. DTS can connect to a variety of data sources and allows you to transform the data on the fly.

Microsoft's Books Online has some good information on this.|||Originally posted by Paul Young
Yes, you can append data in SQL.

There would be many ways to do this. The very first one that comes to mind would be to use DTS if you are using SQL 7/2k. DTS can connect to a variety of data sources and allows you to transform the data on the fly.

Microsoft's Books Online has some good information on this.
I've been using the DTS function and that is what I first tried to do my import with or even append and I still get an error message. If I import the whole table it will only bring in the structure, no data i get an error on that. THen if I try to append the data I get a different error. I'll look online and see if I can findout what I'm doing wrong. Or I'll just cut and paste since that seems to work.|||What were your errors?

DTS can be used to import a structure and/or data. Often I have found it easyier to created a db, and then use DTS to suck strucutre and all. Once the data is in I can make modifications and move the data to it's ultimate home.|||Originally posted by Paul Young
What were your errors?

DTS can be used to import a structure and/or data. Often I have found it easyier to created a db, and then use DTS to suck strucutre and all. Once the data is in I can make modifications and move the data to it's ultimate home.

If I import my data from Alpha into Access 97 and then into SQL I get an Insert error on 4 of my tables for certain Date fields that says Data Over flow invaild character value for cast specification. If I try to go directly into Alpha 4v4 which are Dbase 5 tables it just won't do it. I get a ms jet vb error and it will import nothing at all. Atleast in access it will import 32 of 36 tables.|||It seems odd that you get a jet error. Are you using the dBase 5 driver or the ODBC driver?|||Originally posted by Paul Young
It seems odd that you get a jet error. Are you using the dBase 5 driver or the ODBC driver?

Ok I changed my data source to dbase III and I was able to import my data directly form Alpha 4v4, plus I'm starting to usnderstand this DTS function. I was wondering if I can use it to just append the tables, not create them everytime. I noticed that everytime I use the wizard it wants to create the table then import the data. I want it to just Append the data now that I have the tables in SQL so that I can refreash the old data with the new until I'm ready to run everything in SQL. Can i physically change the SQL startments for that DTS function and is that possible.|||You should be able to just append data, I don't have dBase 5 to test with but when I load a CSV file into an existing table I can select Transformations and choose Append rows to destination table. That should do it for you.|||Originally posted by Paul Young
You should be able to just append data, I don't have dBase 5 to test with but when I load a CSV file into an existing table I can select Transformations and choose Append rows to destination table. That should do it for you.

Ok I can't find what your talking about "Select transformations and choose append rows?", could you do me a favor and type out the steps that you use to see if I'm going in the right direction. Appending my Bbase file and your CSV file shouldn't be that different as far as the steps go. Thank you for your help.|||ADP is the answer to all your problems.

It only deals with SQL Server-- so its much simpler than what you're talkin about..

in access 2002, you can even create a linked server-- just like how you can link to a different db in a mdb..

of course, i think that you'll need to put drivers on the SQL Server-- but thats not that big of a deal..|||Originally posted by aaron_kempf
ADP is the answer to all your problems.

It only deals with SQL Server-- so its much simpler than what you're talkin about..

in access 2002, you can even create a linked server-- just like how you can link to a different db in a mdb..

of course, i think that you'll need to put drivers on the SQL Server-- but thats not that big of a deal..

ADP, could you tell me more about it, I typed it into the help file and nothing came up.|||1. Fire up DTS
2. Fill in the data source
3. fill in the data destination click "NEXT >"
4. On the "Select Source Tables and Views" panel click on the elips "..." under Transformations.
5. Click on the "Append rows to destination table" radio button and then click on "OK"
6. Back on the "Select Source Tables and Views" panel click on "Next >"
7. On the "Save, schecule , and replicate package" panel click on "Next >".
8. You should be able to take it from here.|||Originally posted by Paul Young
1. Fire up DTS
2. Fill in the data source
3. fill in the data destination click "NEXT >"
4. On the "Select Source Tables and Views" panel click on the elips "..." under Transformations.
5. Click on the "Append rows to destination table" radio button and then click on "OK"
6. Back on the "Select Source Tables and Views" panel click on "Next >"
7. On the "Save, schecule , and replicate package" panel click on "Next >".
8. You should be able to take it from here.

Step four was the one that I wasn't finidng, thank you so much Paul, I did get it to work and now I just need to adjust it so that I won't get any errors when I try to append a date field. Thanks

Wednesday, March 7, 2012

Assign Cube User Access Without Being Admin?

Is it possible to set up a "low-level" administrator account in Analysis Services that only allows a user to assign other users to a particular Role?

We have an enterprise app where users in the field will need to call a help desk to gain access to the cube, but we only want the help desk people to be able to perform that one function. We would like to avoid building a custom admin tool that provides the proper restriction. Ideally, the help desk would use SQL Server Management Studio to perform this specific task while prohibiting any other admin abilities. Is this possible?

--
Joe

No, unfortunatelly this is not possible. If you already have tool by which helpdesk can assign users to existing NT groups, then you can include these groups into SSAS roles - and helpdesk personell won't need any access to SSAS.

Saturday, February 25, 2012

Assembly permissions for accessing db

Hi there, I need to know how to set permissions for my assembly, since
it has to access a db and without permissions I could not distribute
it...
Can somebody explain it in a breath, please?This article gives a great overview of permissions.
http://www.codeproject.com/dotnet/CustomAssemblies.asp
I wish I had found this before I figured it out for myself.
Craig
"Tur" <cenci.cristiano@.gmail.com> wrote in message
news:1142245992.537105.156310@.j33g2000cwa.googlegroups.com...
> Hi there, I need to know how to set permissions for my assembly, since
> it has to access a db and without permissions I could not distribute
> it...
> Can somebody explain it in a breath, please?
>

Assembly access SQL DB don't work in Windows Server 2003

I try to get a custom assembly running with Reporting Services on Windows
Server 2003. The assembly must access a SQL Server database on the same SQL
Server as Reporting Services (localhost)
The assembly is written with VB .NET 2003. I have a assembly running
accessing a oracle db, this assembly works. So I know the security settings
etc. But the problem must be somewhere in detail. Therefore detailed answers
are appreciated.
The assembly works in the designer but not in Report Server on Windows
Server 2003. The assembly get accessed by the report server but obviously the
database connection failed.
Content bellow:
- rsvPolicy.config settings
- Code in assembly
- Additional information
Settings in the rsvPolicy.config:
<PermissionSet class="NamedPermissionSet"
version="1"
Name="MyNewFilePermissionSet"
Description="A special permission set that grants read access to my file.">
<IPermission class="System.Data.OleDb.OleDbPermission"
version="1"
Flags="Assertion, Execution"/>
</PermissionSet>
<PermissionSet class="NamedPermissionSet"
version="1"
Name="MyNewFilePermissionSet"
Description="A special permission set that grants read access to my file.">
<IPermission class="System.Security.PermissionSet"
version="1"
Flags="Assertion, Execution"/>
</PermissionSet>
Code in the assembly
' declaration of the security object in the header of the class
Private m_objSecurity As System.Security.PermissionSet
Private m_strConnString As String = _
"Provider=SQLOLEDB;Data Source=localhost;Initial
Catalog=MyDatabase;Integrated Security=SSPI;"
' function to open the db
<PermissionSet(SecurityAction.Assert, Unrestricted:=True)> _
Public Function OpenDBConn() As Boolean
m_objSecurity = New PermissionSet(PermissionState.Unrestricted)
m_objSecurity.Assert()
m_objDBConn = New
System.Data.OleDB.OleDbConnection(m_strConnString)
m_objDBConn.Open()
If m_objDBConn.State = ConnectionState.Open Then
InitSQLSRVConn = True
End IF
Addional information:
IDE: .net 2003
SQL Server 2000 SP3a
Windows Server 2003
Reporting Services Enterprise Edition + SP 2The assembly works on a Windows 2000 (SP4) Machine.
For this reason I assume that the problem is related to Windows 2003 Server,
or with SP2 from Reporting Services in relation with Windows 2003 Server.
Just for the sake of completnes bellowe the code meanwhile tried on both
Systems (W2K and W2K3 Srv)
--
In rssrvpoliciy.config:
--
<PermissionSet class="NamedPermissionSet"
version="1"
Name="MyNewFilePermissionSet"
Description="A special permission set that grants access to SQL Server
Database.">
<IPermission class="System.Data.OleDB.OleDbPermission"
version="1"
Flags="Assertion, Execution"/>
</PermissionSet>
'--
' In the Assembly
'--
Private m_objSecurity As System.Data.OleDB.OleDbPermission
Private m_strConnString As String = _
"Provider=SQLOLEDB;Data Source=localhost;Initial
Catalog=myDatabase;Integrated Security=SSPI;"
<PermissionSet(SecurityAction.Assert, Unrestricted:=True)> _
Public Function InitSQLSRVConn() As Boolean
m_objSecurity = New
System.Data.OleDb.OleDbPermission(PermissionState.Unrestricted)
m_objSecurity.Assert()
m_objDBConn = New
System.Data.OleDB.OleDbConnection(m_strConnString)
m_objDBConn.Open()
If m_objDBConn.State = ConnectionState.Open Then
InitSQLSRVConn = True
End if
"Dev Main" wrote:
> I try to get a custom assembly running with Reporting Services on Windows
> Server 2003. The assembly must access a SQL Server database on the same SQL
> Server as Reporting Services (localhost)
> The assembly is written with VB .NET 2003. I have a assembly running
> accessing a oracle db, this assembly works. So I know the security settings
> etc. But the problem must be somewhere in detail. Therefore detailed answers
> are appreciated.
> The assembly works in the designer but not in Report Server on Windows
> Server 2003. The assembly get accessed by the report server but obviously the
> database connection failed.
> Content bellow:
> - rsvPolicy.config settings
> - Code in assembly
> - Additional information
> Settings in the rsvPolicy.config:
> <PermissionSet class="NamedPermissionSet"
> version="1"
> Name="MyNewFilePermissionSet"
> Description="A special permission set that grants read access to my file.">
> <IPermission class="System.Data.OleDb.OleDbPermission"
> version="1"
> Flags="Assertion, Execution"/>
> </PermissionSet>
> <PermissionSet class="NamedPermissionSet"
> version="1"
> Name="MyNewFilePermissionSet"
> Description="A special permission set that grants read access to my file.">
> <IPermission class="System.Security.PermissionSet"
> version="1"
> Flags="Assertion, Execution"/>
> </PermissionSet>
>
> Code in the assembly
> ' declaration of the security object in the header of the class
> Private m_objSecurity As System.Security.PermissionSet
> Private m_strConnString As String = _
> "Provider=SQLOLEDB;Data Source=localhost;Initial
> Catalog=MyDatabase;Integrated Security=SSPI;"
> ' function to open the db
> <PermissionSet(SecurityAction.Assert, Unrestricted:=True)> _
> Public Function OpenDBConn() As Boolean
> m_objSecurity = New PermissionSet(PermissionState.Unrestricted)
> m_objSecurity.Assert()
> m_objDBConn = New
> System.Data.OleDB.OleDbConnection(m_strConnString)
> m_objDBConn.Open()
> If m_objDBConn.State = ConnectionState.Open Then
> InitSQLSRVConn = True
> End IF
>
> Addional information:
> IDE: .net 2003
> SQL Server 2000 SP3a
> Windows Server 2003
> Reporting Services Enterprise Edition + SP 2
>
>|||At least the version in my second post works correct. The reason for the
failure was a other mistake not related to reporting services at all.
"Dev Main" wrote:
> I try to get a custom assembly running with Reporting Services on Windows
> Server 2003. The assembly must access a SQL Server database on the same SQL
> Server as Reporting Services (localhost)
> The assembly is written with VB .NET 2003. I have a assembly running
> accessing a oracle db, this assembly works. So I know the security settings
> etc. But the problem must be somewhere in detail. Therefore detailed answers
> are appreciated.
> The assembly works in the designer but not in Report Server on Windows
> Server 2003. The assembly get accessed by the report server but obviously the
> database connection failed.
> Content bellow:
> - rsvPolicy.config settings
> - Code in assembly
> - Additional information
> Settings in the rsvPolicy.config:
> <PermissionSet class="NamedPermissionSet"
> version="1"
> Name="MyNewFilePermissionSet"
> Description="A special permission set that grants read access to my file.">
> <IPermission class="System.Data.OleDb.OleDbPermission"
> version="1"
> Flags="Assertion, Execution"/>
> </PermissionSet>
> <PermissionSet class="NamedPermissionSet"
> version="1"
> Name="MyNewFilePermissionSet"
> Description="A special permission set that grants read access to my file.">
> <IPermission class="System.Security.PermissionSet"
> version="1"
> Flags="Assertion, Execution"/>
> </PermissionSet>
>
> Code in the assembly
> ' declaration of the security object in the header of the class
> Private m_objSecurity As System.Security.PermissionSet
> Private m_strConnString As String = _
> "Provider=SQLOLEDB;Data Source=localhost;Initial
> Catalog=MyDatabase;Integrated Security=SSPI;"
> ' function to open the db
> <PermissionSet(SecurityAction.Assert, Unrestricted:=True)> _
> Public Function OpenDBConn() As Boolean
> m_objSecurity = New PermissionSet(PermissionState.Unrestricted)
> m_objSecurity.Assert()
> m_objDBConn = New
> System.Data.OleDB.OleDbConnection(m_strConnString)
> m_objDBConn.Open()
> If m_objDBConn.State = ConnectionState.Open Then
> InitSQLSRVConn = True
> End IF
>
> Addional information:
> IDE: .net 2003
> SQL Server 2000 SP3a
> Windows Server 2003
> Reporting Services Enterprise Edition + SP 2
>
>

ASPNETDB.MDF: The process cannot access the file because it is being used by another proce

Hi,

I'm trying to upload the ASPNETDB.MDF file to a hosting server via FTP, and everytime when it was uploaded half way(40% or 50%)

I would get an error message saying:

"550 ASPNETDB.MDF: The process cannot access the file because it is being used by another process"

and then the upload failed.

I'm using SQL Express. Does anybody know what's the cause?

Thanks a lot

It is because there are some users who are accessing the database through your web application. When the database is in process you cannot replace it. If you want to upload you need to make sure that no one is accessing your application. ASP.NET provides an easy way to disconnect all the clients to your web application with app_offline.htm file

Just create a simple html file with name app_offline. First upload this file to the web root of your application. Once this file was placed into the root directory, all clients will be disconnected and you can make some quick changes like replacing files etc, and after you finish replacing the files, delete the app_offline.htm file from the root.

You can also display a friend message in the app_offline like "Site under maintenance"

app_offline.htm file:

<html>
<body>
Site under maintenance!
</body>
</html>

Thanks

aspnetdb.mdf on Hosting Server ?

I have established roles to restrict access to the dataentry pages. The database is SQL Server which I've established on the hosting server. Security was previously maintained through~/app_data/aspnetdb.mdb (MS Access). It works, but isn't too stable, so I have modified the security to useSQL Server with an aspnetdb.mdf file, also located in the app_datafolder. Is this appropriate? Since it doesn't work, I assume not.

It's now my assumption that I need to setup a SQL Serverdatabase to support the security/roles. I have seen some reference tousing a script to build the aspnet.mdf on the hosting server. IfI do create such a database, is there anything special I need to do tohave my application read the aspnetdb? Do I need a connection stringin the membership and/or roleManager sections of my web.config.

A little guidance would be appreciated.

Thanks

http://www.eggheadcafe.com/articles/20060529.asp

|||

Thank you Dr. Bromberg for the extensive material you've pointed me to. I have downloaded the code and created a web site on my local Visual Studio server. I was able to run the SQL to create the two databases, Articles and aspnetdb (I think that's what I was suppose to do?). I have modifed the web.config to reflect the localhost information. When I run the Default.aspx I receive the following error:

Login failed for user 'sa'. The user is not associated with a trusted SQL Server connection.

OK, something's not setup properly. I attempted to run the SetupASPNetDatabase.aspx page and get absolutely nowhere, most likely because I have no idea what values to submit in the query boxes.

Bottom line is, I am not clear on what I need to do to get started. I am sure there is considerable information to glean from your article and sample web site. I would genuinely like to learn from it. The problem I seem to be having through is getting the security configured, which takes me back to square one with my initial question. I feel as if I am in the proverbial Catch 22. I need to get my own hosted security working and/or get your sample working before I can get either of them working.Crying

|||

To try and answer your question about setting up security with SQL Server...

1. Install the security schema (tables, procedures etc) on the SQL Server database. You can do this on your local machine by running aspnetregsql.exe (it's an installation wizard which comes with the ASP.Net framwork). If you have full control on your hosted server, then install the same way, otherwise your hosting provider will have to assist (some offer the installation as an option via their Control Panel). Note that the database doesn't have to be called ASPNETDB, you can install the security schema into an existing database of a different name.

2. Set up a connection string that points explicitly at the SQL Server database i.e. server name, database name, user id and password.

3. Point the Membership provider at this connection string.

I've put a specific example from one of my own web.config files using SQL Server - this is the connection string from mydevelopment environment (so uses localhost for the server name). Can you see that the Membership provider points at the "MainDB" connection string - which is pointing at the SQL Server?

The live web.config settings are very similar, except that instead of localhost I have the name of the server. Hope this helps!

<connectionStrings>

<addname="MainDB"connectionString="Server=localhost;Database=DB_138621;User ID=*****;Password=*****"providerName="System.Data.SqlClient" />

</connectionStrings>

--- snip -----

<membershipdefaultProvider="AspNetSqlMembershipProvider">

<providers>

<clear/>

<addname="AspNetSqlMembershipProvider"type="System.Web.Security.SqlMembershipProvider"connectionStringName="MainDB"minRequiredPasswordLength="5"minRequiredNonalphanumericCharacters="0"requiresQuestionAndAnswer="false"enablePasswordRetrieval="true"enablePasswordReset="false" applicationName="/"/>

</providers>

|||

Thank you Salmon. Using your example and wading through my web.config with fat fingers, I was finally able to make this work.Yes