Tuesday, March 27, 2012
EnumAvailableSqlServers does not return version numbers correctly
I have a machine that has just SQL2005 (as default instance with no instance
name.) I am trying to list all SQL 2005 server instances on the network usin
g
SmoApplication.EnumAvailableSqlServers( ) and trying to filter the servers
based on version information. This machine shows up in the list, but does no
t
have version information. I saw another post on Sql Server Programming
newgroup without any response. Is this a known bug in SMO? If it is, does
anyone know how I can list SQL2005 servers only on a network that has both
SQL2005 and SQL2000 servers?
Any help is geratly appreciated.SMO in its current implementation uses
SqlDataSourceEnumerator.GetDataSources under the cover (
http://msdn2.microsoft.com/en-us/li...
etdatasources(VS.80).aspx)
Can you try writing calling this instead and see if you get the version?
This can help us isolate the problem.
Thanks,
--
Ciprian Gerea
SDE, SqlServer
This posting is provided "AS IS" with no warranties, and confers no rights.
"Raghu" <Raghu@.discussions.microsoft.com> wrote in message
news:7EB858DE-22E5-41B3-B46A-1D8229406630@.microsoft.com...
> Hi,
> I have a machine that has just SQL2005 (as default instance with no
> instance
> name.) I am trying to list all SQL 2005 server instances on the network
> using
> SmoApplication.EnumAvailableSqlServers( ) and trying to filter the servers
> based on version information. This machine shows up in the list, but does
> not
> have version information. I saw another post on Sql Server Programming
> newgroup without any response. Is this a known bug in SMO? If it is, does
> anyone know how I can list SQL2005 servers only on a network that has both
> SQL2005 and SQL2000 servers?
> Any help is geratly appreciated.
Thursday, March 22, 2012
Enterprise Mgr quits after SQL2005 registering
I have both SQL2000 (default) and SQL2005 (second instance) on my laptop. Just to see if it could be done, I registered my (Local) SQL2000 default instance in the Registered Servers part of SQL2005 Mgmt Studio. It worked fine. I can see all the SQL2000 databases, etc in the Mgmt Studio.
But now the SQL2000 default instance will not connect in Enterprise Mgr nor can any of the programs that used to connect to the SQL2000 databases now connect to them. The (local) instance shows in Ent Mgr with the green arrow like it is there but Ent Mgr cannot connect when icon is clicked.
Is there anything I can do to bring the default SQL2000 instance back to be able to connect with anything other than the SQL2005 Mgmt Studio?
Do you get an error ? Which one ?
HTH, Jens K. Suessmeyer.
http://www.sqlserver2005.de
|||
The local node shows in the tree with a white circle with a green arrowhead inside the circle. Which indicates to me that the SQL instance is running and the Ent Mgr sees it. But when I click on the plus beside the node, I get the error:
A connection could not be established to (LOCAL)
Reason: SQL Server does not exist or access denied
ConnectionOpen(Connect())....
Please verify SQL Server is running and check your SQLServer registration properties (by right-clicking on the (LOCAL) node) and try again.
But I can go to the SQL2005 Mgmt Studio and click on (LOCAL) and see all the stuff in it. In Mgmt Studio, the properties for (LOCAL) show version 8.x of SQLServer.
Wednesday, March 21, 2012
Enterprise manager table design
from 0 to 1 in 90 columns. Is there a way to do this in "table design"
in "all in once" metod.Hi
I prefer to write a script does the job .Don't forget to drop first
constraints and then re-create with DEFAULT (1)
"nywebmaster" <scgwebmaster@.yahoo.com> wrote in message
news:1131349106.061862.27390@.z14g2000cwz.googlegroups.com...
>I have table with more then 100 coluns . I must change default value
> from 0 to 1 in 90 columns. Is there a way to do this in "table design"
> in "all in once" metod.
>|||Hi
To add to Uri's suggestion, you can script the table by right clicking the
table in EM and choose the Generate SQL option. Then when you have the file
it can be edited (possibly in Query Analyser!) where global replacement coul
d
save you time. You can then run the script in Query Analyser or from a
command prompt using OSQL.
If you don't want to loose the data from the table then you may want to copy
the contents into a temporary table and then load them back if you are using
the drop/create method.
John
"nywebmaster" wrote:
> I have table with more then 100 coluns . I must change default value
> from 0 to 1 in 90 columns. Is there a way to do this in "table design"
> in "all in once" metod.
>|||On 6 Nov 2005 23:38:26 -0800, nywebmaster wrote:
>I have table with more then 100 coluns . I must change default value
>from 0 to 1 in 90 columns. Is there a way to do this in "table design"
>in "all in once" metod.
Hi nywebmaster,
This question suggests that you have a repeating group in your table.
That is a sign of a weak design. I'll give you an example:
Weak design:
CREATE TABLE SalesPersons
(SalesPersonID int NOT NULL
SalesPersonName varchar(50) NOT NULL,
SalesJan decimal(9,2) DEFAULT NULL,
SalesFeb decimal(9,2) DEFAULT NULL,
SalesMar decimal(9,2) DEFAULT NULL,
SalesApr decimal(9,2) DEFAULT NULL,
SalesMay decimal(9,2) DEFAULT NULL,
SalesJun decimal(9,2) DEFAULT NULL,
SalesJul decimal(9,2) DEFAULT NULL,
SalesAug decimal(9,2) DEFAULT NULL,
SalesSep decimal(9,2) DEFAULT NULL,
SalesOct decimal(9,2) DEFAULT NULL,
SalesNov decimal(9,2) DEFAULT NULL,
SalesDec decimal(9,2) DEFAULT NULL,
PRIMARY KEY (SalesPersonID)
)
Better design:
CREATE TABLE SalesPersons
(SalesPersonID int NOT NULL
SalesPersonName varchar(50) NOT NULL,
PRIMARY KEY (SalesPersonID)
)
CREATE TABLE Sales
(SalesPersonID int NOT NULL,
MonthNo tinyint NOT NULL,
Sales decimal(9,2) NOT NULL,
PRIMARY KEY (SalesPersonID, MonthNo)
FOREIGN KEY (SalesPersonID)
REFERENCES SalesPersons (SalesPersonID)
CHECK (MonthNo BETWEEN 1 AND 12)
)
Best, Hugo
--
(Remove _NO_ and _SPAM_ to get my e-mail address)
Enterprise manager table design
from 0 to 1 in 90 columns. Is there a way to do this in "table design"
in "all in once" metod.
Hi
Please don't multipost , I've answered the question in .programming group.
"nywebmaster" <scgwebmaster@.yahoo.com> wrote in message
news:1131349183.821846.143180@.o13g2000cwo.googlegr oups.com...
>I have table with more then 100 columns . I must change default value
> from 0 to 1 in 90 columns. Is there a way to do this in "table design"
> in "all in once" metod.
>
Enterprise manager table design
from 0 to 1 in 90 columns. Is there a way to do this in "table design"
in "all in once" metod.Hi
Please don't multipost , I've answered the question in .programming group.
"nywebmaster" <scgwebmaster@.yahoo.com> wrote in message
news:1131349183.821846.143180@.o13g2000cwo.googlegroups.com...
>I have table with more then 100 columns . I must change default value
> from 0 to 1 in 90 columns. Is there a way to do this in "table design"
> in "all in once" metod.
>
Enterprise manager table design
from 0 to 1 in 90 columns. Is there a way to do this in "table design"
in "all in once" metod.Hi
Please don't multipost , I've answered the question in .programming group.
"nywebmaster" <scgwebmaster@.yahoo.com> wrote in message
news:1131349183.821846.143180@.o13g2000cwo.googlegroups.com...
>I have table with more then 100 columns . I must change default value
> from 0 to 1 in 90 columns. Is there a way to do this in "table design"
> in "all in once" metod.
>sql
Friday, February 24, 2012
Enterprise Manager Can Not Connect to a Named Instance
Any suggestions? aforio2 does not show up in the enterprise manager when I select the option [New SQL Server Registration...]
Interesting...
Are the services associated with those other instances running?
Rick Sawtell
MCT, MCSD, MCDBA
|||"sjsnraets" wrote:
> I installed a new named instance of sql server on a machine called faoweb2k04. There are three instances on this machine: default, afosrio, & afosrio2 (which I can not connect to).
> Any suggestions? aforio2 does not show up in the enterprise manager when I select the option [New SQL Server Registration...]
Start the New SQL Server Registration wizard
Type server name inmediatelly to available servers field (server name\aforio2) and click on add button. Click next ...
If server instance is running, the registration will be completed. (not need visible in list)
Andras Jakus
MCDBA
Enterprise Manager Can Not Connect to a Named Instance
4. There are three instances on this machine: default, afosrio, & afosrio2
(which I can not connect to).
Any suggestions? aforio2 does not show up in the enterprise manager when I
select the option [New SQL Server Registration...]Interesting...
Are the services associated with those other instances running?
Rick Sawtell
MCT, MCSD, MCDBA|||"sjsnraets" wrote:
> I installed a new named instance of sql server on a machine called faoweb2
k04. There are three instances on this machine: default, afosrio, & afosrio
2 (which I can not connect to).
> Any suggestions? aforio2 does not show up in the enterprise manager when I select
the option [New SQL Server Registration...]
Start the New SQL Server Registration wizard
Type server name inmediatelly to available servers field (server name\aforio
2) and click on add button. Click next ...
If server instance is running, the registration will be completed. (not need
visible in list)
Andras Jakus
MCDBA
Enterprise Manager Can Not Connect to a Named Instance
Any suggestions? aforio2 does not show up in the enterprise manager when I select the option [New SQL Server Registration...]Interesting...
Are the services associated with those other instances running?
Rick Sawtell
MCT, MCSD, MCDBA
Sunday, February 19, 2012
Enterprise Manager (SQL2k)
I'm with a shared host and clicking my web hosts server entry in
Enterprise Manager lists all the database on the server, which takes a
few minutes of waiting. Maybe there's a way to set one default
database for the server registration so that when I click the server
entry it connects to the server and lists only the default database.
Any ideas?It's not possible with current EM sorry.
--
-oj
Rac v2.2 & QALite!
http://www.rac4sql.net
"Nick Rice" <nickrice@.eml.cc> wrote in message
news:7289b7ce.0309132101.7d89b1ab@.posting.google.c om...
> Is there a way to set a default database for a server registration?
> I'm with a shared host and clicking my web hosts server entry in
> Enterprise Manager lists all the database on the server, which takes a
> few minutes of waiting. Maybe there's a way to set one default
> database for the server registration so that when I click the server
> entry it connects to the server and lists only the default database.
> Any ideas?
Wednesday, February 15, 2012
Enter Default Values for all columns in all tables except Primary Keys
of all the tables (excluding system tables) and Default Values of 0
of all columns of type numbers. Excluding all primary key columns.
Thank youOn Sun, 3 Apr 2005 18:05:46 -0400, serge wrote:
>How can i enter Default Values of " " to all the columns of type character
>of all the tables (excluding system tables) and Default Values of 0
>of all columns of type numbers. Excluding all primary key columns.
>Thank you
Hi Serge,
CREATE TABLE Example (PKCol int NOT NULL PRIMARY KEY,
NumCol int NOT NULL DEFAULT 0,
CharCol varchar(20) NOT NULL DEFAULT '')
go
INSERT Example (PKCol)
VALUES (1)
SELECT * FROM Example
go
DROP TABLE Example
go
Best, Hugo
--
(Remove _NO_ and _SPAM_ to get my e-mail address)