Showing posts with label installs. Show all posts
Showing posts with label installs. Show all posts

Thursday, March 22, 2012

Authentication mode / configuration issue

I'm having a little issue here with the MSSQLServer service which installs as part of the BlackBerry Enterprise Server. I can connect to it and run queries on it via Query Analyzer, but when I attempt to have a PHP script query against it, I get an error stating that the login failed because the user is not associated with a trusted SQL connection (severity 14). I've seen this before with other servers, and it was always a result of the server not being in mixed authentication mode.

So the question is this: How do I change it? There doesn't appear to be an Enterprise Manager or anything equivalent installed. Digging through the SQL Server folder, the only thing I saw that might have been useful is the SQL Server Network Utility located at Program Files\Microsoft SQL Server\80\Tools\Binn\SVRNETCN.EXE. This utility appears to only let me disable/enable protocols however, nothing about authentication.

I checked the Service Manager as well and didn't see anything of use there. Any ideas how I can do this?

It looks like I might have figured this one out. Using a copy of Enterprise Manager that I had installed on my machine, I added the MSSQL server installed on the BlackBerry server and changed its authentication properties that way. It looks like I'll have to tweak with some permissions for the individual databases but I think I've got it now.

Sunday, February 12, 2012

Attaching a database

We have an install created with Wise that installs the .net framework and
MSDE 2000 silently. Everything seems to work fine on the install of these
two packages.
After we install MSDE and we make sure the service has started, we need to
attach a database. We do that by executing a batch file that looks like
this:
osql -E -S(local)\<myinstance> -Q "sp_attach_db @.dbname = N'X2', @.filename1
= N'C:\Program Files\<appname>\x2.mdf', @.filename2 = N'C:\Program
Files\<appname>\x2.ldf'"
After all of this executes and I try to run my application it says that the
login fails because the sa password is incorrect. We are executing the MSDE
install setup via command line like:
SETUP INSTANCENAME="<myinstance>" SECURITYMODE=sql SAPWD="password" /qn
In order to get the app to run, we have to go doubleclick on the batch file
(shown above).
Any ideas why the execution of this batch file might not be working the
first time?
Thanks.
STom
hi Stom,
"STom" <stombiztalker@.hotmail.com> ha scritto nel messaggio
news:ejRS$aM9EHA.1300@.TK2MSFTNGP14.phx.gbl
> We have an install created with Wise that installs the .net framework
> and MSDE 2000 silently. Everything seems to work fine on the install
> of these two packages.
> After we install MSDE and we make sure the service has started, we
> need to attach a database. We do that by executing a batch file that
> looks like this:
> osql -E -S(local)\<myinstance> -Q "sp_attach_db @.dbname = N'X2',
> @.filename1 = N'C:\Program Files\<appname>\x2.mdf', @.filename2 =
> N'C:\Program Files\<appname>\x2.ldf'"
> After all of this executes and I try to run my application it says
> that the login fails because the sa password is incorrect. We are
> executing the MSDE install setup via command line like:
> SETUP INSTANCENAME="<myinstance>" SECURITYMODE=sql SAPWD="password"
> /qn
> In order to get the app to run, we have to go doubleclick on the
> batch file (shown above).
> Any ideas why the execution of this batch file might not be working
> the first time?
> Thanks.
> STom
I do no clearly understand your question... I prepared a .Bat file as
following,
osql -E -S(local) -Q"EXEC sp_attach_db @.dbname = N'a', @.filename1 =
N'C:\Programmi\Microsoft SQL Server\MSSQL\Data\a.mdf', @.filename2 =
N'C:\Programmi\Microsoft SQL Server\MSSQL\Data\a_log.LDF'" >c:\err.txt
and it works as expected...
you say
> After all of this executes and I try to run my application it says
> that the login fails because the sa password is incorrect.
and this seems to me not related with the execution of sp_attach_db, but
perhaps my english is to poor to understand your meaning...
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
|||Sorry for the confusion.
What I mean is that when that batch file is initially executed, by the Wise
utility, it does not appear to work, because when I run the app, it says if
fails for login 'sa'.
If I then go double-click on this batch file, and run the app, the app runs
fine.
Notice that the batch file does not set any passwords. It just attaches the
database, so I don't think the problem is with the login, its with the
attaching.
The question is, why would it not work if the Wise utility executes it?
STom
"Andrea Montanari" <andrea.sqlDMO@.virgilio.it> wrote in message
news:347n53F431apgU1@.individual.net...
> hi Stom,
> "STom" <stombiztalker@.hotmail.com> ha scritto nel messaggio
> news:ejRS$aM9EHA.1300@.TK2MSFTNGP14.phx.gbl
> I do no clearly understand your question... I prepared a .Bat file as
> following,
> osql -E -S(local) -Q"EXEC sp_attach_db @.dbname = N'a', @.filename1 =
> N'C:\Programmi\Microsoft SQL Server\MSSQL\Data\a.mdf', @.filename2 =
> N'C:\Programmi\Microsoft SQL Server\MSSQL\Data\a_log.LDF'" >c:\err.txt
> and it works as expected...
> you say
> and this seems to me not related with the execution of sp_attach_db, but
> perhaps my english is to poor to understand your meaning...
> --
> 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
>
|||hi,
"STom" <stombiztalker@.hotmail.com> ha scritto nel messaggio
news:%23KK1qaN9EHA.3616@.TK2MSFTNGP11.phx.gbl
> Sorry for the confusion.
> What I mean is that when that batch file is initially executed, by
> the Wise utility, it does not appear to work, because when I run the
> app, it says if fails for login 'sa'.
thi is another problem, I think...
osql -E indicates to log in MSDE using osql with a trusted WinNT
connections... and this is a thing..

> If I then go double-click on this batch file, and run the app, the
> app runs fine.
> Notice that the batch file does not set any passwords. It just
> attaches the database, so I don't think the problem is with the
> login, its with the attaching.
> The question is, why would it not work if the Wise utility executes
> it?
I actually do not know how Wise installs MSDE... perhaps the MSDE
installation is still pending and not finished... you've probably better
check this with Wise people...
sorry
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
|||STom wrote:
> What I mean is that when that batch file is initially executed, by the Wise
> utility, it does not appear to work, because when I run the app, it says if
> fails for login 'sa'.
>
Hi STom,
try to capture the output which is produced by the batch file
to see. Maybe osql is not yet in the path or something similar.
HTH,
Gerald