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

Tuesday, March 20, 2012

[Venting]

So I have this box with SQL Server 2000, Evaluation edition of SQL 2005
which has top be installed as a named instance because of the way that 2K &
2K5 co-exist on the same box, and then there are a couple silly apps I have
that install MSDE as other named instances.
and the STUPI .NET DATA CONNECTION DIALOG doesn't have a field geared toward
named instances.
@.#$%^&
I will now crawl back under my rock.
Peace & happy computing,
Mike Labosh, MCSD MCT
Owner, vbSensei.Com
"Escriba coda ergo sum." -- vbSenseiCan you edit the connection string in web.config or the source code?
"Mike Labosh" <mlabosh_at_vbsensei_dot_com> wrote in message
news:uwZSfc5PGHA.4900@.TK2MSFTNGP09.phx.gbl...
> So I have this box with SQL Server 2000, Evaluation edition of SQL 2005
> which has top be installed as a named instance because of the way that 2K
> &
> 2K5 co-exist on the same box, and then there are a couple silly apps I
> have
> that install MSDE as other named instances.
> and the STUPI .NET DATA CONNECTION DIALOG doesn't have a field geared
> toward
> named instances.
> @.#$%^&
> I will now crawl back under my rock.
>
> --
> Peace & happy computing,
> Mike Labosh, MCSD MCT
> Owner, vbSensei.Com
> "Escriba coda ergo sum." -- vbSensei
>|||> Can you edit the connection string in web.config or the source code?
2K
Of course I can. It just angers me that the silly little foolish dialog
doesn't let me say so.
Peace & happy computing,
Mike Labosh, MCSD MCT
Owner, vbSensei.Com
"Escriba coda ergo sum." -- vbSensei

Tuesday, March 6, 2012

[Named Pipes]Specified Sql server not found]

I am trying to create Sql Server 2000 remotely using and getting following e
rror on some of the machine, but on some of the machine it is working fine.
All client machine having W2K Prof.
"[Microsoft[[ODBC Sql Server Driver][Named Pipes]Specified S
ql server not found"
Server alias/client using TCP/IP utility. Earlier it was working fine on all
the machine. I only installed Sql Server SP3a, after that it is starting gi
vig the problem.
Let me khow do I handle this.
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.693 / Virus Database: 454 - Release Date: 05/31/2004I sort out the problem, by installing MDAC 2.8. Now it is working fine.
"Ashish Kanoongo" <ashishk@.armour.com> wrote in message news:OwSuidHSEHA.139
2@.TK2MSFTNGP09.phx.gbl...
I am trying to create Sql Server 2000 remotely using and getting following e
rror on some of the machine, but on some of the machine it is working fine.
All client machine having W2K Prof.
"[Microsoft[[ODBC Sql Server Driver][Named Pipes]Specified S
ql server not found"
Server alias/client using TCP/IP utility. Earlier it was working fine on all
the machine. I only installed Sql Server SP3a, after that it is starting gi
vig the problem.
Let me khow do I handle this.
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.693 / Virus Database: 454 - Release Date: 05/31/2004|||Get the actual OS Error number. Example if the Error is 53, then the error
is Network Name not Found. Usually a WINS issue.
Test with a ODBC DSN to get the entire error message and re-post it here.
Thanks,
Kevin McDonnell
Microsoft Corporation
This posting is provided AS IS with no warranties, and confers no rights.

[Named Pipes]Specified Sql server not found]

I am trying to create Sql Server 2000 remotely using and getting following error on some of the machine, but on some of the machine it is working fine. All client machine having W2K Prof.
"[Microsoft[[ODBC Sql Server Driver][Named Pipes]Specified Sql server not found"
Server alias/client using TCP/IP utility. Earlier it was working fine on all the machine. I only installed Sql Server SP3a, after that it is starting givig the problem.
Let me khow do I handle this.
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.693 / Virus Database: 454 - Release Date: 05/31/2004
I sort out the problem, by installing MDAC 2.8. Now it is working fine.
"Ashish Kanoongo" <ashishk@.armour.com> wrote in message news:OwSuidHSEHA.1392@.TK2MSFTNGP09.phx.gbl...
I am trying to create Sql Server 2000 remotely using and getting following error on some of the machine, but on some of the machine it is working fine. All client machine having W2K Prof.
"[Microsoft[[ODBC Sql Server Driver][Named Pipes]Specified Sql server not found"
Server alias/client using TCP/IP utility. Earlier it was working fine on all the machine. I only installed Sql Server SP3a, after that it is starting givig the problem.
Let me khow do I handle this.
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.693 / Virus Database: 454 - Release Date: 05/31/2004
|||Get the actual OS Error number. Example if the Error is 53, then the error
is Network Name not Found. Usually a WINS issue.
Test with a ODBC DSN to get the entire error message and re-post it here.
Thanks,
Kevin McDonnell
Microsoft Corporation
This posting is provided AS IS with no warranties, and confers no rights.

Saturday, February 11, 2012

@local_var really cannot hold table name ?

Hi,
I have tables named like ag97a027, ag98a027, ... where 97 and 98 is
from year 1997, 1998 and a027 is just specification of product type. I
need carry out repeated operataions over these tables. To generate
their names is easy, for example

use [P5-01]
declare @.Yint int, @.Y char(2), @.tabName char(8)
set @.Yint = 1997
while @.Yint < 2002
begin
set @.tabName = 'ag' + substring(convert(char(4),@.Yint),3,2)+'a027'
print @.tabName
set @.Yint = @.Yint + 1
/*
select *
from @.tabName
*/
end

prints properly

ag97a027
ag98a027
ag99a027
ag00a027
ag01a027

but when I uncomment the select statement, MS-SQL server responds:
Server: Msg 137, Level 15, State 2, Line 11
Must declare the variable '@.tabName'.

How to use @.local_variable for browsing through tables in above
described way?

thanks
MartinOn 23 May 2004 23:10:43 -0700, Martin Mrazek wrote:

>Hi,
>I have tables named like ag97a027, ag98a027, ... where 97 and 98 is
>from year 1997, 1998 and a027 is just specification of product type. I
>need carry out repeated operataions over these tables. To generate
>their names is easy, for example
>use [P5-01]
>declare @.Yint int, @.Y char(2), @.tabName char(8)
>set @.Yint = 1997
>while @.Yint < 2002
>begin
> set @.tabName = 'ag' + substring(convert(char(4),@.Yint),3,2)+'a027'
> print @.tabName
> set @.Yint = @.Yint + 1
>/*
> select *
> from @.tabName
>*/
>end
>prints properly
>ag97a027
>ag98a027
>ag99a027
>ag00a027
>ag01a027
>but when I uncomment the select statement, MS-SQL server responds:
>Server: Msg 137, Level 15, State 2, Line 11
>Must declare the variable '@.tabName'.
>How to use @.local_variable for browsing through tables in above
>described way?
>thanks
>Martin

Hi Martin,

The error message is caused because SQL Server accepts either a literal
table name or a table variable in the from clause. The @. denotes the next
thing as a variable, so SQL Server will try to find a table variable
called @.tabName, which it can't find.

The best answer to your question is: change your table design. Generally
speaking, 99 out of 100 cases where each year's data is stored in a
seperate table are better off storing everything in one table (adding a
"year" column if there isn't already a "date" column that can serve this
purpose), or using a two table design (one "current" table and one
"history" table), again adding a "year" column if needed.

If you feel you must do it this way, google this newsgroup for "dynamic
SQL". That's the kludge that will do what you're trying to achieve.

(I assume that the above SQL is used only to illustrate your problem and
that you're not actually using "select *" in production code or printing
all data in all tables - who would ever want to read that much output??).

Best, Hugo
--

(Remove _NO_ and _SPAM_ to get my e-mail address)|||mrazek@.compik.fd.cvut.cz (Martin Mrazek) wrote in message news:<dcd39e84.0405232210.5a75aeb6@.posting.google.com>...
> Hi,
> I have tables named like ag97a027, ag98a027, ... where 97 and 98 is
> from year 1997, 1998 and a027 is just specification of product type. I
> need carry out repeated operataions over these tables. To generate
> their names is easy, for example
> use [P5-01]
> declare @.Yint int, @.Y char(2), @.tabName char(8)
> set @.Yint = 1997
> while @.Yint < 2002
> begin
> set @.tabName = 'ag' + substring(convert(char(4),@.Yint),3,2)+'a027'
> print @.tabName
> set @.Yint = @.Yint + 1
> /*
> select *
> from @.tabName
> */
> end
> prints properly
> ag97a027
> ag98a027
> ag99a027
> ag00a027
> ag01a027
> but when I uncomment the select statement, MS-SQL server responds:
> Server: Msg 137, Level 15, State 2, Line 11
> Must declare the variable '@.tabName'.
> How to use @.local_variable for browsing through tables in above
> described way?
> thanks
> Martin

You can use dynamic SQL for this (see below), but read this first to
understand why you probably shouldn't:

http://www.sommarskog.se/dynamic_sql.html#Sales_yymm

Simon

declare @.tblname sysname
set @.tblname = 'MyTable'
exec('select * from ' + @.tblname)|||Martin Mrazek (mrazek@.compik.fd.cvut.cz) writes:
> How to use @.local_variable for browsing through tables in above
> described way?

The answer is you don't. Well, you can if you go over hops of dynamic
SQL, but you should really only have one table, with year and product
types as keys in your one single table.

If you have some application which really requires all these tables,
then set up a view over all the tables, with year and product type
added:

CREATE VIEW all_my_tables (year, product_type, col1, col2, col3, ...) AS
SELECT '1998', 'a027', col1, col2, col3,
FROM ag98a027
UNION ALL
SELECT '1999', 'a027', col1, col2, col3,
FROM ag99a027
UNION ALL
...

--
Erland Sommarskog, SQL Server MVP, sommar@.algonet.se

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

@@version, add database to a named instance?

Hi,
I have a sql 2000 personal editon(default server) and developer edition
(named) installed on a machine (windowsXP).
1) if I do 'select @.@.version' in query, I always get 'personal edition'
version information back. How can I get the version nformation of developer
edition?
2)How do I use Enterprise Manager to create a database with developer editon
server instance?
THANKS!
It tells you the version of the server you are connecting to. If you want
the version of developer edition you need to connect to it first.
"bangwo" <bangwo@.discussions.microsoft.com> wrote in message
news:977874AC-FC88-4DB2-9AA2-76095F35BABF@.microsoft.com...
> Hi,
> I have a sql 2000 personal editon(default server) and developer edition
> (named) installed on a machine (windowsXP).
> 1) if I do 'select @.@.version' in query, I always get 'personal edition'
> version information back. How can I get the version nformation of
> developer
> edition?
> 2)How do I use Enterprise Manager to create a database with developer
> editon
> server instance?
> THANKS!
|||"ME",
I couldn't find a way to 'connect' to the server instance of developer
edition in the sql enterprise maganer. Hope you can help me on this. Thanks
!!
"ME" wrote:

> It tells you the version of the server you are connecting to. If you want
> the version of developer edition you need to connect to it first.
>
> "bangwo" <bangwo@.discussions.microsoft.com> wrote in message
> news:977874AC-FC88-4DB2-9AA2-76095F35BABF@.microsoft.com...
>
>
|||well, if you open Server Network Utility you should see the instance name of
your SQL Edition server. Use that instance name to connect ...
"bangwo" <bangwo@.discussions.microsoft.com> wrote in message
news:AB497B9C-D604-4F46-B65C-F898D5D99359@.microsoft.com...[vbcol=seagreen]
> "ME",
> I couldn't find a way to 'connect' to the server instance of developer
> edition in the sql enterprise maganer. Hope you can help me on this.
> Thanks
> !!
> "ME" wrote:
|||Hello,
Go to the SQL Server log of the SQL Server Developer edition installation
(C:\program files\Microsoft SQL Server\Logs\ folder).
In the error log the name of the SQL Server installation will be shown. You
could use that information to either register to Enterprise manager or
connect to Query Analyzer. After that you could execute SELECT @.@.Version.
Thanks
hari
"bangwo" <bangwo@.discussions.microsoft.com> wrote in message
news:AB497B9C-D604-4F46-B65C-F898D5D99359@.microsoft.com...[vbcol=seagreen]
> "ME",
> I couldn't find a way to 'connect' to the server instance of developer
> edition in the sql enterprise maganer. Hope you can help me on this.
> Thanks
> !!
> "ME" wrote:

@@version, add database to a named instance?

Hi,
I have a sql 2000 personal editon(default server) and developer edition
(named) installed on a machine (windowsXP).
1) if I do 'select @.@.version' in query, I always get 'personal edition'
version information back. How can I get the version nformation of developer
edition?
2)How do I use Enterprise Manager to create a database with developer editon
server instance?
THANKS!It tells you the version of the server you are connecting to. If you want
the version of developer edition you need to connect to it first.
"bangwo" <bangwo@.discussions.microsoft.com> wrote in message
news:977874AC-FC88-4DB2-9AA2-76095F35BABF@.microsoft.com...
> Hi,
> I have a sql 2000 personal editon(default server) and developer edition
> (named) installed on a machine (windowsXP).
> 1) if I do 'select @.@.version' in query, I always get 'personal edition'
> version information back. How can I get the version nformation of
> developer
> edition?
> 2)How do I use Enterprise Manager to create a database with developer
> editon
> server instance?
> THANKS!|||"ME",
I couldn't find a way to 'connect' to the server instance of developer
edition in the sql enterprise maganer. Hope you can help me on this. Thanks
!!
"ME" wrote:

> It tells you the version of the server you are connecting to. If you want
> the version of developer edition you need to connect to it first.
>
> "bangwo" <bangwo@.discussions.microsoft.com> wrote in message
> news:977874AC-FC88-4DB2-9AA2-76095F35BABF@.microsoft.com...
>
>|||well, if you open Server Network Utility you should see the instance name of
your SQL Edition server. Use that instance name to connect ...
"bangwo" <bangwo@.discussions.microsoft.com> wrote in message
news:AB497B9C-D604-4F46-B65C-F898D5D99359@.microsoft.com...[vbcol=seagreen]
> "ME",
> I couldn't find a way to 'connect' to the server instance of developer
> edition in the sql enterprise maganer. Hope you can help me on this.
> Thanks
> !!
> "ME" wrote:
>|||Hello,
Go to the SQL Server log of the SQL Server Developer edition installation
(C:\program files\Microsoft SQL Server\Logs\ folder).
In the error log the name of the SQL Server installation will be shown. You
could use that information to either register to Enterprise manager or
connect to Query Analyzer. After that you could execute SELECT @.@.Version.
Thanks
hari
"bangwo" <bangwo@.discussions.microsoft.com> wrote in message
news:AB497B9C-D604-4F46-B65C-F898D5D99359@.microsoft.com...[vbcol=seagreen]
> "ME",
> I couldn't find a way to 'connect' to the server instance of developer
> edition in the sql enterprise maganer. Hope you can help me on this.
> Thanks
> !!
> "ME" wrote:
>