Showing posts with label named. Show all posts
Showing posts with label named. Show all posts

Thursday, March 29, 2012

Error installing SQL2005 SP2

I'm trying to install SP2 for SQL 2005 on Win 2003 sp1. Right now 2005 is installed as a named instance with a 2000 instance running on the same box.

I get this in the log files:

<Func Name='LaunchFunction'>
Function=Do_sqlPerfmon2
<Func Name='GetCAContext'>
<EndFunc Name='GetCAContext' Return='T' GetLastError='0'>
Doing Action: Do_sqlPerfmon2
PerfTime Start: Do_sqlPerfmon2 : Wed May 23 10:09:03 2007
<Func Name='Do_sqlPerfmon2'>
Error copying file(C:\Program Files\Microsoft SQL Server\90\DTS\Binn\DTSSVCPERF.INI) to file(C:\Program Files\Microsoft SQL Server\90\DTS\Binn\perf-DTSSVCPERF.INI). Error code 2
MSI (s) (5C!64) [10:09:03:671]: Transforming table Error.

MSI (s) (5C!64) [10:09:03:688]: Transforming table Error.

MSI (s) (5C!64) [10:09:03:688]: Note: 1: 2262 2: Error 3: -2147287038
Error Code: 1603
MSI (s) (5C!64) [10:09:03:723]: Transforming table Error.

MSI (s) (5C!64) [10:09:03:740]: Transforming table Error.

MSI (s) (5C!64) [10:09:03:740]: Note: 1: 2262 2: Error 3: -2147287038
MSI (s) (5C!64) [10:09:03:740]: Product: Microsoft SQL Server 2005 Integration Services -- Error 29528. The setup has encountered an unexpected error while Installing performance counters. The error is: The system cannot find the file specified.

Error 29528. The setup has encountered an unexpected error while Installing performance counters. The error is: The system cannot find the file specified.

<EndFunc Name='LaunchFunction' Return='1603' GetLastError='0'>
MSI (s) (5C:38) [10:09:03:757]: User policy value 'DisableRollback' is 0
MSI (s) (5C:38) [10:09:03:757]: Machine policy value 'DisableRollback' is 0
Action ended 10:09:03: InstallFinalize. Return value 3.

Can you please check to see if you have the appropriate permissions for the DTSSVCPERF.INI. The error seems to indicate there is a problem copying the file.

Error copying file(C:\Program Files\Microsoft SQL Server\90\DTS\Binn\DTSSVCPERF.INI) to file(C:\Program Files\Microsoft SQL Server\90\DTS\Binn\perf- DTSSVCPERF.INI). Error code 2

|||upon closer inspection I seem to be missing that file for some reason... how do I get it back?
|||Do you have any other server where in you can check to see if you can copy it from there?. I am not sure how the file went missing in the first place. If you dont have any other server then I would suggest that you perform a fresh installation of SQL 2005 on a test box and copy it to your production server.

Thursday, March 22, 2012

error in WHERE statement

dear sirs i am using sql server 2000 enterprise edition, i am new to sql server and also am learning the sql language...

I have a table named spt_datatype_info
that table has a column called TYPE_NAME
I have given a WHERE statement in a query:

SELECT *
FROM spt_datatype_info
WHERE (TYPE_NAME = smallint)

i know actually the value smallint has to be given in quotes...
Now my question is: When i give the Verify SQL syntax
then it does not return any error, but when i run it...then it given the following error...

[Microsoft][ODBC SQL Server Driver][SQL Server]Invalid column name 'smallint'.

what does this mean...??
If the SQL statement is wrong then it should return an error when verifying the statement...

regards,
kanishkit's because this sql is perfectly valid in terms of syntax:

SELECT *
FROM spt_datatype_info
WHERE (TYPE_NAME = smallint)

The only reason it fails is because there is no column named smallint in that table. That's not a syntax error.

Now this query, on the other hand, works, because both columns exist, and has exactly the same form as yours:

SELECT *
FROM spt_datatype_info
WHERE TYPE_NAME = LOCAL_TYPE_NAME

is that what you are asking?|||not actually, i was saying that i was looking for a value in the column TYPE_NAME named smallint

I was giving the WHERE clause to look for a value called smallint in the column TYPE_NAME. the column has many vaules in it...smallint is one of them...

maybe i should have written it as:

SELECT *
FROM spt_datatype_info
WHERE (TYPE_NAME = 'smallint')

Since i am new to SQL language....what were you refering to...??...Although i quite got my answer...

Can you please tell me...what is the intersection of the column and row called??....for example in ms Excel when the row 7 and column D meet then a cell is formed...called D7

But in SQl server...what is the intersection of the Column and Row called...?? Like the cell in ms Excel...??

regards,
kanishk|||the original query you wrote,

SELECT *
FROM spt_datatype_info
WHERE (TYPE_NAME = smallint)

means:

"give me all rows in spt_datatype_info where the value in the TYPE_NAME column equals the value in the smallint column"

This query failed because there is no column named smallint in that table.

The query you MEANT to write,

SELECT *
FROM spt_datatype_info
WHERE TYPE_NAME = 'smallint'

means:

"give me all rows in spt_datatype_info where the value in the TYPE_NAME column equals 'smallint' "

see the difference?|||the intersection of row and column is called "the value of column Y for row X"

:cool:

i realize that sounds somewhat flippant, but relational database theory is based upon primary keys, so "row X" means "the row where the primary key value is X" since that's how you tell rows apart, and "column Y" means "the column with 'Y' as the column name" since that's how you tell columns apart

simple, innit ;)|||the original query you wrote,

SELECT *
FROM spt_datatype_info
WHERE (TYPE_NAME = smallint)

means:

"give me all rows in spt_datatype_info where the value in the TYPE_NAME column equals the value in the smallint column"

This query failed because there is no column named smallint in that table.

The query you MEANT to write,

SELECT *
FROM spt_datatype_info
WHERE TYPE_NAME = 'smallint'

means:

"give me all rows in spt_datatype_info where the value in the TYPE_NAME column equals 'smallint' "

see the difference?

thanks, i was wondering that when i give the command that you gave up...viz,

SELECT *
FROM spt_datatype_info
WHERE TYPE_NAME = 'smallint'

when i run it, then automatically the TYPE_NAME column takes brackets,,,why is that??...i have shown it below...

SELECT *
FROM spt_datatype_info
WHERE (TYPE_NAME = 'smallint')

regards,
kanishk|||That is because you are running this query in the SQL section of enterprise manager. Enterprise manager will try to bracket all where conditions
so if your query is something like

SELECT *
FROM spt_datatype_info
WHERE TYPE_NAME = 'smallint' OR TYPE_NAME = 'int'

Then on running it you will get

SELECT *
FROM spt_datatype_info
WHERE (TYPE_NAME = 'smallint') OR (TYPE_NAME = 'int')

Try running the query in SQL Analyzer and you will not get the brackets..... however i guess the brackets are purely for readability and in the end finally makes no difference.....|||dear sir, i have started using the SQL query Analyzer, i have another question,
i just put in the LIKE condition...

SELECT * FROM spt_datatype_info WHERE TYPE_NAME LIKE '%s'

now this will give all the values in the TYPE_NAME column which start with any characters but end with 's' , thats why i have put '%s' , now suppose i want all the values that have 2 letters as starting and the 3rd letter as 's' , so what do symbol do i use??

Like in windows when we used to give in command prompt the ! , exclamation mark for the characters we did not know but were sure of the count of them, and the star '*' for the characters we did not know and were not sure of their count..

Similarly in SQL what would we give for the LIKE condition..??

regards,
kanishk|||... LIKE '__s%'this is all explained nicely in the manual

Wednesday, March 21, 2012

Error in SQL Query Analyzer when running script in ISQL

I am using SQL 2000 Named Instance with SP3a on a Windows 2000 Server OS
When running this script below I get the following error:
declare @.answer as int
declare @.load_id as int
declare @.dos_command as varchar(500)
set @.load_id = 1
exec @.answer = cp_is_file_ready @.load_id
if (@.answer = 1)
begin
set @.dos_command =
'isql -Sserver -sa -Ppassword -database -Q"exec cp_import_data ' +
convert(varchar(10), @.load_id) + '"'
exec master..xp_cmdshell @.dos_command
end
ERROR MESSAGE:
Msg 18456, Level 14, State 1:
Login failed for user 'sa'.
DB-Library: Login incorrect.
NULL
I checked the sa password and it works for registering the SQL Instance via
the SQL Client and works when connecting to SQL Query Analyzer with it. But
for some reason it blows up when using ISQL.
I am baffled at this point.
Any help is greatly appreciated.Hi,
Replace -U (user) and -P (password) with -E option in ISQL .
I feel the password you enter for the instance is wrong.
Thanks
Hari
MCDBA
"GI" <glenn.illig@.healthtrio.com> wrote in message
news:ej6JV6s1DHA.1752@.tk2msftngp13.phx.gbl...
quote:

> I am using SQL 2000 Named Instance with SP3a on a Windows 2000 Server OS
> When running this script below I get the following error:
> declare @.answer as int
> declare @.load_id as int
> declare @.dos_command as varchar(500)
>
> set @.load_id = 1
>
> exec @.answer = cp_is_file_ready @.load_id
> if (@.answer = 1)
> begin
>
> set @.dos_command =
> 'isql -Sserver -sa -Ppassword -database -Q"exec cp_import_data ' +
> convert(varchar(10), @.load_id) + '"'
> exec master..xp_cmdshell @.dos_command
> end
>
> ERROR MESSAGE:
> Msg 18456, Level 14, State 1:
> Login failed for user 'sa'.
> DB-Library: Login incorrect.
> NULL
>
> I checked the sa password and it works for registering the SQL Instance

via
quote:

> the SQL Client and works when connecting to SQL Query Analyzer with it.

But
quote:

> for some reason it blows up when using ISQL.
> I am baffled at this point.
> Any help is greatly appreciated.
>
>
>
|||GI (glenn.illig@.healthtrio.com) writes:
quote:

> I am using SQL 2000 Named Instance with SP3a on a Windows 2000 Server OS
> When running this script below I get the following error:
> declare @.answer as int
> declare @.load_id as int
> declare @.dos_command as varchar(500)
> set @.load_id = 1
> exec @.answer = cp_is_file_ready @.load_id
> if (@.answer = 1)
> begin
> set @.dos_command =
> 'isql -Sserver -sa -Ppassword -database -Q"exec cp_import_data ' +
> convert(varchar(10), @.load_id) + '"'
> exec master..xp_cmdshell @.dos_command
> end

If the instance name is SERVER\INSTANCE, does your command line
actually say -S SERVER\INSTANCE? If you only say -S SERVER, you are
trying to connect to the default instance which may have a
different password.
Rather than hardcoding the server name, it may be better to use the
global variable @.@.servername.
Another possible cause is that the password includes non-ASCII characters.
The will be converted to the OEM charset - or a fallback if not available
in the OEM charset. In any case, using -E is much better, since you don't
have to hardcode the password.
Erland Sommarskog, SQL Server MVP, sommar@.algonet.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.aspsql