Changing MS SQL Server Express Table Properties

Jul 13, 2005

Hi,

I have a MS SQL Server Express database wich I upsized once from MS
Access. I can connect to it and get/insert data but I can't update the
field properties.

I've used Access 2003, Visual Studio .Net and SQL Server Web Data
Administrator, but I can't change the properties of existing tables. I
cán add new tables and add their properties afterwards. Since I have a
lot of tables it would be too much work too recreate them all. So how
can I edit my existing tables?

View 1 Replies


ADVERTISEMENT

Export Table Properties-SQL Express 2005

Apr 5, 2008

Another Newbie here...sorry if this is an easy question:
How do I extract Table Properties (field names, type, length, PK/FK) from multiple tables and into an Excel spreadsheet?

Thanks in advance.

View 4 Replies View Related

Changing Properties In A DTS Package

Sep 26, 2000

Is it possible to change the database name defined in the destinatation table definition of the transformation object programmitacally?

We have different database names between dev and prod. The package was created against dev. I'm trying to copy the package to the prod server and programmatically change the database name where necessary.

View 4 Replies View Related

Changing Article Properties Without A New Snapshot

Jan 17, 2007

In our replication environment, the subscriber is initially set up with an snapshot of the publisher database. However, after that, the subscriber and publisher are different and we can never re-initialize from a snapshot again (we purge data on the publisher to reduce the database size but do not purge the same data on the subscriber; we do this by stubbing out the stored procedures on the subscriber that purge data on the publisher).

If an article is added or dropped from the publication, using snapshot and synchronize, just these changes are propagated to the publisher (without an entire new snapshot).

However, if an Article Property is changed (change SCALL to MCALL under Statement Delivery options for the UPDATE statement), the interface REQUIRES an entire new snapshot. Is there any way I can avoid the new Snapshot? It overwrites the subscriber database and this cannot happen!

Linda

View 5 Replies View Related

Error Changing Subscription Properties

Dec 1, 2005

Hi

View 6 Replies View Related

Dynamically Changing The Connection Properties

Apr 18, 2007

I want to transfer data from one server to another by using SSIS. i want the connection string to be dynamic and also according to the some other variable, the transforming data is changing.

Could you provide me the solution thet how i am able to change my connetction string dynamically and the other variable too.

i am using VS 2003 as front end and SQL server 2005 as a backhand.

Due to VS.NET 2003 i am able to create DTS packages but i have to migrate it and then anly i am able to use it in JOB in SQL server agent of SQL server 2005.

is that any code or any stored procedure from which i am able to migrate DTS packages to SSIS packages.

Thank you

View 4 Replies View Related

SQL 2012 :: Connection Properties Versus SSMS Server Properties

Mar 16, 2015

I have an ODBC connection string that is working fine with the following properties:

Database="XXXXXXX",Network="YYYYYY"; strangely no server is specified in the string, but it is specified in the ODBC Connection file.

I am trying to do a new server registration in SSMS for this database.However, I don't understand where the network spec is placed.

Under Registered server name I've tried:

YYYYYYXXXXX

When I browse the server for the database instance list, I receive "network path was not found".

I even tried:"XXXXXXX",Network="YYYYYY" for the registered server name.Same error message.

What am I doing wrong ?

View 1 Replies View Related

How Do I Retrieve Table Properties In MS SQL Server 2000

Nov 29, 2004

I have looked on google and haven't found a query (as of yet) to perform this function.

Essentially I am using VB.NET with Excel and have a mapping between a worksheet and a table in my database. I wrote an import function to pull the data out of excel and put it into SQL Server but I want to try catching errors before i do that.

What is the SQL query to get column sizes from a table. Meaning in a table I have column1 that is allowed a size of int(5). How do i retrieve that information from a query opposed to just looking at it in SQL Server EM??

any help would be appreciated
thanks

View 5 Replies View Related

SQL Server 2008 :: Changing Large / Existing Table To Sparse Columns?

Sep 21, 2015

I have some huge tables (think 200+GB for a single table) which are excellent candidates for sparse columns. The tables have many columns which are defined with decimal datatypes (13,2) with a large percentage of them (over 50% in most cases- some as much as 99%) being 0.00. Since this is very expensive in terms of storage my idea is to set all the 0.00 values equal to NULL then set them as sparse. Across 100 or so identical databases, I have 5 such tables, with 20-40 columns in each table.

1.) three steps for each column in each table in each db.

Step 1: update table to allow for nulls

Step 2: update tabe set column=null where column =0.00

Step 3 update table set sparse columns

2.)

Step 1: Create entirely new table with sparse column definitions

Step 2: copy entire table, transforming 0.00 to null for affected columns via SSIS

Step 3: drop original table, rename new table to original name

View 0 Replies View Related

Loading Images In A SQL Server Express Database Table At Design Time Using Visual Basic Net Express Editon

Jun 24, 2007

I am new to this type of programming and and have read all articles on adding an image to the database and it seems they all use sql queries to add an image but I want to add an image at design time. I am using Visual Basic 2005. I am also using Visual Basic 2005 Express Edition to try the same thing. I am trying to build a Translator program for english to Brazilian Portuguese and the reason I want to add the images is so that when I translate the word cat from english to Portuguese, I can also show an image of a cat. Can anyone please help me

View 3 Replies View Related

Best Way To View Table Properties

Apr 28, 2003

Can anyone help me with displaying several table properites at once. I know I can use sp_help 'tablename' to get one at time. What is the best method to get several databases at a time?

View 5 Replies View Related

Table Properties In SSMSE

Apr 18, 2008

Hello. I just started using SQL Server Management Studio Express. I am creating a new table by right-clicking the "Tables" folder and selecting "New Table". Then i hit F4 to bring up the "Properties" (because I want to associate a Schema to the table, but when the "Properties" section appears, it's blank. I can't figure out a way to get anything to appear there. Any ideas? Thanks!...

View 2 Replies View Related

Table Properties - Collation

Mar 5, 2008

Does anyone know what I could change the collation of a table to, to properly handle Mapics data?
Thanks.

View 1 Replies View Related

Table Properties # Rows V.s. Row Count

Jul 7, 2003

I've noticed that sometimes the # of rows specified in table properties tab is different from the # shown by select count(*) from tableA.

Why is this ?

(SQL 2k, sp2, indexed table)

View 6 Replies View Related

Query Optimization Via Table Properties?

Jul 26, 2006

Query #1:select <list of fields>from Cjoin B on C.b_key = B.b_keyjoin A on B.a_key = A.a_keywhere A.o_key = <some value>Query #2:select <list of fields>from Cwhere b_key in (select b_keyfrom Bwhere a_key in (select a_keyfrom Awhere o_key = <some value>))#1 (and other things with the same general pattern) are used inliterally thousands of places in this one client's system, and ismuch nicer to write, but seems to be rather slower than #2. Isthere any way to tweak the tables to tell the system somethinglike "hey, B, whenever you're joined to A, you should seriouslyconsider waiting for A to be filtered down to a manageable levelfirst"? And similarly for C/B.MS SQL 2000, SP3, 6.5 compat mode. These are set in stone untilwe upgrade the accounting software (highly non-trivial).

View 1 Replies View Related

Export Table Designer Column Properties

May 22, 2008

I am trying to create a hard copy of all the table definitions in the database and have not found a way to do so.  The report would have all the columns for a partcular table and each property assigned to the column. 
For instance Customers table has CustomerId, FirstName, LastName, Phone, etc.  The CustomerId is PK, Identity, Auto Increment, BIGINT, NOT NULL.  FirstName is NVARCHAR(30), NULL.  LastName is NVARCHAR(30), NULL.  Phone is NVARCHAR(20), NULL. 
Can anyone point me to the right system function or sp to get this info? 

View 5 Replies View Related

Printing Table And Columns Properties Info

Dec 14, 2005

I'm kinda new to SQL. I'm trying to get a print out of a specific table and its columns and column types. Is there a specific command or code that I can use to accomplish this?.

thx,



Newbie.

View 3 Replies View Related

Table Function To Retrieve File Properties

Mar 25, 2008

Here's a table function that returns a table variable containing various file properties (creation date, size, etc.). The one limitation to remember is that it won't work with files on mapped drives; you have to use the full \<Server><Share><Folder1..Folder n><Filename> syntax. Still, it's a pretty useful thing to have around. :)

/****************************************************************************/
CREATE FUNCTION fnc_GetFileProps

(@FileName VARCHAR (1024))

RETURNS @Results TABLE (
ErrorCode TINYINT DEFAULT (0),
PropName VARCHAR (255),
PropValue SQL_VARIANT
)

AS
BEGIN
DECLARE @OLEResult INT
DECLARE @FS INT
DECLARE @FileID INT
DECLARE @Message VARCHAR (8000)
DECLARE @ErrorSource VARCHAR (255)
DECLARE @ErrorDesc VARCHAR (255)
DECLARE @INT INT
DECLARE @VARCHAR VARCHAR (1024)
DECLARE @DATETIME DATETIME
DECLARE @BIGINT BIGINT

-- Create an instance of the file system object
EXECUTE @OLEResult = sp_OACreate 'Scripting.FileSystemObject', @FS OUT
IF @OLEResult <> 0
BEGIN
EXEC sp_OAGetErrorInfo @FS, @ErrorSource OUT, @ErrorDesc OUT

INSERT @Results (ErrorCode, PropName, PropValue)
VALUES (1, @ErrorSource, @ErrorDesc)

RETURN
END

EXEC @OLEResult = sp_OAMethod @FS, 'GetFile', @FileID OUT, @Filename
IF @OLEResult <> 0
BEGIN
EXEC sp_OAGetErrorInfo @FS, @ErrorSource OUT, @ErrorDesc OUT

INSERT @Results (ErrorCode, PropName, PropValue)
VALUES (1, @ErrorSource, @ErrorDesc)

RETURN
END

EXEC @OLEResult = sp_OAGetProperty @FileID, 'Attributes', @INT OUT
IF @OLEResult <> 0
BEGIN
INSERT @Results (ErrorCode, PropName, PropValue)
VALUES (1, 'Attributes', '<ERROR RETRIEVING PROPERTY>')
END
ELSE
INSERT @Results (PropName, PropValue)
VALUES ('Attributes', @INT)

EXEC @OLEResult = sp_OAGetProperty @FileID, 'DateCreated', @DATETIME OUT
IF @OLEResult <> 0
BEGIN
INSERT @Results (ErrorCode, PropName, PropValue)
VALUES (1, 'DateCreated', '<ERROR RETRIEVING PROPERTY>')
END
ELSE
INSERT @Results (PropName, PropValue)
VALUES ('DateCreated', @DATETIME)

EXEC @OLEResult = sp_OAGetProperty @FileID, 'DateLastAccessed', @DATETIME OUT
IF @OLEResult <> 0
BEGIN
INSERT @Results (ErrorCode, PropName, PropValue)
VALUES (1, 'DateLastAccessed', '<ERROR RETRIEVING PROPERTY>')
END
ELSE
INSERT @Results (PropName, PropValue)
VALUES ('DateLastAccessed', @DATETIME)

EXEC @OLEResult = sp_OAGetProperty @FileID, 'DateLastModified', @DATETIME OUT
IF @OLEResult <> 0
BEGIN
INSERT @Results (ErrorCode, PropName, PropValue)
VALUES (1, 'DateLastModified', '<ERROR RETRIEVING PROPERTY>')
END
ELSE
INSERT @Results (PropName, PropValue)
VALUES ('DateLastModified', @DATETIME)

EXEC @OLEResult = sp_OAGetProperty @FileID, 'Name', @VARCHAR OUT
IF @OLEResult <> 0
BEGIN
INSERT @Results (ErrorCode, PropName, PropValue)
VALUES (1, 'Name', '<ERROR RETRIEVING PROPERTY>')
END
ELSE
INSERT @Results (PropName, PropValue)
VALUES ('Name', @VARCHAR)

EXEC @OLEResult = sp_OAGetProperty @FileID, 'Path', @VARCHAR OUT
IF @OLEResult <> 0
BEGIN
INSERT @Results (ErrorCode, PropName, PropValue)
VALUES (1, 'Path', '<ERROR RETRIEVING PROPERTY>')
END
ELSE
INSERT @Results (PropName, PropValue)
VALUES ('Path', @VARCHAR)

EXEC @OLEResult = sp_OAGetProperty @FileID, 'ShortPath', @VARCHAR OUT
IF @OLEResult <> 0
BEGIN
INSERT @Results (ErrorCode, PropName, PropValue)
VALUES (1, 'ShortPath', '<ERROR RETRIEVING PROPERTY>')
END
ELSE
INSERT @Results (PropName, PropValue)
VALUES ('ShortPath', @VARCHAR)

EXEC @OLEResult = sp_OAGetProperty @FileID, 'Size', @BIGINT OUT
IF @OLEResult <> 0
BEGIN
INSERT @Results (ErrorCode, PropName, PropValue)
VALUES (1, 'Size', '<ERROR RETRIEVING PROPERTY>')
END
ELSE
INSERT @Results (PropName, PropValue)
VALUES ('Size', @BIGINT)

EXEC @OLEResult = sp_OAGetProperty @FileID, 'Type', @VARCHAR OUT
IF @OLEResult <> 0
BEGIN
INSERT @Results (ErrorCode, PropName, PropValue)
VALUES (1, 'Type', '<ERROR RETRIEVING PROPERTY>')
END
ELSE
INSERT @Results (PropName, PropValue)
VALUES ('Type', @VARCHAR)

EXECUTE @OLEResult = sp_OADestroy @FileID
EXECUTE @OLEResult = sp_OADestroy @FS

RETURN
END
/****************************************************************************/


I geek, therefore I am

View 1 Replies View Related

How To Add Table Column Extended Properties To A View.

Apr 7, 2008

I am using SqlServer 2005 and I have created small sample table with culumns that have Extended properties.
FirstName have [First Name] extended propery called M_Caption.
Then I created a view from the table to use in an access database.
My problem is, I can't get the table column extended properties to show up in the view column extended properties.

Here is the table

/****** Object: Table [dbo].[Person] Script Date: 04/07/2008 14:42:01 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Person](
[Id] [int] NULL,
[FirstName] [nvarchar](50) NULL,
[LastName] [nvarchar](50) NULL
) ON [PRIMARY]
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Caption', @value=N'First Name' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Person', @level2type=N'COLUMN',@level2name=N'FirstName'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Caption', @value=N'Last Name' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Person', @level2type=N'COLUMN',@level2name=N'LastName'



I created this view

/****** Object: View [dbo].[View_1] Script Date: 04/07/2008 14:50:32 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE VIEW [dbo].[View_1]
AS
SELECT FirstName, LastName
FROM dbo.Person
GO
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPane1', @value=N'[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00]
Begin DesignProperties =
Begin PaneConfigurations =
Begin PaneConfiguration = 0
NumPanes = 4
Configuration = "(H (1[40] 4[20] 2[20] 3) )"
End
Begin PaneConfiguration = 1
NumPanes = 3
Configuration = "(H (1 [50] 4 [25] 3))"
End
Begin PaneConfiguration = 2
NumPanes = 3
Configuration = "(H (1 [50] 2 [25] 3))"
End
Begin PaneConfiguration = 3
NumPanes = 3
Configuration = "(H (4 [30] 2 [40] 3))"
End
Begin PaneConfiguration = 4
NumPanes = 2
Configuration = "(H (1 [56] 3))"
End
Begin PaneConfiguration = 5
NumPanes = 2
Configuration = "(H (2 [66] 3))"
End
Begin PaneConfiguration = 6
NumPanes = 2
Configuration = "(H (4 [50] 3))"
End
Begin PaneConfiguration = 7
NumPanes = 1
Configuration = "(V (3))"
End
Begin PaneConfiguration = 8
NumPanes = 3
Configuration = "(H (1[56] 4[18] 2) )"
End
Begin PaneConfiguration = 9
NumPanes = 2
Configuration = "(H (1 [75] 4))"
End
Begin PaneConfiguration = 10
NumPanes = 2
Configuration = "(H (1[66] 2) )"
End
Begin PaneConfiguration = 11
NumPanes = 2
Configuration = "(H (4 [60] 2))"
End
Begin PaneConfiguration = 12
NumPanes = 1
Configuration = "(H (1) )"
End
Begin PaneConfiguration = 13
NumPanes = 1
Configuration = "(V (4))"
End
Begin PaneConfiguration = 14
NumPanes = 1
Configuration = "(V (2))"
End
ActivePaneConfig = 0
End
Begin DiagramPane =
Begin Origin =
Top = 0
Left = 0
End
Begin Tables =
Begin Table = "Person"
Begin Extent =
Top = 6
Left = 38
Bottom = 99
Right = 189
End
DisplayFlags = 280
TopColumn = 0
End
End
End
Begin SQLPane =
End
Begin DataPane =
Begin ParameterDefaults = ""
End
End
Begin CriteriaPane =
Begin ColumnWidths = 11
Column = 1440
Alias = 900
Table = 1170
Output = 720
Append = 1400
NewValue = 1170
SortType = 1350
SortOrder = 1410
GroupBy = 1350
Filter = 1350
Or = 1350
Or = 1350
Or = 1350
End
End
End
' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'View_1'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPaneCount', @value=1 , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'View_1'



Thanks

View 1 Replies View Related

Table Column Extended Field Properties

Jul 17, 2007

through MS SQL Server Management Studio I have a database defined as:



dbname

- Tables

- dbo.xyz

-Columns

Field definition_a

Field definition_b

Field definition_c

...



For each "Field definition" I can define "extended properties"





So the question is, from a stored procedure in C#, how can I read through the "Field definitions"

looking for an extended property of a specific integer value?



/Boyd

View 2 Replies View Related

Importing Access Table Into SQL Server 2005 Express Table And Adding One Field

Feb 16, 2007

Hi all,

Hopefully I am posting this question in the correct forum. I am still learning about SQL 2005. Here is my issue. I have an access db that I archive weekly into and SQL server table. I have used the dst wizard to create an import job and initally that worked fine. field I have as the primary key in the access db cannot be the primary key in the sql table since I archive weekly and that primary key field will be imported several time over. I overcame this initally by not having a primary key in the sql table. This table is strictly for reference. However, now I need to setup a unique field for each of the records in the sql table. What I have done so far is create a recordID field in the sql table that is an int and set as yes to Identify (auotnumber). That worked great and created unique id for all existing records. The problem now is on the import. When I try to import the access table i am getting an error because of the extra field in the sql table, and the error is saying cannot import null value into this field. So... my final question is how can I import the access table into the sql table with one extra field which is the autonumber unique field? Thanks a bunch for any asistance.

Bill

View 7 Replies View Related

SQL 2012 :: Change Properties Of A Table Which Have Filestream When Column Added To It

Dec 6, 2014

I store files in db in sql server 2008 by filestream. But when a column would be added to table which have filestream, properties of table would be changed. by every things change on table, retrieve files will faced to error. but store process work probably.

and filestream filegroup at following address will be empty. why?

Right click on table --> properties --> storage --> filestream filegroup

View 0 Replies View Related

Transact SQL :: Query To Check Properties On A Table When Creating Database?

May 20, 2015

I'm wondering if there is some sql I can run to check properties on a table. This would be used to verify things like data types, allow nulls and default values have been set to avoid mistakes. This could be done manually one table and one column at a time, but it would be a lot easier to look at it in the results window.

View 5 Replies View Related

Retrieve Data From Properties Field In Prifile Table In Aspnetdb.mdf For Multi Users ?

Mar 12, 2008

I want retrieve data from properties field in prifile table in aspnetdb.mdf for multi users,what do i ?

View 1 Replies View Related

Server Properties

Oct 11, 2002

Hello!
We are having problems with a single SQL Server where the Server properties will not save, and always revert to the default.
It occurs only on those tabs with "configured" and "running" options at the bottom. Other tabs will keep the settings we custom.
The big problem is with the memory and processor tabs which even when we've made only a single change and stopped and started the service, reverts back to a default.
Any clues - we are logged in as "sa" and have not removed the SA priviledges.

Thanks for any help,
Simon

View 1 Replies View Related

Server Properties

Dec 7, 2006

Help;Im New with a company and the sql server ismaxing out the cpu'sWe have 3 web servers load balanced....large volume of datathe current PropertiesComputer:4 amd 2.88 processors4 g MememoryRecomendations of good sql setupmemory, cpu etcThank youmike

View 6 Replies View Related

Changing SP With The Changes In The Table

Jun 1, 2007

Hi All,

If the column names are changed , is there are a easy way to change the referred columns in the SP's. What I am doing is going into each SP and replace the old name with the new name.

Thank you for any help on this.




Necessity is the mother of all inventions!

View 18 Replies View Related

Where Are The SQL Server 7.0 Configuration Properties

Mar 22, 2000

Is there no longer a graphic interface for the parameters that are output with sp_configure?
There are many options that are settable that are not in the Sql Server Propreties, but
these items were in the 6.5 graphic interface through EM ex. number of open objects.
Is there a script to save these settings so the installation can be recreated?

View 1 Replies View Related

Some SQL Server Network Properties

Jun 19, 2008

DECLARE@Stage TABLE
(
RowID INT IDENTITY(0, 1) PRIMARY KEY CLUSTERED,
Data VARCHAR(90),
Section INT
)

INSERT@Stage
(
Data
)
EXECxp_cmdshell 'ipconfig /all'

DECLARE@Section INT

SET@Section = 0

UPDATE@Stage
SET@Section = Section =CASE
WHEN ASCII(LEFT(Data, 1)) > 32 THEN @Section + 1
ELSE @Section
END

SELECTMAX(CASE WHEN x.minRowID IS NULL THEN NULL ELSE s.Data END) AS Header,
MAX(CASE WHEN s.Data LIKE '%Host Name%' THEN RTRIM(SUBSTRING(s.Data, 45, 90)) END) AS HostName,
MAX(CASE WHEN s.Data LIKE '%Media State%' THEN RTRIM(SUBSTRING(s.Data, 45, 90)) END) AS MediaState,
MAX(CASE WHEN s.Data LIKE '%Description%' THEN RTRIM(SUBSTRING(s.Data, 45, 90)) END) AS [Description],
MAX(CASE WHEN s.Data LIKE '%IP Address%' THEN RTRIM(SUBSTRING(s.Data, 45, 90)) END) AS IPaddress,
MAX(CASE WHEN s.Data LIKE '%Physical Address%' THEN RTRIM(SUBSTRING(s.Data, 45, 90)) END) AS PhysicalAddress
FROM@Stage AS s
LEFT JOIN(
SELECTMIN(RowID) AS minRowID
FROM@Stage
GROUP BYSection
) AS x ON x.minRowID = s.RowID
WHEREs.Section > 0
GROUP BYs.Section
E 12°55'05.25"
N 56°04'39.16"

View 2 Replies View Related

Changing Table Filegroups

Jun 18, 2002

I want to change the filegroup of a table. While we can do this in enterprise mgr, I would like to accomplish this in transact sql. We have a new configuration where the filegroups are located on different disks and to take advantage of that, I want to move the heavily accessed tables onto different groups. Example: table emp needs to be moved from filegroup Primary to file group Secondary.
please help...

View 1 Replies View Related

Changing Table Ownership

Jan 3, 2007

Hi,

Just want to ask that if it is possible to change a table ownership?

thanks

View 9 Replies View Related

Changing Table Format

Mar 11, 2004

Hi there,

Its probably easier to draw this problem than describe it, so here goes:

I have a sales forecast table (A,B,C are products [PRODUCT], the dates refer to the month for which the forecast is [FORECAST_DATE], and the integer is the forecast sales qty [FORECAST_QTY])

A 01/03/2004 30
B 01/03/2004 28
C 01/03/2004 24
A 01/04/2004 11
B 01/04/2004 09
C 01/04/2004 41

I need to convert the table into a more sensible format, like this:

(NB ...Dots are just there to help with formatting - basically I'm talking about a field for FORECAST_03_2004, FORECAST_04_2004 etc etc)


........ 01/03/2004....01/04/2004
A..........30..................11
B..........28..................09
C..........24..................41


I'm really no t-SQL guru, and I can't seem to get any joy out of BOL. It must only be a tiny bit of code. Can anyone help?

Thanks very much

Sam

View 4 Replies View Related

Changing Table Owner

Jul 20, 2005

Hi- apologies for asking a stupid newbie question, but I'm really stuck atthe moment. I need to change table ownership.I've got an asp script which is looking for a table owned by the dbo role,however the table was created under a different ownership. I understand theproblem, and almost understand the solution, but I can't seem to get all theway.THE PROBLEM (using [server].[database].[owner].[table])[mgbsvr1].[dnn].[dnnadmin].[aspsearch]needs to be[mgbsvr1].[dnn].[dbo].[aspsearch]I looked up the books online and found this syntax:sp_changeobjectowner [ @objname = ] 'object' , [ @newowner = ] 'owner'But I can't see how to use it, nor more importantly, where I should use it.It won't work in the query tool in Enterprise Manager. If I need to create ascript (which I've never done before), how do I execute the script?All help deeply appreciatedManning, Sydney

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved