Wednesday, March 28, 2012
How to change the Credential for the replication
we are having mearge replication between two domains. Now our policy for the
SA is changed and we do not use the SA account anymore for the replication.
As we have changed the password for the SA now the replication is failed
with the follwoing error.
The process could not connect to Subscriber 'SERVER'.
(Source: SERVER (Agent); Error number: 20084)
------
Login failed for user 'sa'.
(Source: SERVER (Data source); Error number: 18456)
------
Please suggest how i can change the credential so that the new username will
be used to connect the other server for the replication.
YOur earlier reply would be a great help to me.
Best regards
Sharad
It would be nice to know if this is from SQL 2000 or SQL 2005. It would
also be good to know if you are running the merge agent via a SQL Agent job,
an API call, or via the command line. Most likely you are using a SQL 2000
SQL Agent job to sync a pull merge subscriber. In this case, you need to
examine the properties of the SQL Agent job that is failing to execute the
merge agent. In the step called "Run Agent", check out the "command", this
contains the parameters used to run the merge agent in the job. You should
be able to find -SubscriberSecurityMode 0 -SubscriberLogin
sa -SubscriberPassword XXXXXX. This is where you can change the subscriber
credential information.
Hope this helps,
Tom
This posting is provided "AS IS" with no warranties, and confers no rights.
"Sharad" <Sharad@.discussions.microsoft.com> wrote in message
news:01EA29E2-D2DA-4748-BE15-218EDEF5625D@.microsoft.com...
> Dear Friends
> we are having mearge replication between two domains. Now our policy for
> the
> SA is changed and we do not use the SA account anymore for the
> replication.
> As we have changed the password for the SA now the replication is failed
> with the follwoing error.
> The process could not connect to Subscriber 'SERVER'.
> (Source: SERVER (Agent); Error number: 20084)
> ------
> Login failed for user 'sa'.
> (Source: SERVER (Data source); Error number: 18456)
> ------
> Please suggest how i can change the credential so that the new username
> will
> be used to connect the other server for the replication.
> YOur earlier reply would be a great help to me.
> Best regards
> Sharad
Monday, March 26, 2012
how to change password?
i'm getting problem with sql server 2000. actually i changed the service from automatic to manual, right from that day,sql server is not working on my machine.when i checkd in the properties of sql server registration, it is showing some around 8 letter password. actually i will connect with sa and password sa.
where should i change the password? is there any other solution?
or is it better to uninstall and install again? if so what about my databases?
please help me in this regardHello vinod,
Go to the folder security;
Double click on the user;
Change the password (don't forget it!!!)
Pressing on the Ok button;
Repeat the password.
In principle, if you press as password of only one character, for security reasons sqlserver 2000 will show you as password 10 stars.
For testing create a new user and change the password.
Good luck,
Michelle.|||on 'edit sql registration properties' window, use windows authentication first. after u've logon, change the password on Security->Logins section.
Friday, March 23, 2012
how to change dpi/resolution of the tiff being exported
How to change dpi/resolutoin of the tiff being exported.
Thank you
Regards,
AngusCheck
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/RSPROG/htm/rsp_prog_soapapi_dev_9xip.asp?frame=true.
--
Ravi Mumulla (Microsoft)
SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"angus" <angus@.angus.com> wrote in message
news:OHDxNeSeEHA.3428@.TK2MSFTNGP11.phx.gbl...
> Dear ALl,
> How to change dpi/resolutoin of the tiff being exported.
> Thank you
> Regards,
> Angus
>
Wednesday, March 21, 2012
How to change Crystal Reprots database at run time from ASP classic code
I'm new to Crystal Reprots and ASP, and need advises regarding to my problem below
I have two database in same SQL 2005 SERVER for TEST and LIVE Environtment, and I've created more than 100 reports with Crystal Reports 11 and call it from ASP classic page.
The problem is how can I change a database from TEST01 to LIVE01 at the run time from ASP code (including the sub reports) as I already using TEST01 database with ADO Connection on Crystal Reports and I do not want to set a new database location inside crystal for each reports
Thanks and wait for your reply soon.
Below is my code, which has no effect to crystal reports although I've change the database from TEST01 to LIVE01:
<%
Dim oADOConnection, oRptTable, oADORecordset, sql
Dim struser, strpwd, strdriver, dblocation, dbname, strConnect
struser = "sa"
strpwd = "sa"
strdriver = "{SQL SERVER}"
dblocation = "SQL200501"
dbname = "LIVE01" ' Changed from TEST01 to LIVE01
strConnect = "User Id=" & strUser & ";"
strConnect = strConnect & "PWD=" & strPwd & ";"
strConnect = strConnect & "DRIVER=" & StrDriver & ";"
strConnect = strConnect & "SERVER=" & DBLocation & ";"
strConnect = strConnect & "DATABASE=" & dbName
sql="Select * from Employee"
Set session("oApp") = Server.CreateObject("CrystalRuntime.Application.11")
Set session("oRpt") = session("oApp").OpenReport("C:\REPORTS\RPT01.RPT", 1) 'USING TEST01 DATABASE
session("oRpt").MorePrintEngineErrorMessages = False
session("oRpt").EnableParameterPrompting = False
session("oRpt").DiscardSavedData
Set oADOConnection = Server.CreateObject("ADODB.Connection")
oADOConnection.Open (strConnect)
Set oADORecordset = Server.CreateObject("ADODB.Recordset")
Set oRptTable = session("oRpt").Database.Tables.Item(1)
oRptTable.SetDataSource oADORecordset, 3
session("oRpt").SQLQueryString = CStr(sql)
session("oRpt").ReadRecords
%>See if you find answer here
http://support.businessobjects.com
Monday, March 12, 2012
how to capture custom made error message into table
I want to know how to custom made error message into table, as I illustrated
T-SQL below :
if objectproperty(object_id('DateTable'),'I
sUserTable')=1
drop table DateTable
if objectproperty(object_id('InputFromFlatF
ile1'),'IsUserTable')=1
drop table InputFromFlatFile1
if objectproperty(object_id('errorLog'),'Is
UserTable')=1
drop table errorLog
if objectproperty(object_id('usp_testData')
,'IsProcedure')=1
drop proc usp_testData
create table DateTable
(datetimestamp datetime)
go
create table errorLog
(
data varchar(200),
errmsg varchar(2000)
)
go
create proc usp_testData
(@.dateinfo datetime)
as
begin
if convert(varchar(8),@.dateinfo,112)<'20060328'
begin
raiserror('Date input invalid because it''s entered before 28 Mar
2006',16,1)
return
end
else
insert into DateTable (datetimestamp) values (@.dateinfo)
end
go
create table InputFromFlatFile1
(
id int identity (1,1) not null,
linestring varchar(100)
)
go
insert into InputFromFlatFile1 (linestring) values ('20060328');
insert into InputFromFlatFile1 (linestring) values ('20060212');
insert into InputFromFlatFile1 (linestring) values ('20060115');
declare @.linestring varchar(200), @.errmsg varchar(2000)
declare @.cnt int, @.recnum int, @.error int
set @.cnt = 1
select @.recnum = count(*) from InputFromFlatFile1
while @.cnt <= @.recnum
begin
select @.linestring = linestring from InputFromFlatFile1 where id = @.cnt;
print @.linestring
exec @.error = usp_testData @.linestring;
if @.error<>0 or @.@.error <> 0
begin
if @.@.error <> 0
begin
set @.error = @.@.error
select @.errmsg = description from master.dbo.sysmessages where error =
@.error
end
/*
How can I capture user-made error in stored procedure usp_testData to put
into ErrorLog table
'
*/
insert into errorLog values (@.linestring, @.errmsg)
end
set @.cnt = @.cnt + 1;
end
select * from DateTable
select * from errorLog
from query analyzer I get error message below :
Date input invalid because it is entered before 28 Mar 2006
but I cannot get the error message as above in errorLog table
How can I capture error message like in query analyzer in errorLog table?
Regards,
Koronx
SQL HobbistHi
Check out http://www.sommarskog.se/error-handling-II.html and
http://www.sommarskog.se/error-handling-I.html You will need to add the
insert statement into your code or possibly do it through the client
application by trapping the error message returned.
John
"Kornx Koronx" wrote:
> Dear all,
> I want to know how to custom made error message into table, as I illustrat
ed
> T-SQL below :
> if objectproperty(object_id('DateTable'),'I
sUserTable')=1
> drop table DateTable
> if objectproperty(object_id('InputFromFlatF
ile1'),'IsUserTable')=1
> drop table InputFromFlatFile1
> if objectproperty(object_id('errorLog'),'Is
UserTable')=1
> drop table errorLog
> if objectproperty(object_id('usp_testData')
,'IsProcedure')=1
> drop proc usp_testData
> create table DateTable
> (datetimestamp datetime)
> go
> create table errorLog
> (
> data varchar(200),
> errmsg varchar(2000)
> )
> go
> create proc usp_testData
> (@.dateinfo datetime)
> as
> begin
> if convert(varchar(8),@.dateinfo,112)<'20060328'
> begin
> raiserror('Date input invalid because it''s entered before 28 Mar
> 2006',16,1)
> return
> end
> else
> insert into DateTable (datetimestamp) values (@.dateinfo)
> end
> go
> create table InputFromFlatFile1
> (
> id int identity (1,1) not null,
> linestring varchar(100)
> )
> go
> insert into InputFromFlatFile1 (linestring) values ('20060328');
> insert into InputFromFlatFile1 (linestring) values ('20060212');
> insert into InputFromFlatFile1 (linestring) values ('20060115');
> declare @.linestring varchar(200), @.errmsg varchar(2000)
> declare @.cnt int, @.recnum int, @.error int
> set @.cnt = 1
> select @.recnum = count(*) from InputFromFlatFile1
> while @.cnt <= @.recnum
> begin
> select @.linestring = linestring from InputFromFlatFile1 where id = @.cnt;
> print @.linestring
> exec @.error = usp_testData @.linestring;
> if @.error<>0 or @.@.error <> 0
> begin
> if @.@.error <> 0
> begin
> set @.error = @.@.error
> select @.errmsg = description from master.dbo.sysmessages where error =
> @.error
> end
> /*
> How can I capture user-made error in stored procedure usp_testData to put
> into ErrorLog table
> '
> */
> insert into errorLog values (@.linestring, @.errmsg)
> end
> set @.cnt = @.cnt + 1;
> end
> select * from DateTable
> select * from errorLog
> from query analyzer I get error message below :
> Date input invalid because it is entered before 28 Mar 2006
>
> but I cannot get the error message as above in errorLog table
> How can I capture error message like in query analyzer in errorLog table?
> Regards,
> Koronx
> SQL Hobbist
How to call talbe/SP from Linked server with out database and user
Usually we call tabal and SP like given below.
select * from [linkedserver].[database].[dbo].[TableName]
EXEC [linkedserver].[database].[dbo].usp_storedprocedure
but I like to all with out database and username.
I tryed like below
select * from [linkedserver]...[TableName]
OR
select * from [linkedserver]..[user].[TableName]
It's gives error
Server: Msg 7313, Level 16, State 1, Line 1
Invalid schema or catalog specified for provider 'MSDASQL'.
OLE DB error trace [Non-interface error: Invalid schema or catalog
specified for the provider.].
Please help me to achive this.
Thasks and regards,
Rajesh
On Wed, 14 Sep 2005 07:57:08 -0700, Rajesha wrote:
>Dear Friends,
>Usually we call tabal and SP like given below.
> select * from [linkedserver].[database].[dbo].[TableName]
> EXEC [linkedserver].[database].[dbo].usp_storedprocedure
>but I like to all with out database and username.
>I tryed like below
>select * from [linkedserver]...[TableName]
>OR
>select * from [linkedserver]..[user].[TableName]
>It's gives error
>Server: Msg 7313, Level 16, State 1, Line 1
>Invalid schema or catalog specified for provider 'MSDASQL'.
>OLE DB error trace [Non-interface error: Invalid schema or catalog
>specified for the provider.].
>Please help me to achive this.
>Thasks and regards,
>Rajesh
Hi Rajesh,
You can't leave out the databasename. A linked server might hold more
than one database, so you have to specify that part.
I believe that you can leave out the owner, but I'm not sure, and I
can't test that right now. However, it is recommended that you always
include the owner. This helps SQL Server find the object more quickly,
and it helps reduce the number of recompiles.
Best, Hugo
(Remove _NO_ and _SPAM_ to get my e-mail address)
Friday, March 9, 2012
How to call a stored procedure from a web page with VB
Dear Masters;
How can I call a stored procedure with VB code?
Thanks
Check thishttp://aspalliance.com/673_CodeSnip_Calling_a_Stored_Procedure_from_ASPNET_20
Thanks
|||Thanks:)Wednesday, March 7, 2012
How to call a DTS package (SQL Server 2000) in VisualBasic
I am implementing a COM by VisualBasic. In this COM, I want to call a DTS package on SQL server to transfer data.
How can I do that? Please help me!I found this in MSDN :)
Hope it helps!
--------------------
The following code example shows a DTS package using an
ExecutePackageTask,
through the Execute and UnInitialize methods:
--------------------
Private WithEvents mobjPkgEvents As DTS.Package
. . .
Private Sub RunPackage()
'Run the package stored in file C:\DTS_UE\TestPkg\VarPubsFields.dts.
Dim objPackage As DTS.Package2
Dim objStep As DTS.Step
Dim objTask As DTS.Task
Dim objExecPkg As DTS.ExecutePackageTask
On Error GoTo PackageError
Set objPackage = New DTS.Package
Set mobjPkgEvents = objPackage
objPackage.FailOnError = True
'Create the step and task. Specify the package to be run, and link the step to the task.
Set objStep = objPackage.Steps.New
Set objTask = objPackage.Tasks.New("DTSExecutePackageTask")
Set objExecPkg = objTask.CustomTask
With objExecPkg
.PackagePassword = "user"
.FileName = "C:\DTS_UE\TestPkg\VarPubsFields.dts"
.Name = "ExecPkgTask"
End With
With objStep
.TaskName = objExecPkg.Name
.Name = "ExecPkgStep"
.ExecuteInMainThread = True
End With
objPackage.Steps.Add objStep
objPackage.Tasks.Add objTask
'Run the package and release references.
objPackage.Execute
Set objExecPkg = Nothing
Set objTask = Nothing
Set objStep = Nothing
Set mobjPkgEvents = Nothing
objPackage.UnInitialize
End Sub|||Very thanks, sanchi!
By the way, can we call DTS packages from Stored Procedure?|||Yup, you can create a job running the DTS package and the call the job from your VB-program. Right-click your DTS-package in Enterprise Manager and Scedule it to run at some interval. Then you go to the job-management window in EM, edit the newly created job, and delete the schedule but leave the job as it is with the rest. The you can execute the following statement from your VB-app:
EXEC sp_start_job @.job_name = 'myDTSjobname'
Sunday, February 19, 2012
How to build application
I used to use the clients/server application in two tier, but now i thinks the two tier of application is cannot support for the user as well.
That's why we try to build the three tier system in SQL Server. In our first time, we cannot build it at all and we don't know how to do it.
Is it SQL Server support three tier system?
If SQL Server can support, How can we build it?
I hope you will reply me soon.
Ratana Ky
Cambodia.
Ratana,
Take a look at this web site and spend some time witching the following webcasts. The presenter shows how easy it become to create n-tier applications. He also gives you a link to source code.
http://www.microsoft.com/events/series/teched2005.mspx
MSDN Webcast: ASP.NET 2.0: Overview of ASP.NET 2.0 (Part 1 of 2) (Level 300)
MSDN Webcast: ASP.NET 2.0: Overview of ASP.NET 2.0 (Part 2 of 2) (Level 300)
HTH
-w|||This question is pretty generic, like how to build a car. The answer is yes. You can do a web search for terms "three tier architecture sql server" to find articles on the subject.
How to browse INFORMATION_SCHEMA in Enterprise Manager
I try to (select * from information_schema.columns). It
works ok in query analyzer. But how can I access the information_schema
tables in Enterprise Manager? I try to browse all database, but I
cannot located where is information_schema located in? i.e. Which
database the information_schema is located in that I can browse in
Enterprise Manager?
ThanksI assume you are on 2000? These views only physically exists in the master d
atabase, so unless it is
master you want to look at, EM won't work. Use Query Analyzer and type your
queries instead.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"hon123456" <peterhon321@.yahoo.com.hk> wrote in message
news:1145342246.110319.286500@.u72g2000cwu.googlegroups.com...
> Dear all,
> I try to (select * from information_schema.columns). It
> works ok in query analyzer. But how can I access the information_schema
> tables in Enterprise Manager? I try to browse all database, but I
> cannot located where is information_schema located in? i.e. Which
> database the information_schema is located in that I can browse in
> Enterprise Manager?
> Thanks
>