Showing posts with label sql2000. Show all posts
Showing posts with label sql2000. Show all posts

Wednesday, March 28, 2012

Increase column length in all tables with column

Hi,
I there a way to increase the length of the same-named varchar column in
all tables at once in SQL2000?
Thanks.
AlanAlan Z. Scharf a écrit :
> Hi,
> I there a way to increase the length of the same-named varchar column in
> all tables at once in SQL2000?
If you have used a SQL DOMAIN and a "use case" like Power Designer it
will be a children job !
Otherwise you will need to write a long script with many steps...
like this one :
CREATE TABLE T_IMPORT
(IMP_ID INTEGER,
IMP_NOM VARCHAR(16),
IMP_DATE CHAR(6))
INSERT INTO T_IMPORT VALUES (254, 'Dupont', '251159')
INSERT INTO T_IMPORT VALUES (321, 'Durand', '130278')
INSERT INTO T_IMPORT VALUES (187, 'Dubois', '110401')
-- changing IMP_DATE CHAR(6) to CHAR(8)
BEGIN TRAN
ALTER TABLE T_IMPORT
ADD TMP_IMP_DATE CHAR(6)
UPDATE T_IMPORT
SET TMP_IMP_DATE = IMP_DATE
ALTER TABLE
DROP IMP_DATE
ALTER TABLE
ADD IMP_DATE CHAR(8)
UPDATE T_IMPORT
SET IMP_DATE = TMP_IMP_DATE
ALTER TABLE
DROP TMP_IMP_DATE
COMMIT TRAN
and also if no constraints is on the column.
A +
> Thanks.
> Alan
>
Frédéric BROUARD, MVP SQL Server, expert bases de données et langage SQL
Le site sur le langage SQL et les SGBDR : http://sqlpro.developpez.com
Audit, conseil, expertise, formation, modélisation, tuning, optimisation
********************* http://www.datasapiens.com ***********************|||Thanks for your reply.
I guess it may be more trouble than it's worth.
Alan
"SQLpro [MVP]" <brouardf@.club-internet.fr> wrote in message
news:ePiKc2pTGHA.5332@.tk2msftngp13.phx.gbl...
> Alan Z. Scharf a écrit :
> > Hi,
> >
> > I there a way to increase the length of the same-named varchar column
in
> > all tables at once in SQL2000?
> If you have used a SQL DOMAIN and a "use case" like Power Designer it
> will be a children job !
> Otherwise you will need to write a long script with many steps...
> like this one :
> CREATE TABLE T_IMPORT
> (IMP_ID INTEGER,
> IMP_NOM VARCHAR(16),
> IMP_DATE CHAR(6))
> INSERT INTO T_IMPORT VALUES (254, 'Dupont', '251159')
> INSERT INTO T_IMPORT VALUES (321, 'Durand', '130278')
> INSERT INTO T_IMPORT VALUES (187, 'Dubois', '110401')
> -- changing IMP_DATE CHAR(6) to CHAR(8)
> BEGIN TRAN
> ALTER TABLE T_IMPORT
> ADD TMP_IMP_DATE CHAR(6)
> UPDATE T_IMPORT
> SET TMP_IMP_DATE = IMP_DATE
> ALTER TABLE
> DROP IMP_DATE
> ALTER TABLE
> ADD IMP_DATE CHAR(8)
> UPDATE T_IMPORT
> SET IMP_DATE = TMP_IMP_DATE
> ALTER TABLE
> DROP TMP_IMP_DATE
> COMMIT TRAN
> and also if no constraints is on the column.
> A +
>
> >
> > Thanks.
> >
> > Alan
> >
> >
>
> --
> Frédéric BROUARD, MVP SQL Server, expert bases de données et langage SQL
> Le site sur le langage SQL et les SGBDR : http://sqlpro.developpez.com
> Audit, conseil, expertise, formation, modélisation, tuning, optimisation
> ********************* http://www.datasapiens.com ***********************|||look up the table "syscolumns" in books on line.

Incorrectly entered password for Replication Distributor (2000)

On the second screen in the wizard for configuring the distributor on SQL
2000, the correct server name has been used but the password is incorrect.
There is no way to remove the server name thus no way to reenter the correct
password to the distribution database. Help.
Regards,
Jamie
Found my own answer - drop the database from the Enterprise Manager and and
then go in. The server will have been removed from the list and can be
readded with the correct password.
Regards,
Jamie
"thejamie" wrote:

> On the second screen in the wizard for configuring the distributor on SQL
> 2000, the correct server name has been used but the password is incorrect.
> There is no way to remove the server name thus no way to reenter the correct
> password to the distribution database. Help.
> --
> Regards,
> Jamie
|||Hi Jamie,
I am not sure if I understand your situation correctly but I am guessing
that opening SQL Enterprise Manager to connect to your
distributor->Right-click on Replication folder->Select "Configure Publisher,
Subscribers and Distribution..." from the context menu->The Password and
Confirm Password text boxes on the Distributor tab should allow you to
change the password you want. Or perhaps you have a different password in
mind?
-Raymond
"thejamie" <thejamie@.discussions.microsoft.com> wrote in message
news:69D7219B-7DE8-454D-A93C-7CAB5F96A151@.microsoft.com...
> On the second screen in the wizard for configuring the distributor on SQL
> 2000, the correct server name has been used but the password is incorrect.
> There is no way to remove the server name thus no way to reenter the
> correct
> password to the distribution database. Help.
> --
> Regards,
> Jamie
|||In the instructions on the wizard it indicates a right click but I think not
in the wizard as I wasn't able to right click there but once I removed the
registration from the Enterprise Manager, the server was no longer listed and
I was able to re-add the server to the list using the correct password.
Regards,
Jamie
"Raymond Mak [MSFT]" wrote:

> Hi Jamie,
> I am not sure if I understand your situation correctly but I am guessing
> that opening SQL Enterprise Manager to connect to your
> distributor->Right-click on Replication folder->Select "Configure Publisher,
> Subscribers and Distribution..." from the context menu->The Password and
> Confirm Password text boxes on the Distributor tab should allow you to
> change the password you want. Or perhaps you have a different password in
> mind?
> -Raymond
> "thejamie" <thejamie@.discussions.microsoft.com> wrote in message
> news:69D7219B-7DE8-454D-A93C-7CAB5F96A151@.microsoft.com...
>
>
|||Raymond,
This whole question is a bit convoluted. I was trying to make publication
and subscription work from the SQL 2000 side when what needs to happen is for
the whole thing to take place on the SQL Server 2005 side. Hope I haven't
confused anyone.
Regards,
Jamie
"thejamie" wrote:
[vbcol=seagreen]
> In the instructions on the wizard it indicates a right click but I think not
> in the wizard as I wasn't able to right click there but once I removed the
> registration from the Enterprise Manager, the server was no longer listed and
> I was able to re-add the server to the list using the correct password.
> --
> Regards,
> Jamie
>
> "Raymond Mak [MSFT]" wrote:

Sunday, February 19, 2012

In SQL2000 what is = to MySQL's field type of LONGTEXT?

I just found out that MYSQL handels LONGTEXT and I know that SQL2000 does not
have such a field type. When I first was developing my DB application I tried
to use BLOB's unsuccessfully and ended up using an XML data solution instead
for large text amounts. (The application is simple field storing webpage
content.) Currenly I've configured the text fields as VarChars but that
definitely has some limits. Thanks if you can help.
SQL Server 2000's version is TEXT (a member of the BLOB family)
SQL Server 2005 has NVARCHAR(MAX) which can be used a lot easier.
Regards
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"bobobenito" <bobobenito@.discussions.microsoft.com> wrote in message
news:975E78A2-92DC-4300-AF7E-A1D73DC9DB58@.microsoft.com...
>I just found out that MYSQL handels LONGTEXT and I know that SQL2000 does
>not
> have such a field type. When I first was developing my DB application I
> tried
> to use BLOB's unsuccessfully and ended up using an XML data solution
> instead
> for large text amounts. (The application is simple field storing webpage
> content.) Currenly I've configured the text fields as VarChars but that
> definitely has some limits. Thanks if you can help.

In SQL2000 what is = to MySQL's field type of LONGTEXT?

I just found out that mysql handels LONGTEXT and I know that SQL2000 does no
t
have such a field type. When I first was developing my DB application I trie
d
to use BLOB's unsuccessfully and ended up using an XML data solution instead
for large text amounts. (The application is simple field storing webpage
content.) Currenly I've configured the text fields as VarChars but that
definitely has some limits. Thanks if you can help.SQL Server 2000's version is TEXT (a member of the BLOB family)
SQL Server 2005 has NVARCHAR(MAX) which can be used a lot easier.
Regards
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"bobobenito" <bobobenito@.discussions.microsoft.com> wrote in message
news:975E78A2-92DC-4300-AF7E-A1D73DC9DB58@.microsoft.com...
>I just found out that mysql handels LONGTEXT and I know that SQL2000 does
>not
> have such a field type. When I first was developing my DB application I
> tried
> to use BLOB's unsuccessfully and ended up using an XML data solution
> instead
> for large text amounts. (The application is simple field storing webpage
> content.) Currenly I've configured the text fields as VarChars but that
> definitely has some limits. Thanks if you can help.

In SQL2000 what is = to MySQL's field type of LONGTEXT?

I just found out that MYSQL handels LONGTEXT and I know that SQL2000 does not
have such a field type. When I first was developing my DB application I tried
to use BLOB's unsuccessfully and ended up using an XML data solution instead
for large text amounts. (The application is simple field storing webpage
content.) Currenly I've configured the text fields as VarChars but that
definitely has some limits. Thanks if you can help.SQL Server 2000's version is TEXT (a member of the BLOB family)
SQL Server 2005 has NVARCHAR(MAX) which can be used a lot easier.
Regards
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"bobobenito" <bobobenito@.discussions.microsoft.com> wrote in message
news:975E78A2-92DC-4300-AF7E-A1D73DC9DB58@.microsoft.com...
>I just found out that MYSQL handels LONGTEXT and I know that SQL2000 does
>not
> have such a field type. When I first was developing my DB application I
> tried
> to use BLOB's unsuccessfully and ended up using an XML data solution
> instead
> for large text amounts. (The application is simple field storing webpage
> content.) Currenly I've configured the text fields as VarChars but that
> definitely has some limits. Thanks if you can help.