Tuesday, March 27, 2012
Do I need two login ID's?
authentication. Then I down loaded MS JDBC, which requires Mixed mode
authentication, so I modifyed SQL Server to that. Now in Query analyzer, I
can log in to the db using windows authentication, but my user ID and
password don't work under SQL Server authentication. I need a login ID that
works under SQL Server authentication so I can login via JDBC. Do I need to
establish another ID for this? Can it be the same as the windows ID?
Thanks
JimJim Shaw wrote:
> In installed SQL Server under my Win2003 Server userID, specifying NT
> authentication. Then I down loaded MS JDBC, which requires Mixed
mode
> authentication, so I modifyed SQL Server to that. Now in Query
analyzer, I
> can log in to the db using windows authentication, but my user ID and
> password don't work under SQL Server authentication. I need a login
ID that
> works under SQL Server authentication so I can login via JDBC. Do I
need to
> establish another ID for this? Can it be the same as the windows ID?
The administrator user name is 'sa' and the default password is blank.
You can use that for SQL authentication. Or you can log in using
Windows authentication with jTDS or one of the commercial drivers.
Alin,
The jTDS Project.|||You can (should) create a new SQL login to be used for JDBC.
Make sure that the sa login has a strong password
(alphanumeric, special characters, no known words) and then
hide that one away somewhere. Then create a new SQL login
that you can use for your SQL login connections. You don't
want to use the sa login for applications or daily use due
to security risks. Give the new SQL login just the
permissions it needs for the application.
-Sue
On Tue, 8 Feb 2005 23:55:35 -0500, "Jim Shaw"
<jeshaw2@.comcast.net> wrote:
>In installed SQL Server under my Win2003 Server userID, specifying NT
>authentication. Then I down loaded MS JDBC, which requires Mixed mode
>authentication, so I modifyed SQL Server to that. Now in Query analyzer, I
>can log in to the db using windows authentication, but my user ID and
>password don't work under SQL Server authentication. I need a login ID tha
t
>works under SQL Server authentication so I can login via JDBC. Do I need t
o
>establish another ID for this? Can it be the same as the windows ID?
>Thanks
>Jim
>|||Thanks Sue;
A good answer to my question. It will work for applications having only one
common role for all users.
Now I'm wondering what the best practice is for multiple roles at the
application level of abstraction, e.g., A Compensation System having roles
of HR Clerk, Employee supervisor, Paymaster, Employee, etc.
1. I can do an application level login and manage the roles at the
application level; or,
2. Pass the authentication data in the application's connect to SQL Server
and manage the roles in the database; or,
3. Have multiple sub-applications, each with its own authentication, one for
each application defined role.
Any thoughts on this? I think I like #3 best. Makes development easier I
think. Maybe a combination of #2 & #3 ?
Thanks
Jim
"Sue Hoegemeier" <Sue_H@.nomail.please> wrote in message
news:21il019u4kgjrmj5khi7tcm37uqqg8t1hu@.
4ax.com...
> You can (should) create a new SQL login to be used for JDBC.
> Make sure that the sa login has a strong password
> (alphanumeric, special characters, no known words) and then
> hide that one away somewhere. Then create a new SQL login
> that you can use for your SQL login connections. You don't
> want to use the sa login for applications or daily use due
> to security risks. Give the new SQL login just the
> permissions it needs for the application.
> -Sue
> On Tue, 8 Feb 2005 23:55:35 -0500, "Jim Shaw"
> <jeshaw2@.comcast.net> wrote:
>
I[vbcol=seagreen]
that[vbcol=seagreen]
to[vbcol=seagreen]
>|||Not really. I just don't know enough specifics about your
application or security needs to say. At a high level, I'd
tend to go with first whatever provides the best security.
Next I'd go with ease of maintenance. I'd probably consider
ease of programming last. Years ago, programming everything
using the sa login and a blank password was the easiest for
development and used quite often. That certainly didn't work
out well. With business needs changing and issues such as
sarbanes oxley, I'd go more with whatever serves those areas
best.
-Sue
On Thu, 10 Feb 2005 11:32:04 -0500, "Jim Shaw"
<jeshaw2@.comcast.net> wrote:
>Thanks Sue;
>A good answer to my question. It will work for applications having only on
e
>common role for all users.
>Now I'm wondering what the best practice is for multiple roles at the
>application level of abstraction, e.g., A Compensation System having roles
>of HR Clerk, Employee supervisor, Paymaster, Employee, etc.
>1. I can do an application level login and manage the roles at the
>application level; or,
>2. Pass the authentication data in the application's connect to SQL Server
>and manage the roles in the database; or,
>3. Have multiple sub-applications, each with its own authentication, one fo
r
>each application defined role.
>Any thoughts on this? I think I like #3 best. Makes development easier I
>think. Maybe a combination of #2 & #3 ?
>Thanks
>Jim
>"Sue Hoegemeier" <Sue_H@.nomail.please> wrote in message
> news:21il019u4kgjrmj5khi7tcm37uqqg8t1hu@.
4ax.com...
>I
>that
>to
>
Do I need two login ID's?
authentication. Then I down loaded MS JDBC, which requires Mixed mode
authentication, so I modifyed SQL Server to that. Now in Query analyzer, I
can log in to the db using windows authentication, but my user ID and
password don't work under SQL Server authentication. I need a login ID that
works under SQL Server authentication so I can login via JDBC. Do I need to
establish another ID for this? Can it be the same as the windows ID?
Thanks
Jim
Jim Shaw wrote:
> In installed SQL Server under my Win2003 Server userID, specifying NT
> authentication. Then I down loaded MS JDBC, which requires Mixed
mode
> authentication, so I modifyed SQL Server to that. Now in Query
analyzer, I
> can log in to the db using windows authentication, but my user ID and
> password don't work under SQL Server authentication. I need a login
ID that
> works under SQL Server authentication so I can login via JDBC. Do I
need to
> establish another ID for this? Can it be the same as the windows ID?
The administrator user name is 'sa' and the default password is blank.
You can use that for SQL authentication. Or you can log in using
Windows authentication with jTDS or one of the commercial drivers.
Alin,
The jTDS Project.
|||You can (should) create a new SQL login to be used for JDBC.
Make sure that the sa login has a strong password
(alphanumeric, special characters, no known words) and then
hide that one away somewhere. Then create a new SQL login
that you can use for your SQL login connections. You don't
want to use the sa login for applications or daily use due
to security risks. Give the new SQL login just the
permissions it needs for the application.
-Sue
On Tue, 8 Feb 2005 23:55:35 -0500, "Jim Shaw"
<jeshaw2@.comcast.net> wrote:
>In installed SQL Server under my Win2003 Server userID, specifying NT
>authentication. Then I down loaded MS JDBC, which requires Mixed mode
>authentication, so I modifyed SQL Server to that. Now in Query analyzer, I
>can log in to the db using windows authentication, but my user ID and
>password don't work under SQL Server authentication. I need a login ID that
>works under SQL Server authentication so I can login via JDBC. Do I need to
>establish another ID for this? Can it be the same as the windows ID?
>Thanks
>Jim
>
|||Thanks Sue;
A good answer to my question. It will work for applications having only one
common role for all users.
Now I'm wondering what the best practice is for multiple roles at the
application level of abstraction, e.g., A Compensation System having roles
of HR Clerk, Employee supervisor, Paymaster, Employee, etc.
1. I can do an application level login and manage the roles at the
application level; or,
2. Pass the authentication data in the application's connect to SQL Server
and manage the roles in the database; or,
3. Have multiple sub-applications, each with its own authentication, one for
each application defined role.
Any thoughts on this? I think I like #3 best. Makes development easier I
think. Maybe a combination of #2 & #3 ?
Thanks
Jim
"Sue Hoegemeier" <Sue_H@.nomail.please> wrote in message
news:21il019u4kgjrmj5khi7tcm37uqqg8t1hu@.4ax.com... [vbcol=seagreen]
> You can (should) create a new SQL login to be used for JDBC.
> Make sure that the sa login has a strong password
> (alphanumeric, special characters, no known words) and then
> hide that one away somewhere. Then create a new SQL login
> that you can use for your SQL login connections. You don't
> want to use the sa login for applications or daily use due
> to security risks. Give the new SQL login just the
> permissions it needs for the application.
> -Sue
> On Tue, 8 Feb 2005 23:55:35 -0500, "Jim Shaw"
> <jeshaw2@.comcast.net> wrote:
I[vbcol=seagreen]
that[vbcol=seagreen]
to
>
|||Not really. I just don't know enough specifics about your
application or security needs to say. At a high level, I'd
tend to go with first whatever provides the best security.
Next I'd go with ease of maintenance. I'd probably consider
ease of programming last. Years ago, programming everything
using the sa login and a blank password was the easiest for
development and used quite often. That certainly didn't work
out well. With business needs changing and issues such as
sarbanes oxley, I'd go more with whatever serves those areas
best.
-Sue
On Thu, 10 Feb 2005 11:32:04 -0500, "Jim Shaw"
<jeshaw2@.comcast.net> wrote:
>Thanks Sue;
>A good answer to my question. It will work for applications having only one
>common role for all users.
>Now I'm wondering what the best practice is for multiple roles at the
>application level of abstraction, e.g., A Compensation System having roles
>of HR Clerk, Employee supervisor, Paymaster, Employee, etc.
>1. I can do an application level login and manage the roles at the
>application level; or,
>2. Pass the authentication data in the application's connect to SQL Server
>and manage the roles in the database; or,
>3. Have multiple sub-applications, each with its own authentication, one for
>each application defined role.
>Any thoughts on this? I think I like #3 best. Makes development easier I
>think. Maybe a combination of #2 & #3 ?
>Thanks
>Jim
>"Sue Hoegemeier" <Sue_H@.nomail.please> wrote in message
>news:21il019u4kgjrmj5khi7tcm37uqqg8t1hu@.4ax.com.. .
>I
>that
>to
>
Thursday, March 22, 2012
Do I have to install SQL Express?
I'm using the login/roles from Visual Studio 2005 in a website.
Is MS SQL Express mandatory? I already have MS SQL 2000 on the box. Is there any way to use that instead?
And if so, will I need to install MS SQL on the box I'm building the webiste on?
Thanks,
oilcan
You dont't have to have MS SQL 2005 express on your developer machine.
There is a build-in database schema behind the memebership function in ASP.NET 2.0. By default, if you have MS SQL 2005 express installed, you will get a database named as ASPNETDB.MDF installed under App_data folder in your application when you start using membership.
It would be easy to play with samples and test simple things. However, you need to know how to move this database to another database if you want to host your application somewhere. For example, SQL 2005 or SQL 2000.
You can mannuly install this database by using a tool in this location(most likely): C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_regsql.exe
You can pick where you want to install this database from this tool's interface.
After you install this database, you need change your connection string to point to your new database which includes all tables from ASPNETDB.MDF
You may need to read through some articles from searching this topic about membership.
This is just a start and you will get there. If you have problems, you will easily get answers from here.
Enjoy the journey.
|||Any idea where I might find some of those articles you mentioned? I don't feel real comfortable just experimenting, it is a live web server.|||Hello there:
This article talks about how to merge this ASPNETDB.MDF to your database.
http://aspnet.4guysfromrolla.com/articles/040506-1.aspx
Please follow this article, you will bepretty close. I think you better to test on your developer machine before you move on.
Also I came across this one from DisccountASP forum to show users how to move the starter kits to their server. Just for you as a reference.
http://community.discountasp.net/default.aspx?f=25&m=8785
Let me know if I can help more.
Limno
Monday, March 19, 2012
DMO and Windows Authentication
I'd like to use DMO to browse for databases on our SQL Servers using Windows Authneitication, rather than the SQL Server Authentication with login and password. Is this possible. This is the chuck of code that I've borrowed to do it so far. Can you make the Connection without the user and password?
Thanks,
Howie
Set SQLInstance = New SQLDMO.SQLServer
'Connect to the server by name (from global variable)
SQLInstance.Connect t_Server, t_User, t_Password
'Set the instance to that server ID
SQLSrvrID = SQLInstance.ConnectionID
Set SQLInstance = SQL2000.SQLServers.ItemById(SQLSrvrID)
'Display the available databases in a list box
ListDatabases.Clear
x = 1
For Each DB In SQLInstance.Databases
'Do not add system databases to the list
If Not SQLInstance.Databases(x).SystemObject Then
Me.ListDatabases.AddItem (SQLInstance.Databases(x).name)
End If
x = x + 1
Next
Just as an added question, does anyone know how you might go about exploring for data sources in VB, either with ADO or DMO? These would be the ODBC data source that you would create by:
Control Panel
Administrative Tools
Data Sources(ODBC)
Once in the Data Sources application, you pick a name for the data source, and then locate and define the server and associated database.
Thanks gain for any ideas,
Howie
|||I am using VB6 and I can easily get the username using the APIPrivate Declare Function GetUserName Lib "advapi32.dll" Alias "GetUserNameA" (ByVal lpBuffer As String, nSize As Long) As Long
|||' login using windows authentication
SQLInstance.LoginSecure = True
SQLInstance.Connect sServer
You don't need the API above.. thanks to Josh on his website for the answer!
Josh Fruits
http://www.programmers-corner.com
josh@.programmerscorner.com
Wednesday, March 7, 2012
'distributor_admin' is not defined as a remote login at the server
replication has been working properly. However, on the event log of the
active node, I saw the following error appeared every few minutes:
Could not connect to server 'REPLICATIONSQL\DISTRIBUTOR' because
'distributor_admin' is not defined as a remote login at the server. Verify
that you have specified the correct login name. [CLIENT: 10.1.1.28].
REPLICATIONSQL\DISTRIBUTOR is the name of the clustered instance configured
as a remote distributor and it is running on active node; the client
(10.1.1.28) is the passive node of the cluster. our environment is windows
2003 and sql server 2005 with sp2.
I wonder if anyone has any idea how to get rid of this error from my server.
Thanks in advance.
Zack.
I wonder if it is a managed news group by Microsoft, if not, someone knows
the managed news group since I was told that it is a managed group and
Microsoft will reply every post?
thanks for your kind reply because I really need to fix this error and don't
want to pay MS for this kind of error. We have paid too much to MS already
for support.
Zack.
m
"dp" wrote:
> We have set up one of the clustered instance as a remote distributor and
> replication has been working properly. However, on the event log of the
> active node, I saw the following error appeared every few minutes:
> Could not connect to server 'REPLICATIONSQL\DISTRIBUTOR' because
> 'distributor_admin' is not defined as a remote login at the server. Verify
> that you have specified the correct login name. [CLIENT: 10.1.1.28].
> REPLICATIONSQL\DISTRIBUTOR is the name of the clustered instance configured
> as a remote distributor and it is running on active node; the client
> (10.1.1.28) is the passive node of the cluster. our environment is windows
> 2003 and sql server 2005 with sp2.
> I wonder if anyone has any idea how to get rid of this error from my server.
> Thanks in advance.
> Zack.
>
distributor_admin
In my connection string as below , i have specified to use the user "sa"
but i am not sure why the error msg says login fail for distributor_admin
the server that i am connecting to is set up as a distirbutor on a local
publisher
strConn = "Provider=SQLOLEDB;Data Source=AAA;InititalCatalog
=master;uid=sa;pwd=XXXX"
appreciate any advice
tks & rdgs
Hi,
is there such a so called default password for this distributor_admin user ?
i can see that in the remote login , the sa is being mapped to the
distributor_admin when i tried to change it , it can be changed but once i
come it again it's still being mapped to distributor_admin
appreciate if someone could help
tks & rdgs
"maxzsim" wrote:
> Hi ,
> In my connection string as below , i have specified to use the user "sa"
> but i am not sure why the error msg says login fail for distributor_admin
> the server that i am connecting to is set up as a distirbutor on a local
> publisher
> strConn = "Provider=SQLOLEDB;Data Source=AAA;InititalCatalog
> =master;uid=sa;pwd=XXXX"
> appreciate any advice
> tks & rdgs
distributor_admin
In my connection string as below , i have specified to use the user "sa"
but i am not sure why the error msg says login fail for distributor_admin
the server that i am connecting to is set up as a distirbutor on a local
publisher
strConn = "Provider=SQLOLEDB;Data Source=AAA;InititalCatalog
=master;uid=sa;pwd=XXXX"
appreciate any advice
tks & rdgsHi,
is there such a so called default password for this distributor_admin user ?
i can see that in the remote login , the sa is being mapped to the
distributor_admin when i tried to change it , it can be changed but once i
come it again it's still being mapped to distributor_admin
appreciate if someone could help
tks & rdgs
"maxzsim" wrote:
> Hi ,
> In my connection string as below , i have specified to use the user "sa"
> but i am not sure why the error msg says login fail for distributor_admin
> the server that i am connecting to is set up as a distirbutor on a local
> publisher
> strConn = "Provider=SQLOLEDB;Data Source=AAA;InititalCatalog
> =master;uid=sa;pwd=XXXX"
> appreciate any advice
> tks & rdgs
distributor_admin
In my connection string as below , i have specified to use the user "sa"
but i am not sure why the error msg says login fail for distributor_admin
the server that i am connecting to is set up as a distirbutor on a local
publisher
strConn = "Provider=SQLOLEDB;Data Source=AAA;InititalCatalog
=master;uid=sa;pwd=XXXX"
appreciate any advice
tks & rdgsHi,
is there such a so called default password for this distributor_admin user ?
i can see that in the remote login , the sa is being mapped to the
distributor_admin when i tried to change it , it can be changed but once i
come it again it's still being mapped to distributor_admin
appreciate if someone could help
tks & rdgs
"maxzsim" wrote:
> Hi ,
> In my connection string as below , i have specified to use the user "sa"
> but i am not sure why the error msg says login fail for distributor_admin
> the server that i am connecting to is set up as a distirbutor on a local
> publisher
> strConn = "Provider=SQLOLEDB;Data Source=AAA;InititalCatalog
> =master;uid=sa;pwd=XXXX"
> appreciate any advice
> tks & rdgs
Friday, February 17, 2012
Distributed transaction error
I have written a procedure as below. I'm connected to a remote server server1 with valid
login id and permissions. When I run the procedure, I get the following error.
Server: Msg 7391, Level 16, State 1, Procedure procAddMissingAssociates, Line 09
The operation could not be performed because the OLE DB provider 'SQLOLEDB' does not support
distributed transactions.
[OLE/DB provider returned message: Distributed transaction error]
MSDTC is enabled on both the server, the local as well as the remote ones.
In the example below ASSOCIATE_ID in table2 is a primary key.
Please help,
Thanks
P.C. Vaidyanathan
CREATE PROCEDURE procAddMissingAssociates
AS
DECLARE @.USERID INT
BEGIN
SET TRANSACTION ISOLATION LEVEL repeatable read
BEGIN DISTRIBUTED TRANSACTION
SET XACT_ABORT ON
DECLARE MISSING_CURSOR CURSOR FOR
SELECT USR_ID
FROM SERVER1.DB1.DBO.TABLE1
WHERE USR_ID NOT IN (SELECT COLUMN2
FROM TABLE2)
OPEN MISSING_CURSOR
FETCH FROM MISSING_CURSOR
INTO @.USERID
WHILE (@.@.FETCH_STATUS=0)
BEGIN
INSERT INTO TABLE2 (ASSOCIATE_ID,
REDEEM_POINTS,
UPDATED_DATE)
VALUES (@.USERID,
0,
GETDATE())
FETCH NEXT FROM MISSING_CURSOR
INTO @.USERID
END
CLOSE MISSING_CURSOR
DEALLOCATE MISSING_CURSOR
COMMIT TRANSACTION
END
GOif your servers connect to each other trough the Firewall, check that all necessary ports are open in both directions. As usually it is 1433 and 134|||SERVER1.DB1.DBO.TABLE1
are both sql servers on the same network and starting as the same user? how are you authenticating with server1? linked server?
the above post is right, if you are on seperate networks, you'll need to have access to the other machine thru the firewall.
if you cant/dont want to setup a linked server, you can also use OPENROWSET in an encrypted view.
if thats not the problem.. from another forum
"To work around this problem, set XACT_ABORT to ON before the transaction. This causes SQL Server to terminate the surrounding transaction when an error occurs while processing the data modification statement. If SET XACT_ABORT is ON, SQL Server does not require nested transaction support from the OLE DB Provider. "
Also, try the following:
http://dbforums.com/t361216.html