Showing posts with label command. Show all posts
Showing posts with label command. Show all posts

Thursday, March 29, 2012

Can't connect as SA through ODBC manager...why?

Hi All,
I can connect to my MSDE server by logging in as SA from the command line
but not through the ODBC manager utility in windows. I need to setup system
DSNs for a few applications but can't because they require I use SQL
authentication. When I reach that step in the ODBC manager I type in SA and
the password and hit next I get a 18456 "login failed for sa" error. My
server is in mixed mode (I checked the registry), the domain admins group has
login privilages to MSDE, I have no firewall active on any NICs, and none of
my passwords contain a semicolon. I have no clue what I'm missing here. Can
some one point me in the right direction or link me to a good article on how
to setup system dsns through the command line?
Thanks,
Prikly Pete Peterson
MSDE can only be used as the source of the data. It's not licensed to host
Reporting Services (as we discuss in our Reporting Services
book --www.sqlreportingservices.net). Chapter 2 (freely downloadable from
the site) explains why.
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
"ComfortablySAD" <ComfortablySAD@.discussions.microsoft.com> wrote in message
news:32E686BF-63A6-4DFF-9A7D-A00E8B6CAE09@.microsoft.com...
> Hi All,
> I can connect to my MSDE server by logging in as SA from the command line
> but not through the ODBC manager utility in windows. I need to setup
> system
> DSNs for a few applications but can't because they require I use SQL
> authentication. When I reach that step in the ODBC manager I type in SA
> and
> the password and hit next I get a 18456 "login failed for sa" error. My
> server is in mixed mode (I checked the registry), the domain admins group
> has
> login privilages to MSDE, I have no firewall active on any NICs, and none
> of
> my passwords contain a semicolon. I have no clue what I'm missing here.
> Can
> some one point me in the right direction or link me to a good article on
> how
> to setup system dsns through the command line?
> Thanks,
> Prikly Pete Peterson
sql

Wednesday, March 7, 2012

Cannot Trap Specific Errors

I set up the following code to trap errors after each SQL command issued. I
n
the Error_Handler section, I populate an error table which gets exported to
Microsoft Access. Up until now it has been working, however, I got an error
:
"There is already an object named 'TempCalc010' in the database", which
stopped the program immediately and did not populate the error file. Is
there anyway to trap this error and populate the error file ?
Set @.iErr = @.@.Error
If @.iErr <> 0
Begin
Set @.vErrMess = '#50 Cannot update LSDC for TC FTF.'
GoTo Error_Handler
EndImplementing Error Handling with Stored Procedures
http://www.sommarskog.se/error-handling-II.html
Error Handling in SQL Server – a Background
http://www.sommarskog.se/error-handling-I.html
AMB
"rmcompute" wrote:

> I set up the following code to trap errors after each SQL command issued.
In
> the Error_Handler section, I populate an error table which gets exported t
o
> Microsoft Access. Up until now it has been working, however, I got an err
or:
> "There is already an object named 'TempCalc010' in the database", which
> stopped the program immediately and did not populate the error file. Is
> there anyway to trap this error and populate the error file ?
> Set @.iErr = @.@.Error
> If @.iErr <> 0
> Begin
> Set @.vErrMess = '#50 Cannot update LSDC for TC FTF.'
> GoTo Error_Handler
> End
>|||What is the code in the Error_Handler?
Arnie Rowland, YACE*
"To be successful, your heart must accompany your knowledge."
*Yet Another certification Exam
"rmcompute" <rmcompute@.discussions.microsoft.com> wrote in message
news:3F35FF3B-175C-4F4A-8E4D-DF9CD01D1429@.microsoft.com...
>I set up the following code to trap errors after each SQL command issued.
>In
> the Error_Handler section, I populate an error table which gets exported
> to
> Microsoft Access. Up until now it has been working, however, I got an
> error:
> "There is already an object named 'TempCalc010' in the database", which
> stopped the program immediately and did not populate the error file. Is
> there anyway to trap this error and populate the error file ?
> Set @.iErr = @.@.Error
> If @.iErr <> 0
> Begin
> Set @.vErrMess = '#50 Cannot update LSDC for TC FTF.'
> GoTo Error_Handler
> End
>|||Exit_Procedure:
Return @.iErr
Error_Handler:
SELECT @.vErrDesc = description
FROM master.dbo.sysmessages
WHERE error = @.iErr
Set @.vErrNumMess = 'Sys #:' + RTrim(Cast(@.iErr as nvarchar(10))) + ' Sys
Desc:' +
RTrim(@.vErrDesc) + ' Prog Desc:' + RTrim(@.vErrMess)
Insert
SvcReports.dbo. tblSRProcessErrors(SysRec,Program,ErrorC
ode,SysDesc,ProgDesc)
Values('B','u_spSRCreateActualData',@.iEr
r,@.vErrDesc,@.vErrMess)
Raiserror(@.vErrNumMess,16,1,5) With Log
Goto Exit_Procedure
Go
"Arnie Rowland" wrote:

> What is the code in the Error_Handler?
> --
> Arnie Rowland, YACE*
> "To be successful, your heart must accompany your knowledge."
> *Yet Another certification Exam
>
> "rmcompute" <rmcompute@.discussions.microsoft.com> wrote in message
> news:3F35FF3B-175C-4F4A-8E4D-DF9CD01D1429@.microsoft.com...
>
>|||Where is TempCalc010 created/used/accessed?
Arnie Rowland, YACE*
"To be successful, your heart must accompany your knowledge."
*Yet Another certification Exam
"rmcompute" <rmcompute@.discussions.microsoft.com> wrote in message
news:513BE8FE-5592-45AF-B4F8-4506E67A7909@.microsoft.com...
> Exit_Procedure:
> Return @.iErr
> Error_Handler:
> SELECT @.vErrDesc = description
> FROM master.dbo.sysmessages
> WHERE error = @.iErr
> Set @.vErrNumMess = 'Sys #:' + RTrim(Cast(@.iErr as nvarchar(10))) + '
> Sys
> Desc:' +
> RTrim(@.vErrDesc) + ' Prog Desc:' + RTrim(@.vErrMess)
> Insert
> SvcReports.dbo. tblSRProcessErrors(SysRec,Program,ErrorC
ode,SysDesc,ProgDes
c)
> Values('B','u_spSRCreateActualData',@.iEr
r,@.vErrDesc,@.vErrMess)
> Raiserror(@.vErrNumMess,16,1,5) With Log
> Goto Exit_Procedure
> Go
> "Arnie Rowland" wrote:
>|||It exists in the first part of the program:
SELECT Fielda, Fieldb, Fieldc ...
INTO TempCalc010
From TempCalc005
I can prevent this error by checking if the file exists and then deleting
it before
running this step, but my question was, are there certain errors that
@.@.Error
does not catch and if so, how are those errors trapped ?
"Arnie Rowland" wrote:

> Where is TempCalc010 created/used/accessed?
> --
> Arnie Rowland, YACE*
> "To be successful, your heart must accompany your knowledge."
> *Yet Another certification Exam
>
> "rmcompute" <rmcompute@.discussions.microsoft.com> wrote in message
> news:513BE8FE-5592-45AF-B4F8-4506E67A7909@.microsoft.com...
>
>|||Yes, there are certain errors that cause an procedrue 'abort', and any error
handling code will be missed. For a better analysis of the issues, Refer
back to the articles taht Alejandro offered.
Arnie Rowland, YACE*
"To be successful, your heart must accompany your knowledge."
*Yet Another certification Exam
"rmcompute" <rmcompute@.discussions.microsoft.com> wrote in message
news:1E0C0080-6A0C-4BEB-8071-47F56FEED9E8@.microsoft.com...
> It exists in the first part of the program:
> SELECT Fielda, Fieldb, Fieldc ...
> INTO TempCalc010
> From TempCalc005
> I can prevent this error by checking if the file exists and then deleting
> it before
> running this step, but my question was, are there certain errors that
> @.@.Error
> does not catch and if so, how are those errors trapped ?
>
> "Arnie Rowland" wrote:
>|||Thank you.
"Alejandro Mesa" wrote:
> Implementing Error Handling with Stored Procedures
> http://www.sommarskog.se/error-handling-II.html
> Error Handling in SQL Server – a Background
> http://www.sommarskog.se/error-handling-I.html
>
> AMB
> "rmcompute" wrote:
>|||Ok. Thank you.
"Arnie Rowland" wrote:

> Yes, there are certain errors that cause an procedrue 'abort', and any err
or
> handling code will be missed. For a better analysis of the issues, Refer
> back to the articles taht Alejandro offered.
> --
> Arnie Rowland, YACE*
> "To be successful, your heart must accompany your knowledge."
> *Yet Another certification Exam
>
> "rmcompute" <rmcompute@.discussions.microsoft.com> wrote in message
> news:1E0C0080-6A0C-4BEB-8071-47F56FEED9E8@.microsoft.com...
>
>

Friday, February 24, 2012

Cannot shrink log file more than 2GB in small database

Hi2all,
I have some trouble with shrinking log file. No more user is connected
on this database. According to dbcc loginfo command log file is just
made up with active log. Here is the result
FileId_FileSize_____ StartOffset FSeqNo Status
Parity CreateLSN
2 1186201600 8192 15 2 128 0
2 1186201600 1186209792 16
2 64 0
I don't know why it remains so much space in active log because no
transaction is applied.
Can someone help me ?
Mo
--
Mo
Posted via http://dbforums.comSee
http://support.microsoft.com/default.aspx?scid=kb;en-
us;272318
http://support.microsoft.com/default.aspx?scid=kb;en-
us;256650
(and the references at the botom)
Do you have the database in full recovery mode and are you
taking log backups
If yes and no then set it to simple and read about backup
strategies in bol.

Cannot shrink log file

Hello
I am using this command to shrink log files because the size of log files is
going to double from data files and taking all space but i am getting this
message so help me how can i stop these process and what is the save way to
save my data also.
use BygTest
go
exec sp_helpfile
go
dbcc shrinkfile(MBYGDB_log, 10)
go
Message is!
Cannot shrink log file 2 (MBYDB_Log) because all logical log files are in use.
Best regards,
--
Olav
Click SoftTo shrink the log file I use the following:
USE BygTest
CHECKPOINT
CHECKPOINT
CHECKPOINT
CHECKPOINT
CHECKPOINT
BACKUP LOG BygTest WITH TRUNCATE_ONLY
dbcc shrinkfile (MBYGDB_log,10)
but in reference to the error message, I don't know the reason :-(
good luck
Javi
"Olav" <Olav@.discussions.microsoft.com> escribió en el mensaje
news:8090B57B-7613-491E-836D-1F058B4C754F@.microsoft.com...
> Hello
> I am using this command to shrink log files because the size of log files
> is
> going to double from data files and taking all space but i am getting this
> message so help me how can i stop these process and what is the save way
> to
> save my data also.
> use BygTest
> go
> exec sp_helpfile
> go
> dbcc shrinkfile(MBYGDB_log, 10)
> go
> Message is!
> Cannot shrink log file 2 (MBYDB_Log) because all logical log files are in
> use.
> Best regards,
> --
> Olav
> Click Soft|||Thanks for good tip. i have one last question in this regards that if size of
my data file is 2 124 876 and size of log file is 4 248 987 and i shrink it
to for example 10 424 then what is effect on the database data?
--
Olav
Click Soft
"Javi" wrote:
> To shrink the log file I use the following:
> USE BygTest
> CHECKPOINT
> CHECKPOINT
> CHECKPOINT
> CHECKPOINT
> CHECKPOINT
> BACKUP LOG BygTest WITH TRUNCATE_ONLY
> dbcc shrinkfile (MBYGDB_log,10)
> but in reference to the error message, I don't know the reason :-(
> good luck
> Javi
> "Olav" <Olav@.discussions.microsoft.com> escribió en el mensaje
> news:8090B57B-7613-491E-836D-1F058B4C754F@.microsoft.com...
> > Hello
> > I am using this command to shrink log files because the size of log files
> > is
> > going to double from data files and taking all space but i am getting this
> > message so help me how can i stop these process and what is the save way
> > to
> > save my data also.
> >
> > use BygTest
> > go
> >
> > exec sp_helpfile
> > go
> >
> > dbcc shrinkfile(MBYGDB_log, 10)
> > go
> >
> > Message is!
> > Cannot shrink log file 2 (MBYDB_Log) because all logical log files are in
> > use.
> >
> > Best regards,
> >
> > --
> > Olav
> > Click Soft
>
>|||Olav
If don't carry about the data then set your database to SIMPLE recovery
mode rather FULL .
With FULL recovery mode you will have ( in order to manage the LOG's size
and not to lose the data) BACKUP LOG file.
"Olav" <Olav@.discussions.microsoft.com> wrote in message
news:4C5ED48E-DFF3-4C76-864A-71AA9B83B56C@.microsoft.com...
> Thanks for good tip. i have one last question in this regards that if size
of
> my data file is 2 124 876 and size of log file is 4 248 987 and i shrink
it
> to for example 10 424 then what is effect on the database data?
> --
> Olav
> Click Soft
>
> "Javi" wrote:
> > To shrink the log file I use the following:
> >
> > USE BygTest
> > CHECKPOINT
> > CHECKPOINT
> > CHECKPOINT
> > CHECKPOINT
> > CHECKPOINT
> > BACKUP LOG BygTest WITH TRUNCATE_ONLY
> > dbcc shrinkfile (MBYGDB_log,10)
> >
> > but in reference to the error message, I don't know the reason :-(
> >
> > good luck
> >
> > Javi
> >
> > "Olav" <Olav@.discussions.microsoft.com> escribi? en el mensaje
> > news:8090B57B-7613-491E-836D-1F058B4C754F@.microsoft.com...
> > > Hello
> > > I am using this command to shrink log files because the size of log
files
> > > is
> > > going to double from data files and taking all space but i am getting
this
> > > message so help me how can i stop these process and what is the save
way
> > > to
> > > save my data also.
> > >
> > > use BygTest
> > > go
> > >
> > > exec sp_helpfile
> > > go
> > >
> > > dbcc shrinkfile(MBYGDB_log, 10)
> > > go
> > >
> > > Message is!
> > > Cannot shrink log file 2 (MBYDB_Log) because all logical log files are
in
> > > use.
> > >
> > > Best regards,
> > >
> > > --
> > > Olav
> > > Click Soft
> >
> >
> >|||The data will be still there, but you will be not able to undo changes in
the database, I mean, if you at 7:00 has a job that loads data in the
database and at 10:00 other job deletes some registers, using the log file
you can undo these, but if the data you have is good for you, you don't want
undo the changes, then you don't need to maintain the log file info in order
to undo these changes. Use backup to maintain safe your data. It's better.
HTH
Javi
"Olav" <Olav@.discussions.microsoft.com> escribió en el mensaje
news:4C5ED48E-DFF3-4C76-864A-71AA9B83B56C@.microsoft.com...
> Thanks for good tip. i have one last question in this regards that if size
> of
> my data file is 2 124 876 and size of log file is 4 248 987 and i shrink
> it
> to for example 10 424 then what is effect on the database data?
> --
> Olav
> Click Soft
>
> "Javi" wrote:
>> To shrink the log file I use the following:
>> USE BygTest
>> CHECKPOINT
>> CHECKPOINT
>> CHECKPOINT
>> CHECKPOINT
>> CHECKPOINT
>> BACKUP LOG BygTest WITH TRUNCATE_ONLY
>> dbcc shrinkfile (MBYGDB_log,10)
>> but in reference to the error message, I don't know the reason :-(
>> good luck
>> Javi
>> "Olav" <Olav@.discussions.microsoft.com> escribió en el mensaje
>> news:8090B57B-7613-491E-836D-1F058B4C754F@.microsoft.com...
>> > Hello
>> > I am using this command to shrink log files because the size of log
>> > files
>> > is
>> > going to double from data files and taking all space but i am getting
>> > this
>> > message so help me how can i stop these process and what is the save
>> > way
>> > to
>> > save my data also.
>> >
>> > use BygTest
>> > go
>> >
>> > exec sp_helpfile
>> > go
>> >
>> > dbcc shrinkfile(MBYGDB_log, 10)
>> > go
>> >
>> > Message is!
>> > Cannot shrink log file 2 (MBYDB_Log) because all logical log files are
>> > in
>> > use.
>> >
>> > Best regards,
>> >
>> > --
>> > Olav
>> > Click Soft
>>

Cannot shrink log file

Hello
I am using this command to shrink log files because the size of log files is
going to double from data files and taking all space but i am getting this
message so help me how can i stop these process and what is the save way to
save my data also.
use BygTest
go
exec sp_helpfile
go
dbcc shrinkfile(MBYGDB_log, 10)
go
Message is!
Cannot shrink log file 2 (MBYDB_Log) because all logical log files are in use.
Best regards,
Olav
Click Soft
To shrink the log file I use the following:
USE BygTest
CHECKPOINT
CHECKPOINT
CHECKPOINT
CHECKPOINT
CHECKPOINT
BACKUP LOG BygTest WITH TRUNCATE_ONLY
dbcc shrinkfile (MBYGDB_log,10)
but in reference to the error message, I don't know the reason :-(
good luck
Javi
"Olav" <Olav@.discussions.microsoft.com> escribi en el mensaje
news:8090B57B-7613-491E-836D-1F058B4C754F@.microsoft.com...
> Hello
> I am using this command to shrink log files because the size of log files
> is
> going to double from data files and taking all space but i am getting this
> message so help me how can i stop these process and what is the save way
> to
> save my data also.
> use BygTest
> go
> exec sp_helpfile
> go
> dbcc shrinkfile(MBYGDB_log, 10)
> go
> Message is!
> Cannot shrink log file 2 (MBYDB_Log) because all logical log files are in
> use.
> Best regards,
> --
> Olav
> Click Soft
|||Thanks for good tip. i have one last question in this regards that if size of
my data file is 2 124 876 and size of log file is 4 248 987 and i shrink it
to for example 10 424 then what is effect on the database data?
Olav
Click Soft
"Javi" wrote:

> To shrink the log file I use the following:
> USE BygTest
> CHECKPOINT
> CHECKPOINT
> CHECKPOINT
> CHECKPOINT
> CHECKPOINT
> BACKUP LOG BygTest WITH TRUNCATE_ONLY
> dbcc shrinkfile (MBYGDB_log,10)
> but in reference to the error message, I don't know the reason :-(
> good luck
> Javi
> "Olav" <Olav@.discussions.microsoft.com> escribió en el mensaje
> news:8090B57B-7613-491E-836D-1F058B4C754F@.microsoft.com...
>
>
|||Olav
If don't carry about the data then set your database to SIMPLE recovery
mode rather FULL .
With FULL recovery mode you will have ( in order to manage the LOG's size
and not to lose the data) BACKUP LOG file.
"Olav" <Olav@.discussions.microsoft.com> wrote in message
news:4C5ED48E-DFF3-4C76-864A-71AA9B83B56C@.microsoft.com...
> Thanks for good tip. i have one last question in this regards that if size
of
> my data file is 2 124 876 and size of log file is 4 248 987 and i shrink
it[vbcol=seagreen]
> to for example 10 424 then what is effect on the database data?
> --
> Olav
> Click Soft
>
> "Javi" wrote:
files[vbcol=seagreen]
this[vbcol=seagreen]
way[vbcol=seagreen]
in[vbcol=seagreen]
|||The data will be still there, but you will be not able to undo changes in
the database, I mean, if you at 7:00 has a job that loads data in the
database and at 10:00 other job deletes some registers, using the log file
you can undo these, but if the data you have is good for you, you don't want
undo the changes, then you don't need to maintain the log file info in order
to undo these changes. Use backup to maintain safe your data. It's better.
HTH
Javi
"Olav" <Olav@.discussions.microsoft.com> escribi en el mensaje
news:4C5ED48E-DFF3-4C76-864A-71AA9B83B56C@.microsoft.com...[vbcol=seagreen]
> Thanks for good tip. i have one last question in this regards that if size
> of
> my data file is 2 124 876 and size of log file is 4 248 987 and i shrink
> it
> to for example 10 424 then what is effect on the database data?
> --
> Olav
> Click Soft
>
> "Javi" wrote:

Cannot shrink log file

Hello
I am using this command to shrink log files because the size of log files is
going to double from data files and taking all space but i am getting this
message so help me how can i stop these process and what is the save way to
save my data also.
use BygTest
go
exec sp_helpfile
go
dbcc shrinkfile(MBYGDB_log, 10)
go
Message is!
Cannot shrink log file 2 (MBYDB_Log) because all logical log files are in us
e.
Best regards,
Olav
Click SoftTo shrink the log file I use the following:
USE BygTest
CHECKPOINT
CHECKPOINT
CHECKPOINT
CHECKPOINT
CHECKPOINT
BACKUP LOG BygTest WITH TRUNCATE_ONLY
dbcc shrinkfile (MBYGDB_log,10)
but in reference to the error message, I don't know the reason :-(
good luck
Javi
"Olav" <Olav@.discussions.microsoft.com> escribi en el mensaje
news:8090B57B-7613-491E-836D-1F058B4C754F@.microsoft.com...
> Hello
> I am using this command to shrink log files because the size of log files
> is
> going to double from data files and taking all space but i am getting this
> message so help me how can i stop these process and what is the save way
> to
> save my data also.
> use BygTest
> go
> exec sp_helpfile
> go
> dbcc shrinkfile(MBYGDB_log, 10)
> go
> Message is!
> Cannot shrink log file 2 (MBYDB_Log) because all logical log files are in
> use.
> Best regards,
> --
> Olav
> Click Soft|||Thanks for good tip. i have one last question in this regards that if size o
f
my data file is 2 124 876 and size of log file is 4 248 987 and i shrink it
to for example 10 424 then what is effect on the database data?
Olav
Click Soft
"Javi" wrote:

> To shrink the log file I use the following:
> USE BygTest
> CHECKPOINT
> CHECKPOINT
> CHECKPOINT
> CHECKPOINT
> CHECKPOINT
> BACKUP LOG BygTest WITH TRUNCATE_ONLY
> dbcc shrinkfile (MBYGDB_log,10)
> but in reference to the error message, I don't know the reason :-(
> good luck
> Javi
> "Olav" <Olav@.discussions.microsoft.com> escribió en el mensaje
> news:8090B57B-7613-491E-836D-1F058B4C754F@.microsoft.com...
>
>|||Olav
If don't carry about the data then set your database to SIMPLE recovery
mode rather FULL .
With FULL recovery mode you will have ( in order to manage the LOG's size
and not to lose the data) BACKUP LOG file.
"Olav" <Olav@.discussions.microsoft.com> wrote in message
news:4C5ED48E-DFF3-4C76-864A-71AA9B83B56C@.microsoft.com...
> Thanks for good tip. i have one last question in this regards that if size
of
> my data file is 2 124 876 and size of log file is 4 248 987 and i shrink
it[vbcol=seagreen]
> to for example 10 424 then what is effect on the database data?
> --
> Olav
> Click Soft
>
> "Javi" wrote:
>
files[vbcol=seagreen]
this[vbcol=seagreen]
way[vbcol=seagreen]
in[vbcol=seagreen]|||The data will be still there, but you will be not able to undo changes in
the database, I mean, if you at 7:00 has a job that loads data in the
database and at 10:00 other job deletes some registers, using the log file
you can undo these, but if the data you have is good for you, you don't want
undo the changes, then you don't need to maintain the log file info in order
to undo these changes. Use backup to maintain safe your data. It's better.
HTH
Javi
"Olav" <Olav@.discussions.microsoft.com> escribi en el mensaje
news:4C5ED48E-DFF3-4C76-864A-71AA9B83B56C@.microsoft.com...[vbcol=seagreen]
> Thanks for good tip. i have one last question in this regards that if size
> of
> my data file is 2 124 876 and size of log file is 4 248 987 and i shrink
> it
> to for example 10 424 then what is effect on the database data?
> --
> Olav
> Click Soft
>
> "Javi" wrote:
>

Sunday, February 12, 2012

Cannot run snapshot agent from command line

I have a transactional replication running and it's running well.
But now i'm writing a script so I can start the Snapshot Agent from
distance. therefore I want to run it from the command prompt.
I'm using this command: C:\Program Files\Microsoft SQL Server\80\COM
\snapshot.exe -Publisher <server> -PublisherDB <pubDB> -Publication
<pub> -DistributorLogin <login> -DistributorPassword <pwd>
And this is my output:
==== Output start ======
Microsoft SQL Server Snapshot Agent 8.00.2039
Copyright (c) 2000 Microsoft Corporation
The process could not create file '\\<server>\ReplData\unc'.
Finished with exit code 2
==== Output end ======
When I start the agent from SQL Server itself it works fine.
the location of the snapshot folder is defined as '\\<server>
\ReplData' and (for testing now) this folder has full access.
Can somebody tell mee what;s going wrong and what I can do about it?
Can you create your command as text in a batch file then use RunAs (or log on
again if RunAs is disabled). The user to select is the sql server agent
login...
HTH,
Paul Ibison
|||You need to check to ensure that the share permissions are full for the
account which the SQL Server Agent runs under, or the account the snapshot
agent is proxied under, and the underlying security is full for the path and
all child objects.
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"acsnaterse" <snaterse@.gmail.com> wrote in message
news:1184079506.481076.126000@.22g2000hsm.googlegro ups.com...
>I have a transactional replication running and it's running well.
> But now i'm writing a script so I can start the Snapshot Agent from
> distance. therefore I want to run it from the command prompt.
> I'm using this command: C:\Program Files\Microsoft SQL Server\80\COM
> \snapshot.exe -Publisher <server> -PublisherDB <pubDB> -Publication
> <pub> -DistributorLogin <login> -DistributorPassword <pwd>
> And this is my output:
> ==== Output start ======
> Microsoft SQL Server Snapshot Agent 8.00.2039
> Copyright (c) 2000 Microsoft Corporation
> The process could not create file '\\<server>\ReplData\unc'.
> Finished with exit code 2
> ==== Output end ======
> When I start the agent from SQL Server itself it works fine.
> the location of the snapshot folder is defined as '\\<server>
> \ReplData' and (for testing now) this folder has full access.
> Can somebody tell mee what;s going wrong and what I can do about it?
>
|||On 10 jul, 17:58, Paul Ibison <Paul.Ibi...@.Pygmalion.Com> wrote:
> Can you create your command as text in a batch file then use RunAs (or log on
> again if RunAs is disabled). The user to select is the sql server agent
> login...
> HTH,
> Paul Ibison
Hi,
Thanks! With the runas commando it works great!
Hint: in combination with Sanur (http://www.commandline.co.uk/
sanur_unsupported/index3.html) you can automate the password fill-in.