Showing posts with label below. Show all posts
Showing posts with label below. Show all posts

Friday, March 30, 2012

Problem with case statement

With the syntax below, why is field1a not "A" if field1 does not
contain "_"

SELECT Field1a = CASE WHEN (field1 LIKE '%_%') THEN (charindex('_',
field1)) ELSE 'A' END, field1
FROM [Table1]<chudson007@.hotmail.com> wrote in message
news:1125938525.701908.180610@.f14g2000cwb.googlegr oups.com...
> With the syntax below, why is field1a not "A" if field1 does not
> contain "_"
>
> SELECT Field1a = CASE WHEN (field1 LIKE '%_%') THEN (charindex('_',
> field1)) ELSE 'A' END, field1
> FROM [Table1]

See LIKE and "Pattern Matching in Search Conditions" in Books Online - an
underscore is a wildcard for any single character, so you need to escape it
for a literal match:

LIKE '%[_]%'

Another issue is that CASE is an expression, so it can only return a single
data type - as you've written it, it could return either an int or a char,
so you would get a data type conversion error. See "Result Types" under CASE
in Books Online - you'll need to decide on a single return type, or perhaps
CAST the integer to a character type:

SELECT
Field1a = CASE
WHEN (field1 LIKE '%[_]%') THEN cast((charindex('_',field1)) as char(2))
ELSE 'A' END,
field1
FROM [Table1]

Simon|||cheers simon|||(chudson007@.hotmail.com) writes:
> With the syntax below, why is field1a not "A" if field1 does not
> contain "_"
>
> SELECT Field1a = CASE WHEN (field1 LIKE '%_%') THEN (charindex('_',
> field1)) ELSE 'A' END, field1
> FROM [Table1]

In SQL _ is a wildcard for exactly one occurrance of one characater. Thus
%_% matches anything but the empty string. Change to %[_]% to get what you
want.

...by the way, CASE is an expression, not a statement, in SQL.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.aspsql

Wednesday, March 28, 2012

problem with bcp using format file

The running of my bcp (with queryout) is aborting, with the message below. A
t
first I identified that it happened only with column with NULL value, but no
w
I realize this occurrence happened in other field without NULL value.
Anyone has suggestions ? Thanks a lot
My format file has the following contents : 8.0 (version) 2 (number of
columns)
1 SQLCHAR 0 20 "\t" 1 numeroaj Latin1_General_CI_AS
2 SQLCHAR 0 54 "\r\n" 2 acervoespecializada Latin1_General_CI_AS
My bad run :
D:\Users\sql>bcp "SELECT numeroaj, acervoespecializada from
Siga.dbo.vwHerancaJa
cente" queryout C:\dts\hjacente.txt -f d:\users\sql\pgm3.fmt -Smyserver
-Umyuser -Pmypwd
SQLState = S1000, NativeError = 0
Error = [Microsoft][ODBC SQL Server Driver]Erro de E/S ao ler o arquivo no
forma
to BCP ==> Translating... Error of I/O when read the format filewhere do you run this bcp statement, on the client or on the server itself.
"d:\" must be local to where ever you run the bcp statement.
-oj
"Adalberto Andrade" <Adalberto Andrade@.discussions.microsoft.com> wrote in
message news:014C3C25-592D-4A88-A320-325C52D49D2A@.microsoft.com...
> The running of my bcp (with queryout) is aborting, with the message below.
> At
> first I identified that it happened only with column with NULL value, but
> now
> I realize this occurrence happened in other field without NULL value.
> Anyone has suggestions ? Thanks a lot
> My format file has the following contents : 8.0 (version) 2 (number of
> columns)
> 1 SQLCHAR 0 20 "\t" 1 numeroaj Latin1_General_CI_AS
> 2 SQLCHAR 0 54 "\r\n" 2 acervoespecializada
> Latin1_General_CI_AS
> My bad run :
> D:\Users\sql>bcp "SELECT numeroaj, acervoespecializada from
> Siga.dbo.vwHerancaJa
> cente" queryout C:\dts\hjacente.txt -f d:\users\sql\pgm3.fmt -Smyserver
> -Umyuser -Pmypwd
> SQLState = S1000, NativeError = 0
> Error = [Microsoft][ODBC SQL Server Driver]Erro de E/S ao ler o arquivo no
> forma
> to BCP ==> Translating... Error of I/O when read the format file|||Hi oj,
On the client. And "d:\" is a local drive (in my machine). With
others columns it worked OK.
Thanks
Adalberto Andrade
"oj" wrote:

> where do you run this bcp statement, on the client or on the server itself
.
> "d:\" must be local to where ever you run the bcp statement.
> --
> -oj
>
> "Adalberto Andrade" <Adalberto Andrade@.discussions.microsoft.com> wrote in
> message news:014C3C25-592D-4A88-A320-325C52D49D2A@.microsoft.com...
>
>|||Adalberto,
Please check to see if there is a carriage return at the
end of your format file and that there are no extra tabs
or anything else in it. Also be sure the format file
is not open in an editor when you run the command.
The error message mentions the format file, not the
data file, so I think the problem is with the format file.
Steve Kass
Drew University
Adalberto Andrade wrote:
>Hi oj,
> On the client. And "d:\" is a local drive (in my machine). With
>others columns it worked OK.
>
> Thanks
> Adalberto Andrade
>
>
>"oj" wrote:
>
>|||Steve,
I made a complete revision of all components of my environment.
Things like : cr (carriage return), opened format file and others wrongs
caracters inside of format file are not the problem. I am thankful for yours
suggestions,but the problem continue. Now I substituted the third column of
my output file and the bcp utility started the copy, but the generated file
has mixed data with stranger caracters. This new column has valids datas and
also null values in some registers and it is the great difference between th
e
others columns (first e second ones). Without this third column everything
work 100% OK. I already try to change the value of prefix length (field of
the format file) to -1 or 2 with the hope to solve it, but the output
generated file continue with stranger and mixed caracters (like ASCII
caracters). I really don't have any idea of what I can do to put it to work.
I am not sure, but perhaps I will need to make other configuration in my
format file, but exactly what ? Do you have other help for me ?
Thanks again
Adalberto Andrade
"Steve Kass" wrote:

> Adalberto,
> Please check to see if there is a carriage return at the
> end of your format file and that there are no extra tabs
> or anything else in it. Also be sure the format file
> is not open in an editor when you run the command.
> The error message mentions the format file, not the
> data file, so I think the problem is with the format file.
> Steve Kass
> Drew University
> Adalberto Andrade wrote:
>
>|||Adalberto,
I am not sure what the problem is, but here are three separate
suggestions.
1. Try to use bcp without a format file, since TAB and NEWLINE
are the defaults for bcp. If this creates a Unicode file, you will need
to change the format file to say SQLNCHAR instead of SQLCHAR,
and you will also need to put the Unicode two-byte signature into
the beginning of the file yourself, since bcp does not do this for you.
2. Be sure the format file is saved as ASCII, not Unicode, then try
again with the format file.
3. Verify the data lengths and types of the output,
3A. Run this and provide the output.
select top 1
numeroaj, acervoespecializada
into CheckTypesTable
from Siga.dbo.vwHerancaJacente
select * from CheckTypesTable
3B. In Query Analyzer, refresh the current database
and for [CheckTypesTable] choose "Script Table To
New Window" to verify the data types of these columns
and provide the output.
3C. After doing this, you can DROP the table CheckTypesTable.
It might help if you post the definition of Siga.dbo.vwHerancaJa.
(If it is a view, also post CREATE TABLE statements from the
tables it uses for the columns numeroaj and acervoespecializada
(and the third column, since at one point you mention three columns.
Also, when you have three columns, what is your query?)
SK
Adalberto Andrade wrote:
>Steve,
> I made a complete revision of all components of my environment.
>Things like : cr (carriage return), opened format file and others wrongs
>caracters inside of format file are not the problem. I am thankful for your
s
>suggestions,but the problem continue. Now I substituted the third column of
>my output file and the bcp utility started the copy, but the generated file
>has mixed data with stranger caracters. This new column has valids datas an
d
>also null values in some registers and it is the great difference between t
he
>others columns (first e second ones). Without this third column everything
>work 100% OK. I already try to change the value of prefix length (field of
>the format file) to -1 or 2 with the hope to solve it, but the output
>generated file continue with stranger and mixed caracters (like ASCII
>caracters). I really don't have any idea of what I can do to put it to work
.
>I am not sure, but perhaps I will need to make other configuration in my
>format file, but exactly what ? Do you have other help for me ?
>
> Thanks again
>Adalberto Andrade
>"Steve Kass" wrote:
>
>|||Steve,
Forgive me for delay in my reply. I was very busy. Let 's go. Really
you are correct. When I ran the bcp utility in the prompt without my format
file, it show the message explaining that happened a truncate. In true there
was a difference between the data length of one column and your value define
d
for this size in the format file. Summarizing, the problem is over and your
suggesntions 1 and 3 were very helpful.
Thanks a lot
Adalberto
Andrade
Rio de Janeiro's
City Hall
"Steve Kass" wrote:

> Adalberto,
> I am not sure what the problem is, but here are three separate
> suggestions.
> 1. Try to use bcp without a format file, since TAB and NEWLINE
> are the defaults for bcp. If this creates a Unicode file, you will need
> to change the format file to say SQLNCHAR instead of SQLCHAR,
> and you will also need to put the Unicode two-byte signature into
> the beginning of the file yourself, since bcp does not do this for you.
> 2. Be sure the format file is saved as ASCII, not Unicode, then try
> again with the format file.
> 3. Verify the data lengths and types of the output,
> 3A. Run this and provide the output.
> select top 1
> numeroaj, acervoespecializada
> into CheckTypesTable
> from Siga.dbo.vwHerancaJacente
> select * from CheckTypesTable
> 3B. In Query Analyzer, refresh the current database
> and for [CheckTypesTable] choose "Script Table To
> New Window" to verify the data types of these columns
> and provide the output.
> 3C. After doing this, you can DROP the table CheckTypesTable.
>
> It might help if you post the definition of Siga.dbo.vwHerancaJa.
> (If it is a view, also post CREATE TABLE statements from the
> tables it uses for the columns numeroaj and acervoespecializada
> (and the third column, since at one point you mention three columns.
> Also, when you have three columns, what is your query?)
> SK
> Adalberto Andrade wrote:
>
>

Monday, March 26, 2012

Problem with Array of strings in SQL...

I am using the code given below which works fine for array of integers, can anyone help me to convert this code to use it for array of strings
basically i want to store the search keywords in the array of strings and use them in the stored procedure.
CREATE Function fnSplitter (@.IDs Varchar(100) )
Returns @.Tbl_IDs Table (ID Int) As

Begin
-- Append comma
Set @.IDs = @.IDs + ','
-- Indexes to keep the position of searching
Declare @.Pos1 Int
Declare @.pos2 Int

-- Start from first character
Set @.Pos1=1
Set @.Pos2=1

While @.Pos1<Len(@.IDs)
Begin
Set @.Pos1 = CharIndex(',',@.IDs,@.Pos1)
Insert @.Tbl_IDs Select Cast(Substring(@.IDs,@.Pos2,@.Pos1-@.Pos2) As Int)
-- Go to next non comma character
Set @.Pos2=@.Pos1+1
-- Search from the next charcater
Set @.Pos1 = @.Pos1+1
End
Return
End
CREATE PROCEDURE spSelectEmployees(@.IDs Varchar(100)) AS
Select * From employees Where employeeid In (Select ID From fnSplitter(@.IDs))

Exec spSelectEmployees '1,4,5,7,9'

I want replace the above Exec statement withExec spSelectEmployees 'sap, abap, hr, ... ' in the JobPosition Column of Employees if possible, i've been trying to change it but its not working out
Thanks in Advance

Check out the split function Bilal posted in this thread:http://forums.asp.net/997824/ShowPost.aspx
|||I checked Haidar Bilals code but it returns only a specific item in the given string based on the position specified.
But in my case i got only one string which goes like this 'sap, abap, consultant,.. , ...' which i need to use them in the stored procedure .
I am actuallycreating a search page for jobs and when a person enters different keywords in the textbox i'm storing them in the array.
Here is the previous part of my code
string strsearch = txtsearch.Text;
string []items = strsearch.Split();
Session["items"]= items;
and on the other page i'm using the session items
string []items = (string[])Session["Items"];


|||

savvy wrote:

I checked Haidar Bilals code but it returns only aspecific item in the given string based on the position specified.


Ack, sorry, I picked the wrong post. There are many posts where asplit function has been posted. There's one that Dinakar postedin this thread:http://forums.asp.net/989365/ShowPost.aspx
|||Thanks for ur fast reply
i used this code
CREATE FUNCTION dbo.Split1
(
@.RowData nvarchar(2000),
@.SplitOn nvarchar(5)
)
RETURNS @.RtnValue table
(
Id int identity(1,1),
Data nvarchar(100)
)
AS
BEGIN
Declare @.Cnt int
Set @.Cnt = 1
While (Charindex(@.SplitOn,@.RowData)>0)
Begin
Insert Into @.RtnValue (data)
Select
Data = ltrim(rtrim(Substring(@.RowData,1,Charindex(@.SplitOn,@.RowData)-1)))
Set @.RowData = Substring(@.RowData,Charindex(@.SplitOn,@.RowData)+1,len(@.RowData))
Set @.Cnt = @.Cnt + 1
End
Insert Into @.RtnValue (data)
Select Data = ltrim(rtrim(@.RowData))
Return
END
Declare @.list varchar(200)
set @.list = 'SAP MM Support Consultant, Managing Consultant SAP FI/C '
Select * from JobDetails where JobPosition in (Select Data from dbo.Split1(@.list, ','))
I am getting the results but the problem is i have to give the exact word or phrase inorder to get the results, actually i want to enter just 'sap, consultant' and get the same result .. is it possible?
Thanx in Advance
|||You could try your query like this:

SELECT @.list = 'SAP, Consultant'
SELECT
*
FROM
JobDetails AS J
INNER JOIN
dbo.Split1(@.list, ',') AS S ON J.JobPosition LIKE '%' + S.Data + '%'


|||Declare @.list varchar(200)
set @.list = 'abap,hr,sap'
SELECT Distinct J.* FROM JobDetails AS J inner join dbo.Split1(@.list, ',') AS S ON J.JobPosition LIKE '%' + S.Data + '%'
I used this code finally it works fine. Thank u very much Terri Morton for all your help and interestsql

Wednesday, March 21, 2012

Problem with @@identity in SQL Server 6.5

In SQL Server 6.5, I have a table called employee
with two fields emp_id and emp_name where emp_id
is an identity column.

The below Stored Procedure is trying to select
the last inserted emp_id using @.@.identity.

CREATE PROCEDURE Employee AS

begin

SET IDENTITY_INSERT employee OFF

SET NOCOUNT ON

declare @.empid int

INSERT INTO employee(emp_name) VALUES
("Soundy")

SET @.empid = @.@.identity

return @.empid

end

But when compiling this procedure, SQL Server displays
an error saying "Incorrect syntax near @.empid".

Can i know where the problem is ?Q1 Can i know where the problem is ?

A1 Try 'Soundy' instead of "Soundy"? For example:

Use TempDB
Go

CREATE TABLE [employee] (
[emp_id] [int] IDENTITY (1, 1) NOT NULL ,
[emp_name] [nvarchar] (50) NULL)
Go

CREATE PROCEDURE ins_Employee
@.pEmpName nvarChar (50) AS
begin
SET IDENTITY_INSERT employee OFF
SET NOCOUNT ON
declare @.empid int
INSERT INTO employee(emp_name) VALUES
(@.pEmpName)
SET @.empid = @.@.identity
return @.empid
end

Go

DECLARE @.RC int
-- exec the Proc
EXEC @.RC = ins_Employee @.pEmpName = 'Soundy'
Select @.RC as '@.RC for ins_employee'
Go

SELECT emp_id, emp_name
FROM employee
Where
emp_id = (SELECT Max(emp_id)FROM employee)

problem with @@IDENTITY

In MSSQL I have auto incrementing PK for the row I'm inserting into. The the
code I use below is to insert into the table. What I need is as soon as I
insert the record, I also need to return back what the PK was of my newly
inserted row. I will need to use this value for another section of the FORM
for use as a FK into another table in which I going insert some other data
based on a few criterias. I tried to us @.@.IDENTITY to no avail. Any help is
greatly appreciated. I pretty new at this stuff and just learning. Thank
You.
You forgot to include your code. Are you using a stored procedure or an
insert statement to insert the data?
Whatever option you are using you need to SELECT @.@.identity immediately
after the statement that performs the insert. If you are running SQL Server
2000 or higher you can use SELECT scope_identity() in place of @.@.identity.
INSERT INTO YourTable (column list) values (values)
SELECT @.@.identity
create proc foo
@.param type.....
as
INSERT INTO YourTable (column list) values (values)
SELECT @.@.identity
go
Keith
"news.microsoftnews" <sapk81@.yahoo.com> wrote in message
news:Oec$paHsEHA.2636@.TK2MSFTNGP09.phx.gbl...
> In MSSQL I have auto incrementing PK for the row I'm inserting into. The
the
> code I use below is to insert into the table. What I need is as soon as I
> insert the record, I also need to return back what the PK was of my newly
> inserted row. I will need to use this value for another section of the
FORM
> for use as a FK into another table in which I going insert some other data
> based on a few criterias. I tried to us @.@.IDENTITY to no avail. Any help
is
> greatly appreciated. I pretty new at this stuff and just learning. Thank
> You.
>
|||"Keith Kratochvil" <sqlguy.back2u@.comcast.net> wrote in message
news:OcORPnHsEHA.3876@.TK2MSFTNGP15.phx.gbl...
All relevant stuff.
In addition, if the table you are inserting into has an INSERT trigger which
in turn performs a 'cascaded' INSERT into another table that also has an
identity the value of @.@.IDENTITY or scope_identity() will be that of the
the other table. Beware. THere is a workaround though:
You MUST contrive to cache @.@.IDENTITY coming into your trigger
(i.e. set @.myid = @.@.IDENTITY)and reset it before leaving. If you don't do
this, Access will not be able to correctly track the row inserted and you
will get error
messages (like, the row does not satisfy the underlying criteria, or some
such).
Here is an SQL 2000 idiom to reset @.@.IDENTITY to @.myid (should be done as
the last thing before the trigger exits):
EXECUTE (N'SELECT Identity (Int, ' + Cast(@.myid As Varchar(10)) + ',1) AS id
INTO #Tmp'
G'luck
Malcolm Cook - mec@.stowers-institute.org
Database Applications Manager - Bioinformatics
Stowers Institute for Medical Research - Kansas City, MO USA

> You forgot to include your code. Are you using a stored procedure or an
> insert statement to insert the data?
> Whatever option you are using you need to SELECT @.@.identity immediately
> after the statement that performs the insert. If you are running SQL
Server[vbcol=seagreen]
> 2000 or higher you can use SELECT scope_identity() in place of @.@.identity.
>
> INSERT INTO YourTable (column list) values (values)
> SELECT @.@.identity
> create proc foo
> @.param type.....
> as
> INSERT INTO YourTable (column list) values (values)
> SELECT @.@.identity
> go
> --
> Keith
>
> "news.microsoftnews" <sapk81@.yahoo.com> wrote in message
> news:Oec$paHsEHA.2636@.TK2MSFTNGP09.phx.gbl...
> the
I[vbcol=seagreen]
newly[vbcol=seagreen]
> FORM
data
> is
>
sql

Tuesday, March 20, 2012

problem while using sp_ExecuteSql

Hi all

I have a stored procedure as I placed below

create procedure ps_Select_Student
@.RollNo nvarchar(50),
@.Class int
AS
Begin
declare @.MainQuery nvarchar(4000)
set @.MainQuery = 'select StudentName where
RollNo=@.RollNo and Class=@.Class'

exec sp_ExecuteSql @.MainQuery
End

Go

While executing this procedure in Query Analyser i am agetting an error that

must declare @.RollNo

What is the problem. Please help me out.

You have to declare those variables on param declaration parameter of sp_executesql

Code Snippet

create procedure ps_Select_Student

@.RollNo nvarchar(50),

@.Class int

AS

Begin

Declare @.MainQuery nvarchar(4000)

Declare @.ParamDecl nvarchar(4000)

set @.MainQuery = N'select StudentName where RollNo=@.RollNo and Class=@.Class'

set @.ParamDecl = N'@.RollNo nvarchar(50),@.Class int'

Exec sp_ExecuteSql @.MainQuery , @.ParamDecl, @.RollNo, @.Class

End

Go

Problem while installing SQL Server 2005 Express Edition

I am facing a problem while installing SQL Server 2005 Express Edition on my machine. Included below is the text of the logfile Summary.txt


Microsoft SQL Server 2005 9.00.2047.00
==============================
OS Version : Microsoft Windows XP Professional Service Pack 2 (Build 2600)
Time : Tue Feb 13 20:49:01 2007
ABC-621F39F0E0D : The current system does not meet recommended hardware requirements for this SQL Server release. For detailed hardware requirements, see the readme file or SQL Server Books Online.
Machine : ABC-621F39F0E0D
Product : Microsoft SQL Server Setup Support Files (English)
Product Version : 9.00.2047.00
Install : Successful
Log File : C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Files\SQLSetup0015_ABC-621F39F0E0D_SQLSupport_1.log
--
Machine : ABC-621F39F0E0D
Product : Microsoft SQL Server Native Client
Product Version : 9.00.2047.00
Install : Successful
Log File : C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Files\SQLSetup0015_ABC-621F39F0E0D_SQLNCLI_1.log
--
Machine : ABC-621F39F0E0D
Product : Microsoft SQL Server VSS Writer
Product Version : 9.00.2047.00
Install : Successful
Log File : C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Files\SQLSetup0015_ABC-621F39F0E0D_SqlWriter_1.log
--
Machine : ABC-621F39F0E0D
Product : MSXML 6.0 Parser (KB927977)
Product Version : 6.00.3890.0
Install : Successful
Log File : C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Files\SQLSetup0015_ABC-621F39F0E0D_MSXML6_1.log
--
Machine : ABC-621F39F0E0D
Product : SQL Server Database Services
Error : SQL Server Setup could not connect to the database service for server configuration. The error was: [Microsoft][SQL Native Client]SSL Provider: The certificate chain was issued by an authority that is not trusted.
Refer to server error logs and setup logs for more information. For details on how to view setup logs, see "How to View Setup Log Files" in SQL Server Books Online.
--
Machine : ABC-621F39F0E0D
Product : Microsoft SQL Server 2005 Express Edition
Product Version : 9.1.2047.00
Install : Failed
Log File : C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Files\SQLSetup0015_ABC-621F39F0E0D_SQL.log
Last Action : InstallFinalize
Error String : SQL Server Setup could not connect to the database service for server configuration. The error was: {Microsoft}{SQL Native Client}SSL Provider: The certificate chain was issued by an authority that is not trusted.
Error Number : 29515
--

hi...did u get the solution, I am also facing the same problem.

will appreciate any help.

thanks

Problem while installing SQL Server 2005 Express Edition

I am facing a problem while installing SQL Server 2005 Express Edition on my machine. Included below is the text of the logfile Summary.txt


Microsoft SQL Server 2005 9.00.2047.00
==============================
OS Version : Microsoft Windows XP Professional Service Pack 2 (Build 2600)
Time : Tue Feb 13 20:49:01 2007
ABC-621F39F0E0D : The current system does not meet recommended hardware requirements for this SQL Server release. For detailed hardware requirements, see the readme file or SQL Server Books Online.
Machine : ABC-621F39F0E0D
Product : Microsoft SQL Server Setup Support Files (English)
Product Version : 9.00.2047.00
Install : Successful
Log File : C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Files\SQLSetup0015_ABC-621F39F0E0D_SQLSupport_1.log
--
Machine : ABC-621F39F0E0D
Product : Microsoft SQL Server Native Client
Product Version : 9.00.2047.00
Install : Successful
Log File : C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Files\SQLSetup0015_ABC-621F39F0E0D_SQLNCLI_1.log
--
Machine : ABC-621F39F0E0D
Product : Microsoft SQL Server VSS Writer
Product Version : 9.00.2047.00
Install : Successful
Log File : C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Files\SQLSetup0015_ABC-621F39F0E0D_SqlWriter_1.log
--
Machine : ABC-621F39F0E0D
Product : MSXML 6.0 Parser (KB927977)
Product Version : 6.00.3890.0
Install : Successful
Log File : C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Files\SQLSetup0015_ABC-621F39F0E0D_MSXML6_1.log
--
Machine : ABC-621F39F0E0D
Product : SQL Server Database Services
Error : SQL Server Setup could not connect to the database service for server configuration. The error was: [Microsoft][SQL Native Client]SSL Provider: The certificate chain was issued by an authority that is not trusted.
Refer to server error logs and setup logs for more information. For details on how to view setup logs, see "How to View Setup Log Files" in SQL Server Books Online.
--
Machine : ABC-621F39F0E0D
Product : Microsoft SQL Server 2005 Express Edition
Product Version : 9.1.2047.00
Install : Failed
Log File : C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Files\SQLSetup0015_ABC-621F39F0E0D_SQL.log
Last Action : InstallFinalize
Error String : SQL Server Setup could not connect to the database service for server configuration. The error was: {Microsoft}{SQL Native Client}SSL Provider: The certificate chain was issued by an authority that is not trusted.
Error Number : 29515
--

hi...did u get the solution, I am also facing the same problem.

will appreciate any help.

thanks

Monday, March 12, 2012

problem while creating an ENDPOINT

Hi,

I am trying to create an ENDPOINT in SQL Server 2005 database. My script is as below. I am unable to create this endpoint. It shows error as 'Incorrect syntext near HTTP'

Script:

/****** Object: Endpoint [GetEmployees] Script Date: 03/02/2007 22:21:26 ******/
CREATE ENDPOINT [GetEmployeesBINA]
AUTHORIZATION [TIS-WORLD\Administrator]
STATE=STARTED
AS HTTP (PATH = http://tisserver:80/sql/shapeserv, PORTS = (CLEAR), AUTHENTICATION = (INTEGRATED), SITE=N'localhost', CLEAR_PORT = 80, COMPRESSION=DISABLED)
FOR SOAP (
WEBMETHOD 'EmployeeList'( NAME=N'[AdventureWorks].[dbo].[GetEmployees]'
, SCHEMA=DEFAULT
, FORMAT=ALL_RESULTS), BATCHES=DISABLED, WSDL=N'[master].[sys].[sp_http_generate_wsdl_defaultcomplexorsimple]', SESSIONS=DISABLED, SESSION_TIMEOUT=60, DATABASE=N'AdventureWorks', NAMESPACE=N'http://AdventureWorks/Employee', SCHEMA=STANDARD, CHARACTER_SET=XML)

2) Once I create this endpoint. If I want to check the endpoint in browser , Which url I haeve to use.

Nilkanth Desai

You'd not included single quotes around the PATH, also the PATH was not in absolute format.

Try the code below instead.

Chris

CREATE ENDPOINT [GetEmployeesBINA]
AUTHORIZATION [TIS-WORLD\Administrator]
STATE = STARTED
AS HTTP (PATH = '/sql/shapeserv',

PORTS = (CLEAR),

AUTHENTICATION = (INTEGRATED),

SITE=N'localhost',

LEAR_PORT = 80,

COMPRESSION=DISABLED)

FOR SOAP (WEBMETHOD 'EmployeeList'( NAME=N'[AdventureWorks].[dbo].[GetEmployees]'

, SCHEMA=DEFAULT

, FORMAT=ALL_RESULTS),


BATCHES=DISABLED,

WSDL=N'[master].[sys].[sp_http_generate_wsdl_defaultcomplexorsimple]',

SESSIONS=DISABLED,

SESSION_TIMEOUT=60,

DATABASE=N'AdventureWorks',

NAMESPACE=N'http://AdventureWorks/Employee',

SCHEMA=STANDARD,

CHARACTER_SET=XML)

|||

Hi Chris,

Thanks it works. But I am still facing problem while accessing it from client.As we use ASMX file in standard web services I can use url path of the ASMX file to get refference of the web service. But I do not know how can I get refference of WSDL & where it was generated?

Thank you,

Nilkangth

|||

Does this work?

http://Server/sql/shapeserve?wsdl

Chris

|||

Hi Chris,

This does not work. It is giving me error Page cannot be founf. TTP Error 404- File or Directory not found.

Server Name is TISSERVER.

SQL Server Name instance is DEVELOPMENT

Nilkanth Desai

|||

Hi Chris,

I have resoved this issue by taking web refference at http://localhost:8080/ShapeServ?wsdl . As I am publishing this webservice on 8080 port I am able to get refference in client.

Thanks for your Response,

Nilkanth Desai

Nilkanth Desai

problem while creating an ENDPOINT

Hi,

I am trying to create an ENDPOINT in SQL Server 2005 database. My script is as below. I am unable to create this endpoint. It shows error as 'Incorrect syntext near HTTP'

Script:

/****** Object: Endpoint [GetEmployees] Script Date: 03/02/2007 22:21:26 ******/
CREATE ENDPOINT [GetEmployeesBINA]
AUTHORIZATION [TIS-WORLD\Administrator]
STATE=STARTED
AS HTTP (PATH = http://tisserver:80/sql/shapeserv, PORTS = (CLEAR), AUTHENTICATION = (INTEGRATED), SITE=N'localhost', CLEAR_PORT = 80, COMPRESSION=DISABLED)
FOR SOAP (
WEBMETHOD 'EmployeeList'( NAME=N'[AdventureWorks].[dbo].[GetEmployees]'
, SCHEMA=DEFAULT
, FORMAT=ALL_RESULTS), BATCHES=DISABLED, WSDL=N'[master].[sys].[sp_http_generate_wsdl_defaultcomplexorsimple]', SESSIONS=DISABLED, SESSION_TIMEOUT=60, DATABASE=N'AdventureWorks', NAMESPACE=N'http://AdventureWorks/Employee', SCHEMA=STANDARD, CHARACTER_SET=XML)

2) Once I create this endpoint. If I want to check the endpoint in browser , Which url I haeve to use.

Nilkanth Desai

You'd not included single quotes around the PATH, also the PATH was not in absolute format.

Try the code below instead.

Chris

CREATE ENDPOINT [GetEmployeesBINA]
AUTHORIZATION [TIS-WORLD\Administrator]
STATE = STARTED
AS HTTP (PATH = '/sql/shapeserv',

PORTS = (CLEAR),

AUTHENTICATION = (INTEGRATED),

SITE=N'localhost',

LEAR_PORT = 80,

COMPRESSION=DISABLED)

FOR SOAP (WEBMETHOD 'EmployeeList'( NAME=N'[AdventureWorks].[dbo].[GetEmployees]'

, SCHEMA=DEFAULT

, FORMAT=ALL_RESULTS),


BATCHES=DISABLED,

WSDL=N'[master].[sys].[sp_http_generate_wsdl_defaultcomplexorsimple]',

SESSIONS=DISABLED,

SESSION_TIMEOUT=60,

DATABASE=N'AdventureWorks',

NAMESPACE=N'http://AdventureWorks/Employee',

SCHEMA=STANDARD,

CHARACTER_SET=XML)

|||

Hi Chris,

Thanks it works. But I am still facing problem while accessing it from client.As we use ASMX file in standard web services I can use url path of the ASMX file to get refference of the web service. But I do not know how can I get refference of WSDL & where it was generated?

Thank you,

Nilkangth

|||

Does this work?

http://Server/sql/shapeserve?wsdl

Chris

|||

Hi Chris,

This does not work. It is giving me error Page cannot be founf. TTP Error 404- File or Directory not found.

Server Name is TISSERVER.

SQL Server Name instance is DEVELOPMENT

Nilkanth Desai

|||

Hi Chris,

I have resoved this issue by taking web refference at http://localhost:8080/ShapeServ?wsdl . As I am publishing this webservice on 8080 port I am able to get refference in client.

Thanks for your Response,

Nilkanth Desai

Nilkanth Desai

Wednesday, March 7, 2012

Problem viewing report based on analysis services

I am using using some code which Implements IReportServerCredentials (see
the object below) to pass credentials to a non local report server. This
works fine and my reportviewer can get it's report from a non local server.
When the report uses Analysis Services it displays the parameters part of
the report viewer so I know it is getting as far as the report server but
when I press view report I doesn't display anything, not even an error. I
have tried adding the user I am logging as to the roles within the analysis
Services project it is based on but with no luck. I have included the code
in case anyone finds it helpful. Can anyone help?
Dim cred As New ReportServerCredentials("username", "password", "domain")
ReportViewer1.ServerReport.ReportServerCredentials = cred
Imports Microsoft.VisualBasic
Imports Microsoft.Reporting.WebForms
Imports System.Net
Public Class reportingservices
End Class
<Serializable()> _
Public Class ReportServerCredentials
Implements IReportServerCredentials
Private _userName As String
Private _password As String
Private _domain As String
Public Sub New(ByVal userName As String, ByVal password As String, ByVal
domain As String)
_userName = userName
_password = password
_domain = domain
End Sub
Public ReadOnly Property ImpersonationUser() As
System.Security.Principal.WindowsIdentity Implements
Microsoft.Reporting.WebForms.IReportServerCredentials.ImpersonationUser
Get
Return Nothing
End Get
End Property
Public ReadOnly Property NetworkCredentials() As ICredentials Implements
Microsoft.Reporting.WebForms.IReportServerCredentials.NetworkCredentials
Get
Return New NetworkCredential(_userName, _password, _domain)
End Get
End Property
Public Function GetFormsCredentials(ByRef authCookie As System.Net.Cookie,
ByRef userName As String, ByRef password As String, ByRef authority As
String) As Boolean Implements
Microsoft.Reporting.WebForms.IReportServerCredentials.GetFormsCredentials
userName = _userName
password = _password
authority = _domain
Return Nothing
End Function
End ClassIn this instance are you trying to access the report in the following
situation:
client accessing report (machine1) -> Report Server (machine 2) -> Analysis
Services (machine 3)?
If so then it is most likely a kerberos authentication issue due to the
"double hop" you are experiencing.
For more information on enabling this check the following article:
http://support.microsoft.com/kb/917409/en-us
SQL Server Developer Support Engineer
"Fresno Bob" wrote:
> I am using using some code which Implements IReportServerCredentials (see
> the object below) to pass credentials to a non local report server. This
> works fine and my reportviewer can get it's report from a non local server.
> When the report uses Analysis Services it displays the parameters part of
> the report viewer so I know it is getting as far as the report server but
> when I press view report I doesn't display anything, not even an error. I
> have tried adding the user I am logging as to the roles within the analysis
> Services project it is based on but with no luck. I have included the code
> in case anyone finds it helpful. Can anyone help?
> Dim cred As New ReportServerCredentials("username", "password", "domain")
> ReportViewer1.ServerReport.ReportServerCredentials = cred
>
> Imports Microsoft.VisualBasic
> Imports Microsoft.Reporting.WebForms
> Imports System.Net
>
>
> Public Class reportingservices
> End Class
>
> <Serializable()> _
> Public Class ReportServerCredentials
> Implements IReportServerCredentials
> Private _userName As String
> Private _password As String
> Private _domain As String
> Public Sub New(ByVal userName As String, ByVal password As String, ByVal
> domain As String)
> _userName = userName
> _password = password
> _domain = domain
> End Sub
> Public ReadOnly Property ImpersonationUser() As
> System.Security.Principal.WindowsIdentity Implements
> Microsoft.Reporting.WebForms.IReportServerCredentials.ImpersonationUser
> Get
> Return Nothing
> End Get
> End Property
> Public ReadOnly Property NetworkCredentials() As ICredentials Implements
> Microsoft.Reporting.WebForms.IReportServerCredentials.NetworkCredentials
> Get
> Return New NetworkCredential(_userName, _password, _domain)
> End Get
> End Property
> Public Function GetFormsCredentials(ByRef authCookie As System.Net.Cookie,
> ByRef userName As String, ByRef password As String, ByRef authority As
> String) As Boolean Implements
> Microsoft.Reporting.WebForms.IReportServerCredentials.GetFormsCredentials
> userName = _userName
> password = _password
> authority = _domain
> Return Nothing
> End Function
> End Class
>
>

Saturday, February 25, 2012

Problem using parameter on SQL source data control

I have an ASP page which uses an SQL data source control, as shown below:

<asp:SqlDataSource ID="mySQL" runat="server"
ConnectionString="<%$ ConnectionStrings:mySQLConnectionString %>"
SelectCommand="SELECT device FROM device_table WHERE (device_id IN (@.devicelist))">
<SelectParameters>
<asp:Parameter DefaultValue="" Name="devicelist" Type="String" />
</SelectParameters>
</asp:SqlDataSource
The problem is getting the "IN" clause of the select statement to work via the ASP page with code behind in C#. If I test the query in the page designer when configuring the SQL control by inserting 'device-1','device-2','device-3' as the value for the "devicelist" parameter, everything works as expected. However, when that same value is written programmatically into the DefaultValue of the parameter, the resulting query contains no results (as if the string contents are invalid). If I alter my program to supply a single entry (with no commas) it seems to work as well. I suspect the comma (and possibly the single-quote) characters in my string when multiple entries are involved are causing the issue.

Is there a proper technique for getting the requisite quote-delimited, comma-separated list into the SQL control command parameter correctly? Should I be using some sort of escape sequence for the single-quote and comma characters? Should I be using another "type" for the parameter; one that accepts an array of entries? I have not been able to find any examples or documentation that provides an answer.

A slight adjustment to the statements made in my earlier post: Using the "Test query" in the page design view for the control does NOT work. What does work is using SQL Server 2005 to run an equivalent query. So the page design view test query functionality and the ASP page functionality do indeed match, unlike what I stated earlier. I apologize for any confusion this may have caused.

But the problem still remains: how can I get the list of values passed into the control via the parameter?

Problem using Monthname function

I am trying to have the below formula populate a portion of a textbox

The right(Parameters!ToTimeDimensionCloseYYYYMM.label,2) is because I am dealing with "YYYYMM" and I only want the "MM" portion.

=iif(right(Parameters!ToTimeDimensionCloseYYYYMM.label,2)=01,Monthname(12),monthname(right(Parameters!ToTimeDimensionCloseYYYYMM.label,2)))

When I use this formula it will work for December, however for the rest of the months if a user chose 200603, it will read "March" when I really want it to read "February".

=iif(right(Parameters!ToTimeDimensionCloseYYYYMM.label,2)=01,Monthname(12),monthname(right(Parameters!ToTimeDimensionCloseYYYYMM.label,2)-1)))

However, when I try and write the formula I really want (above), it will work for February through December (giving me the prior month), but if a user chose 200601 (January) as their last Month, it reads "#ERROR", instead of "December"

The error it give me is = [rsRuntimeErrorInExpression] The Value expression for the textbox ‘textbox1’ contains an error: Argument 'Month' is not a valid value.

I have tried several different "versions" of this, including just telling it to put "December", putting "last" in front of the monthname instead of "-1", trying to use "Previous" (which I don't understand but doesn't seem to work either), to try to get it to recognize that I want it to give me the previous month when the user selects the current month, with no success. It seems as if the "-1" at the end causes it to break, because if I take the "-1" out, it works fine except I don't get the previous month for February through December.

Monthname needs an Integer parameter, so try

=iif(right(Parameters!ToTimeDimensionCloseYYYYMM.label,2)="01",Monthname(12),monthname(Cint(right(Parameters!ToTimeDimensionCloseYYYYMM.label,2))-1))

Regards

Ayzan

|||

Thanks Ayzan, but it still gives me the same thing:

If the parameter selected = 200602, then it gives me January;

If the parameter selected = 200607, then it gives me June,

But as soon as the parameter selected = 200601, it gives me "#ERROR" instead of December, with the same message that Argument 'Month' is not a valid expression.

It's almost as if it doesn't even recognize the first part of the expression with the -1 in it...b/c if I take out the -1 then it give me December for 200601, but then it gives me "February" for 200602 and "July" for 200607 when I really want "January" and "June".

Thanks again for your help...any additional help would be greatly appreciated.

|||

Create an instance of the DateTime struct and use the .NET functions it has to perform date arithmetic

=MonthName(
new DateTime(
CInt( Left( Parameters!ToTimeDimensionCloseYYYYMM.Label, 4 ) ) //Year
, CInt( Right( Parameters!ToTimeDimensionCloseYYYYMM.Label, 2 ) ) //Month
, 1 //Day
).AddMonths( -1 ).Month //Subtract a month and then access the Month Property
)

|||

If you find it runs slowly then you could use an Iif statement as follows:

=MonthName(
Iif(
CInt( Right( Parameters!ToTimeDimensionCloseYYYYMM.Label, 2 ) ) = 1
, 12
, CInt( Right( Parameters!ToTimeDimensionCloseYYYYMM.Label, 2 ) ) - 1
)
)

|||Adam, Thank you so much!!!! I used the iif statement as I am combining it with other Text and it works perfectly.

Problem using EXEC() to run DBCC DBREINDEX

I am trying to run DBCC DBREINDEX using EXEC(), code is below.
Based upon the error message at the bottom, the @.currenttable variable
receives the value 1 but when @.currenttable is referenece in the DBCC
statement, the value isn't there. Can anyone tell me what I'm doing wrong?
declare @.sqltest varchar(40), @.currenttable int
set @.currenttable = (select table_id from Table_Space where table_id = 1)
set @.sqltest = 'DBCC DBREINDEX(''@.currenttable'','''',75)'
print @.currenttable
print @.sqltest
EXEC(@.sqltest)
Below is the message I get:
1
DBCC DBREINDEX('@.currenttable','',75)
Server: Msg 2501, Level 16, State 1, Line 1
Could not find a table or object named '@.currenttable'. Check sysobjects.nosurfdj,
DBCC DBREINDEX expects a table name and there is not table named
'@.currenttable'.
declare @.sqltest varchar(40), @.currenttable int
declare @.tn sysname
set @.tn = (select table_name from Table_Space where table_id = 1)
set @.sqltest = 'DBCC DBREINDEX(''' + @.tn + ''','''',75)'
print @.currenttable
print @.sqltest
EXEC(@.sqltest)
go
AMB
"nosurfdj" wrote:

> I am trying to run DBCC DBREINDEX using EXEC(), code is below.
> Based upon the error message at the bottom, the @.currenttable variable
> receives the value 1 but when @.currenttable is referenece in the DBCC
> statement, the value isn't there. Can anyone tell me what I'm doing wrong
?
> declare @.sqltest varchar(40), @.currenttable int
> set @.currenttable = (select table_id from Table_Space where table_id = 1)
> set @.sqltest = 'DBCC DBREINDEX(''@.currenttable'','''',75)'
> print @.currenttable
> print @.sqltest
> EXEC(@.sqltest)
> Below is the message I get:
> 1
> DBCC DBREINDEX('@.currenttable','',75)
> Server: Msg 2501, Level 16, State 1, Line 1
> Could not find a table or object named '@.currenttable'. Check sysobjects.
>|||Quote problems around ''@.currenttable''.
Try:
'DBCC DBREINDEX(' + @.currenttable + ','''',75)'
--
Arnie Rowland, YACE*
"To be successful, your heart must accompany your knowledge."
*Yet Another certification Exam
"nosurfdj" <nosurfdj@.discussions.microsoft.com> wrote in message news:2406FBD3-FD2A-4F69-8A
8E-F446DC1473BF@.microsoft.com...
>I am trying to run DBCC DBREINDEX using EXEC(), code is below.
> Based upon the error message at the bottom, the @.currenttable variable
> receives the value 1 but when @.currenttable is referenece in the DBCC
> statement, the value isn't there. Can anyone tell me what I'm doing wrong
?
>
> declare @.sqltest varchar(40), @.currenttable int
> set @.currenttable = (select table_id from Table_Space where table_id = 1)
> set @.sqltest = 'DBCC DBREINDEX(''@.currenttable'','''',75)'
> print @.currenttable
> print @.sqltest
> EXEC(@.sqltest)
>
> Below is the message I get:
> 1
> DBCC DBREINDEX('@.currenttable','',75)
> Server: Msg 2501, Level 16, State 1, Line 1
> Could not find a table or object named '@.currenttable'. Check sysobjects.
>|||I knew it was going to be something simple.
Thanks for your help-that did it.
"Alejandro Mesa" wrote:
> nosurfdj,
> DBCC DBREINDEX expects a table name and there is not table named
> '@.currenttable'.
> declare @.sqltest varchar(40), @.currenttable int
> declare @.tn sysname
> set @.tn = (select table_name from Table_Space where table_id = 1)
> set @.sqltest = 'DBCC DBREINDEX(''' + @.tn + ''','''',75)'
> print @.currenttable
> print @.sqltest
> EXEC(@.sqltest)
> go
>
> AMB
> "nosurfdj" wrote:
>

Monday, February 20, 2012

Problem using bcp with SQL MSDE

I successfully tested a bcp command similar to that below on a Small Business Manager database using SQL Enterprise Edition:
bcp "SELECT EMPLOYID FROM TWO..UPR00100" queryout testfile.txt -U login -P -C
I then tried using the same basic command for another Small Business Manager installation using SQL Desktop Edition. But I get the following:
SQLState = 08001, NativeError = 17
Error = [Microsoft][ODBC SQL Server Driver][DBNETLIB] SQL Server does not
exist or access denied.
The only other difference I'm aware of aside from the SQL edition is that an
'sa' password exists for the second environment. But I put the password in
the bcp command.
Does anyone have an idea why the bcp command works in the one
environment but not the other?
Thanks,
Tom
hi Tom,
"Tom Glasser" <Tom Glasser@.discussions.microsoft.com> ha scritto nel
messaggio news:3076FF6F-2708-4908-9149-6B0E148E6087@.microsoft.com...
> I successfully tested a bcp command similar to that below on a Small
Business Manager database using SQL Enterprise Edition:
> bcp "SELECT EMPLOYID FROM TWO..UPR00100" queryout testfile.txt -U
login -P -C
> I then tried using the same basic command for another Small Business
Manager installation using SQL Desktop Edition. But I get the following:
> SQLState = 08001, NativeError = 17
> Error = [Microsoft][ODBC SQL Server Driver][DBNETLIB] SQL Server does not
> exist or access denied.
> The only other difference I'm aware of aside from the SQL edition is that
an
> 'sa' password exists for the second environment. But I put the password
in
> the bcp command.
> Does anyone have an idea why the bcp command works in the one
> environment but not the other?
>
please have a look at
http://support.microsoft.com/default...B;EN-US;328306
it's possible that your 2nd environment does not accept SQL Server
authenticated connection... if this is the case, please have a look at
http://support.microsoft.com/default...b;en-us;285097 for further
info on how to hack the Windows Registry in order to allow SQL Server
quthenticated connections..
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.8.0 - DbaMgr ver 0.54.0
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply

Problem using bcp with SQL MSDE

I successfully tested a bcp command similar to that below on a Small Business Manager database using SQL Enterprise Edition:
bcp "SELECT EMPLOYID FROM TWO..UPR00100" queryout testfile.txt -U login -P -C
I then tried using the same basic command for another Small Business Manager installation using SQL Desktop Edition. But I get the following:
SQLState = 08001, NativeError = 17
Error = [Microsoft][ODBC SQL Server Driver][DBNETLIB] SQL Server does not
exist or access denied.
The only other difference I'm aware of aside from the SQL edition is that an
'sa' password exists for the second environment. But I put the password in
the bcp command.
Does anyone have an idea why the bcp command works in the one
environment but not the other?
Thanks,
Tom
hi Tom,
"Tom Glasser" <Tom Glasser@.discussions.microsoft.com> ha scritto nel
messaggio news:3076FF6F-2708-4908-9149-6B0E148E6087@.microsoft.com...
> I successfully tested a bcp command similar to that below on a Small
Business Manager database using SQL Enterprise Edition:
> bcp "SELECT EMPLOYID FROM TWO..UPR00100" queryout testfile.txt -U
login -P -C
> I then tried using the same basic command for another Small Business
Manager installation using SQL Desktop Edition. But I get the following:
> SQLState = 08001, NativeError = 17
> Error = [Microsoft][ODBC SQL Server Driver][DBNETLIB] SQL Server does not
> exist or access denied.
> The only other difference I'm aware of aside from the SQL edition is that
an
> 'sa' password exists for the second environment. But I put the password
in
> the bcp command.
> Does anyone have an idea why the bcp command works in the one
> environment but not the other?
>
please have a look at
http://support.microsoft.com/default...B;EN-US;328306
it's possible that your 2nd environment does not accept SQL Server
authenticated connection... if this is the case, please have a look at
http://support.microsoft.com/default...b;en-us;285097 for further
info on how to hack the Windows Registry in order to allow SQL Server
quthenticated connections..
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.8.0 - DbaMgr ver 0.54.0
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply