all groups > sql server msde > february 2006 >
You're in the

sql server msde

group:

error with sqlmaint.exe


error with sqlmaint.exe gerryR
2/24/2006 2:32:52 PM
sql server msde:
Hi All

I'm using McAfee ePO here which uses an MSDE database. I am trying to run
the recommended maintenance command on the DB but keep getting an error. It
seems to be related to the -U and -P account I'm using but I've tried every
variation of user and password it could be including domain admin + passwd.

Is there some way of adding a user to the DB? My only way of interacting
with it is through osql commands as far as I know.

The command I'm trying to run is:

sqlmaint -S SERVERNAME -U "domain\user" -P "password" -D
ePO_database_data -RebldIdx 15 -RmUnusedSpace 110 15 -UpdOptiStats 15

and the error that it's returning:

error 18452 Login failed for user, 'domain\user' reason: Not associated with
a trusted SQL Server connection.

I've tried several variations for the user and password but always get the
same result. I've read a bit about changing the authentication type for the
DB but A. I'm not sure if thats the right way to go and B. am afraid if I do
change something that ePO will not then be able to access the DB.

Thanks for the reply and if you can provide any assistance I'd really
appreciate it!

gerryR

Re: error with sqlmaint.exe Andrea Montanari
2/24/2006 7:25:05 PM
hi,
[quoted text, click to view]

this exception,
[quoted text, click to view]
usually is relative to a SQL Server instance only allowing trusted WinNT
authenticated connections (default setting for MSDE, you can actually modify
as reported in
http://support.microsoft.com/default.aspx?scid=kb;en-us;285097 ...
anyway, you do not have to provide SQL Server credentials for a standard SQL
Server authenticated connection in the form -U "domain\user" -P "domain
password" as SQL Server is unaware of your domain controller... for this
type of login you have to provide credentials regarding a registered SQL
Server login... ie: "sa" and it's password..
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/coprompt/cp_sqlmaint_19ix.asp
--
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtm http://italy.mvps.org
DbaMgr2k ver 0.18.0 - DbaMgr ver 0.62.0
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
--------- remove DMO to reply

Re: error with sqlmaint.exe gerryR
2/28/2006 12:00:00 AM
Hi Andrea

Thanks for your reply and apologies for not getting back sooner!

I changed the regiatry to allow mixed authentication and have got a bit
further. I am now getting a new error and was wondering if you know what
might be causing it (google has not returned much info on this!)

Using the same command as before but with "-U administrator -P password" I
now get the following error:

Logged on to SQL Server 'servername'
as 'administrator' <non-trusted>

error 21776: the name 'data_baseName' was not found in the database
collection. If the name is a qualified name use [] to seperate various
parts of the name and try again.

I've tried enclosing the database with the [ ] but to no avail. My database
name looks like

ePO_SERVER_data.mdf

Ive tried [ePO_SERVER_data] and [ePO_SERVER_data.mdf] but it doesn't do
anything.

I'd appreciate any help you can give
cheers
gerry


[quoted text, click to view]

Re: error with sqlmaint.exe Andrea Montanari
2/28/2006 12:00:00 AM
hi Gerry,
[quoted text, click to view]

you have to indicate the "logical" database name..
ePO_SERVER_data.mdf is the physical name of the primary data file..

try a
SELECT db.name
FROM master.dbo.sysdatabases db
WHERE db.filename LIKE '%ePO_SERVER_data.mdf'

to identify the correct logical database name you are interested with...
--
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtm http://italy.mvps.org
DbaMgr2k ver 0.18.0 - DbaMgr ver 0.62.0
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
--------- remove DMO to reply

Re: error with sqlmaint.exe Roger Wolter[MSFT]
2/28/2006 7:46:20 AM
The file won't get smaller unless you explicitly tell it to get smaller with
the shrink command. IMHO, shrink should only be used if you are desperate
for disk space and you know that your database isn't going to grow anymore.
Growing a database is reasonably expensive - as is shrinking it so
continuously growing and shrinking your database files is a waste of
resources. To me it's like when your mother comes to visit you add another
bedroom to your house and as soon as she leaves you tear it down. This only
makes sense if you know for sure you're never having visitors again. If
your mom is coming again next Christmas, you would probably be better off
leaving the spare room where it is - unless you really need the space for
the new hot-tub.

--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

[quoted text, click to view]

Re: error with sqlmaint.exe gerryR
2/28/2006 2:20:13 PM
Hi Andrea, thanks a million for that I didn't realise it had to be the
logical name and not the file name. The logical name is ePO_servername and
the command ran without error!! Thanks a million for your help!

One thing I did notice is the file size stayed the same. Is this normal? I
would have thought the "RmUnusedSpace" part would have freed up some space
and thus reduced the file size?

any way thanks again for all your help in solving my problem.
all the best
gerryR





[quoted text, click to view]

Re: error with sqlmaint.exe gerryR
2/28/2006 4:03:30 PM
Thaks for the info Roger, I'll leave it the way it is so.

good analogy btw!
gerryR



[quoted text, click to view]

AddThis Social Bookmark Button