Wednesday, March 7, 2012

error with sqlmaint.exe

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
hi,
gerryR wrote:
> 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.
this exception,
> error 18452 Login failed for user, 'domain\user' reason: Not
> associated with a trusted SQL Server connection.
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...b;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/de...maint_19ix.asp
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://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
|||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
"Andrea Montanari" <andrea.sqlDMO@.virgilio.it> wrote in message
news:4691c0Fa2i54U1@.individual.net...
> hi,
> gerryR wrote:
> this exception,
> 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...b;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/de...maint_19ix.asp
> --
> Andrea Montanari (Microsoft MVP - SQL Server)
> http://www.asql.biz/DbaMgr.shtmhttp://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
>
|||hi Gerry,
gerryR wrote:
> 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.
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.shtmhttp://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
|||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
"Andrea Montanari" <andrea.sqlDMO@.virgilio.it> wrote in message
news:46j2qqFbc3ebU1@.individual.net...
> hi Gerry,
> gerryR wrote:
> 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.shtmhttp://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
>
|||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
"gerryR" <gerryrminus@.thisgerryr.com> wrote in message
news:%230$BsIHPGHA.312@.TK2MSFTNGP12.phx.gbl...
> 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
>
>
> "Andrea Montanari" <andrea.sqlDMO@.virgilio.it> wrote in message
> news:46j2qqFbc3ebU1@.individual.net...
>
|||Thaks for the info Roger, I'll leave it the way it is so.
good analogy btw!
gerryR
"Roger Wolter[MSFT]" <rwolter@.online.microsoft.com> wrote in message
news:uq51f4HPGHA.3064@.TK2MSFTNGP10.phx.gbl...
> 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
> "gerryR" <gerryrminus@.thisgerryr.com> wrote in message
> news:%230$BsIHPGHA.312@.TK2MSFTNGP12.phx.gbl...
>

No comments:

Post a Comment