Showing posts with label properties. Show all posts
Showing posts with label properties. Show all posts

Friday, March 30, 2012

Need to change column properties...

I have an MSDE database filled with data. I use Web Data Admin to config
the db. In my short-sightedness I defined a column of vchar as only 12
characters when now I need 15. However since there's data in the db, the
edit option is not available for the columns. What's the best way to go
about making the change I need?
hi Terry,
Terry Olsen wrote:
> I have an MSDE database filled with data. I use Web Data Admin to
> config the db. In my short-sightedness I defined a column of vchar
> as only 12 characters when now I need 15. However since there's data
> in the db, the edit option is not available for the columns. What's
> the best way to go about making the change I need?
http://msdn.microsoft.com/library/de...aa-az_3ied.asp
SET NOCOUNT ON
USE tempdb
GO
CREATE TABLE dbo.test (
ID int NOT NULL PRIMARY KEY ,
data varchar(12) NOT NULL
)
GO
INSERT INTO dbo.test VALUES ( 1 ,'Andrea789012' )
SELECT * FROM dbo.test
GO
ALTER TABLE dbo.test
ALTER COLUMN data varchar(15)
GO
UPDATE dbo.test
SET data = 'Andrea789012345'
WHERE ID = 1
SELECT * FROM dbo.test
GO
DROP TABLE dbo.test
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.14.0 - DbaMgr ver 0.59.0
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply

Wednesday, March 28, 2012

Need to add a table in merge replication

Hi,
I would like to add a new table in merge replication (200 tables already in
replication).
I followed the steps.
Step 1: In publication properties I included the new table
Step 2: System shows the following messages
One or more tables have already been published. Do you want to update those
articles with the new default?
I gave ‘NO’
Step 3: When I click Apply it shows the following message.
SQL Server Enterprise Manager could not change the properties of article
‘Table name’
Based on object ‘Table name’.
Do you want to continue saving other changes to the publication?
Error 21416: Property ‘destination_owner’ of article ‘Table Name’ cannot be
changed.
Since I have 200 tables in merge replication it asks for 200 times and I
have ‘Yes’ and finally it shows the following error message.
SQL Server Enterprise Manager could not create article ‘NewTablename’ on
object ‘NewTablename’.
Do you want to continue saving other changes to the publication?
Error 20086: Publication ‘DatabaseName’ does not support the nosync type
because it contains a table that does not have a rowguidcol column.
Finally,
I created a new column ‘rowguid’ after that followed the same steps.
Its working fine.
Need clarification:
1.Should I create a similar table in subscriber also? (else it replication
fails)
2.Am I going in a correct way?
Please advise
Thanks,
Soura.
Sometimes the GUI is not your friend. This is one of these cases. I think
what is going on is that this new table is related via DRI to some of the
other tables and the tracking metadata has to be updated. This means a new
snapshot; but for some reason - possibly a bug you are unable to do this
through the GUI.
Your options won't work. Basically you are creating two tables which are
configured somewhat correctly (but not completely) for merge replication,
but are missing the necessary merge replication metadata in the system
tables
What I would do is create a seperate publication. This could be problematic
if you have a lot of subscribers.
Another option which probably is the way to go is to use sp_addmergearticle
like this
sp_addmergearticle 'northwind2','authors','authors',
@.force_invalidate_snapshot=1
This will generate a mini snapshot with just the authors table in it.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"SouRa" <SouRa@.discussions.microsoft.com> wrote in message
news:825361FD-DF36-4D78-9E79-6938A34A9CE2@.microsoft.com...
> Hi,
> I would like to add a new table in merge replication (200 tables already
in
> replication).
> I followed the steps.
> Step 1: In publication properties I included the new table
> Step 2: System shows the following messages
> One or more tables have already been published. Do you want to update
those
> articles with the new default?
> I gave 'NO'
> Step 3: When I click Apply it shows the following message.
> SQL Server Enterprise Manager could not change the properties of article
> 'Table name'
> Based on object 'Table name'.
> Do you want to continue saving other changes to the publication?
> Error 21416: Property 'destination_owner' of article 'Table Name' cannot
be
> changed.
> Since I have 200 tables in merge replication it asks for 200 times and I
> have 'Yes' and finally it shows the following error message.
> SQL Server Enterprise Manager could not create article 'NewTablename' on
> object 'NewTablename'.
> Do you want to continue saving other changes to the publication?
> Error 20086: Publication 'DatabaseName' does not support the nosync type
> because it contains a table that does not have a rowguidcol column.
> Finally,
> I created a new column 'rowguid' after that followed the same steps.
> Its working fine.
> Need clarification:
> 1. Should I create a similar table in subscriber also? (else it
replication
> fails)
> 2. Am I going in a correct way?
> Please advise
> Thanks,
> Soura.
>
|||Actually it seems to generate a completely new snapshot.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"SouRa" <SouRa@.discussions.microsoft.com> wrote in message
news:825361FD-DF36-4D78-9E79-6938A34A9CE2@.microsoft.com...
> Hi,
> I would like to add a new table in merge replication (200 tables already
in
> replication).
> I followed the steps.
> Step 1: In publication properties I included the new table
> Step 2: System shows the following messages
> One or more tables have already been published. Do you want to update
those
> articles with the new default?
> I gave 'NO'
> Step 3: When I click Apply it shows the following message.
> SQL Server Enterprise Manager could not change the properties of article
> 'Table name'
> Based on object 'Table name'.
> Do you want to continue saving other changes to the publication?
> Error 21416: Property 'destination_owner' of article 'Table Name' cannot
be
> changed.
> Since I have 200 tables in merge replication it asks for 200 times and I
> have 'Yes' and finally it shows the following error message.
> SQL Server Enterprise Manager could not create article 'NewTablename' on
> object 'NewTablename'.
> Do you want to continue saving other changes to the publication?
> Error 20086: Publication 'DatabaseName' does not support the nosync type
> because it contains a table that does not have a rowguidcol column.
> Finally,
> I created a new column 'rowguid' after that followed the same steps.
> Its working fine.
> Need clarification:
> 1. Should I create a similar table in subscriber also? (else it
replication
> fails)
> 2. Am I going in a correct way?
> Please advise
> Thanks,
> Soura.
>
sql

Saturday, February 25, 2012

Need help! Used Space in dB and Tran files

I have a database about 39GB in size and is running out of allocated space. In the Enterprise Manager the properties for this dB, show that there is 0.00MB space available. I need to increase the size of the dB.

What I need to find out is, which file group is full so I can expand the appropriate file group instead of expanding all the filegroups. Also, is there a way to find the space usage of each file in the file group and also the Transaction log?

db Size 39GB
14 File Groups
17 database files (mdf & ndf)
2 Transaction Log files
180 Tables

I am aware of the sp_spaceused, but the information it furnishes is not enough for me to make a decision.

Need help urgently!!!!check this query out and see if this will be of any help:

select [Allocated_Size_MB]=size*8/1024, [Max_Size_MB]=maxsize*8/1024, name from sysfiles|||Thanks for your reply. The results from the query give me the allocated size.
How can I find the "used" space (or free/available space) in this allocated space?