Extended Properties

Jul 11, 2007

Hi:



Does anyone know of a good primer on extended properties and why I would want to use them. I have you the on-line books sections but that does a clear "why". I have search for white papers and similar documents.



I understand they are good for documentation, but I was looking for something that explain Microsoft long-term vision. How I might use them in template scripts, VSTS, etc.



Thanks in advance for your help.



Gene

View 1 Replies


ADVERTISEMENT

Help ::: Extended Properties

Aug 15, 2002

Hi all,

Plz help me to know whats wrong with following script:

EXEC sp_addextendedproperty
@name = 'col_Programs_ID_Description',
@Value = 'The Unique Identifier for a specific Program',
@level1Type = 'Programs',
@level2Type = 'ID'

I get the following error:
Server: Msg 15600, Level 15, State 1, Procedure sp_addextendedproperty, Line 42
An invalid parameter or option was specified for procedure 'sp_addextendedproperty'.

NOTE: If I dont use the last 2 parameters this procedure runs fine, but it adds the Extended Property to the Database Level while I'm trying to add it to the TABLE-->COLUMN level.

Thanks
Mariah

View 2 Replies View Related

Sql 2005 Extended Properties

Aug 13, 2006

Under SSMS I can add simple text and carriage returns to an extended property associated with a column. SSMS preserves the <CRLF> formatting that I used. But when I try to read this same text using, for example,



SELECT name, value FROM ::fn_listextendedproperty

(NULL, 'schema', 'dbo', 'table', 'Customers', 'column', 'CompanyName')



I find that "value" has the <CRLF>'s removed! What am I doing wrong here?



TIA,



Barkingdog


View 1 Replies View Related

Access And Extended Properties

Jun 6, 2007

Hello,
Can I read and write the extended properties with Access?


If it€™s possible is better create a project (ADP) or a classic MDB?



When I try with this query in the query panel (in a MDB)

SELECT objtype, objname, name, value
FROM fn_listextendedproperty
(NULL, 'schema', 'Person', 'table', default, NULL, NULL)



I have this error message:



The size of a field is too long



If I try with an ADP, when I ask a new query in design view, I have a message for some roblems between the Access version (2003) and SQL Server version (2005) and I can€™t save the query.



Tanks.

View 1 Replies View Related

Grant Access To Extended Properties

Aug 28, 2006

Hi!I have a user on my database that has only "select" access(db_datareader).Problem is, I also want him to also be able to create/update extendedproperties on tables or views, but without modifying the tables'schema.I played around with GRANT but apparently, a member of "db_datareader"cannot create/modify extended properties on an object if he's not theowner of this object. I tried making this user a member of"db_datawriter", but it didn't work.Nothing short of making him member of "db_ddladmin" worked... but thenthis is too much, the user can now alter to delete tables: i DON'T wantthat!Any ideas anyone? Cheers!Ben

View 3 Replies View Related

Object Is Invalid. Extended Properties Are Not Permitted On ...

Mar 2, 2006

when attempting to execute the following query from within 2005 Mgmt Studio:

sp_dropextendedproperty

@name = 'test_me'

, @level0type = 'schema'

, @level0name = 'dbHSPS.dbo'

, @level1type = 'table'

, @level1name = 'Conflict'

/*[ , [ @level2type = 'column'] { 'level2_object_type' }

, [ @level2name = ] { 'level2_object_name' }

] */



I receive:

"Object is invalid. Extended properties are not permitted on 'dbHSPS.dbo.Conflict', or the object does not exist."



However I can SELECT * FROM dbHSPS.dbo.Conflict and it returns results, and I know the test_me extended property exists for table "Conflict" in dbHSPS.dbo ...

View 4 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

Extended Properties Created By Visual Studio On CLR UDF's

Aug 23, 2007



When one deploys a CLR DLL that contains [SqlFunction]'s, Visual Studio creates three extended properties on the SQL function that is created: these are,

AutoDeployed, SqlAssemblyFile, SqlAssemblyFileLine.
What I haven't found anywhere on Help or MSDN online is what these extended properties mean.
Could someone enlighten me?
1. What is a description of the above properties?
2. What is the benefit of using them (clearly the function works without using them). Does it help debugging?
3. Does the developer need to manually keep for instance the SqlAssemblyFileLine in sync with changes in the .NET code?

Thanks a lot.

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

SQL Server 2008 :: Add Target Specific Extended Properties To Replication Subscriber Tables

Oct 6, 2015

I have documentation in the form of extended properties for tables which are subscribers in a replication scheme. The documentation describes the tables in reference to their replication scheme. I don't want to apply them to the source and have them published.I can't apply the extended properties receiving the error, 'don't have permission' yet I am DB creator on all systems. The theory is that I can't modify the subscription. Which makes sense.Can I turn off the replication, apply the extended properties, then turn on replication without causing harm?

View 0 Replies View Related

Only Functions And Extended Stored Procedures Can Be Executed From Within A Function. Sp_executesql Is A Extended Stored Prod

May 15, 2008

i have created the folowing function but keep geting an error.

Only functions and extended stored procedures can be executed from within a function.

Why am i getting this error!

Create Function myDateAdd
(@buildd nvarchar(4), @avdate as nvarchar(25))
Returns nvarchar(25)
as
Begin
declare @ret nvarchar(25)
declare @sqlval as nvarchar(3000)

set @sqlval = 'select ''@ret'' = max(realday) from (
select top '+ @buildd +' realday from v_caltable where realday >= '''+ @avdate +''' and prod = 1 )a'

execute sp_executesql @sqlval
return @ret
end

View 3 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

Extended SP

Oct 11, 1999

i'm calling a create table SQL from my ASP. There are a lot of fields created
by this sql. Wondering if an extended stored procedure would be a better choice? (can't use a stored procedure as i need to pass arrays) Will it enhance performance and also, can i use VB to make that DLL or i need to use VC?

thanks

View 1 Replies View Related

Useful Extended SPs

Oct 5, 2004

Get current free space for all drives in megabytes (Documented)
EXEC master.dbo.xp_fixeddrives


Determine if file exists (UnDocumented Procedure)
DECLARE @i int
EXECUTE master.dbo.xp_fileexist '\myServerc$oot.ini', @i OUTPUT
SELECT @i

View 3 Replies View Related

SQL / Extended Proc Dll&#39;s

Oct 25, 2000

I created an extended procedure DLL according to the guidelines set forth in the Books Online. I placed this DLL to be called in a trigger. The DLL fires, but some aspects of the dll fail. Is there a C lang. limitation when used with SQL server? I can do file i/o in the dll (open a file, write to it) but other functions such as C API functions FindWindow / SendMessage always fail. I have tested the DLL outside of SQL server and it works fine. Whats up, I can't beleive that Microsoft would write SQLServer where only certain functions of the DLL called by SQL server will work.. Any ideas would be appreciated! KT

View 1 Replies View Related

Extended Procedures

Mar 8, 1999

Hey everyone,

I'm attempting to copy over extended procedures from another database, and it's only copying stored when I use the "Transfer Database" wizard. Anyone know why it doesn't copy extended, and how I can get it to? Thanks!

Alex

View 1 Replies View Related

Extended Procedures

Aug 22, 2002

I have to write a stored procedure to gather .dat files from multiple network shares to a single location and bulk insert them using format files. I have the SP working that accepts the filename and performs the bulk insert into my SQL tables using the appropriate format file.

Now, I had originally wrote the "copy files" portion in VB using the FSO, but was told it has to all be in a SQL SP. I have been investigating the xp_cmdshell extended procedure, which would work if I weren't pulling the .dat files from a Novell volume. For example connecting to a windows share this works...

exec xp_cmdshell 'dir servershare', no_output

but not when using a servervolume (Novell), even though from the command prompt this command will work to the novell volume.

Does anyone know of any other extended procedure or method in T-SQL that can perform file system functions?

Thanks in advance for any help!

View 4 Replies View Related

Extended SP Questions

Jul 20, 2005

I would like to know if I can determine the calling user from withinan extended stored procedure. I assume it's accessible in theSRV_PROC structure somewhere.Also, does anyone know of a comprehensive list of what is included inthe SRV_PROC structure?This is for SQL Server 2000.Thanks

View 2 Replies View Related

Regarding Extended Property

Oct 31, 2006

hi,

Can anyone tell me how to use the extended stored property like sp_addextendedproperty in java code?

Thanks,

Meghna

View 2 Replies View Related

Extended Procs Using C#

Oct 13, 2006

What is the procedure to create a extended stored procedure using C#.

Actually we have created a dll file using c# and it was added to the bin folder of mssql server.
Also dll file is added to the sql server using "xp_extendedproc"

But while executing the extended proc we got this error
"ODBC: Msg 0, Level 16, State 1
Cannot load the DLL xp_TestSql.dll, or one of the DLLs it references. Reason: 126(The specified module could not be found.)"

View 8 Replies View Related

Extended Stored Procedure

Apr 12, 2005

Could someone who has done it before be kind enough to post a short example of how to make a call from an extended stored procedure to a .NET DLL?  Or even direct me to an example, or tell me that this is possible / not possible, it would help.
Thanks,Brian
 

View 4 Replies View Related

Extended Stored Procedures

Oct 12, 1999

I'm trying to execute an exetended stored procedure from a trigger. The scenario is this: when an input occurs on a table, my trigger is fired, the extended stopred procedure is to be run, and VB app is to be notified that there is new input to process.

Problem is, I can't seem to get the XP to run. I have written a minimal DLL
with VC++ 6, has nothing but the required __GetXpVersion function and the
trigger function, as:

__declspec(dllexport) SRVRETCODE xp_InputAlarm(SRV_PROC *pSrvProc)
{ return XP_NOERROR; }

__declspec(dllexport) ULONG __GetXpVersion()
{ return ODS_VERSION; }

Pretty simple. I have defined the XP in the master database, set the properties point to the DLL. Believe everything is set up properly. However,
when an input occurs, a run-time error is generated on the XP. Attempting to execute it in Query Analyzer gives this error:

"Cannot find the function xp_InputAlarm in the library D:CustomMedInstaCert SourceInputAlarmInputAlaInputAlarm.dll. Reason: 127(The specified procedure could not be found.)."

Which I think means it can't find the proper entry point (xp_InputAlarm) in the DLL. Any help would be greatly appreciated.

mjo

View 2 Replies View Related

Extended Stored Procedures

Jan 6, 2005

Is there any way I can create an SQL script on any extended stored procedures? I need to see what they do. I looked in books online, but it didn't help. Thanks.

View 3 Replies View Related

VC++ Code Example For Extended SP - WANTED

May 8, 2002

Please help to find an example of the code written on VC++ for an extended stored procedure (dll) for SQL Server 2000.

Thanks

View 1 Replies View Related

Extended Stored Procedure -- VB

Jun 25, 2002

I am looking for examples written in VB. Thanks ALOT!!

View 1 Replies View Related

Extended Stored Procedures - C/C++ Only?

Jun 13, 2001

I am working with Visual Basic and SQL Server 2000. I am looking to convert some of the VB into extended stored procedures, yet everything I've been reading has said that xp's can only be written in C or C++. Is this true??

Thanks.

Caroline Kaplonski
ckaplonski@buckconsultants.com

View 1 Replies View Related

Extended Stored Procedure

Oct 15, 2001

is it possible to view the source of an extended stored procedure.
I know that it is a dll program
but i want to know how works one of my extented stored proc

View 1 Replies View Related

Extended Stored Procedures

Jan 6, 2005

Howdy,

I'm trying to call XP_CMDSHELL from a stored procedure that's not in the Master db. How do I call XP_CMDSHELL? I've tried "Use Master" but I get an error telling me that I can't use "USE" inside of a stored procedure.

Thanks!

View 2 Replies View Related

SQL Server Is Not Releasing Extended SP DLL

Nov 3, 2006

During a Wise Installation upgrade of our software, we are renaming a
directory that contains our ExtendedSP DLL. We issue a
DBCC TSWSQLXP(Free) call before doing the rename, yet SQL Server,
still "holds on" to that DLL. We install a new version, and the ListDLLs
utility (from sysinternals) lists the new DLL in the correct directory.

However, when trying to remove the renamed directory, it won't let us
remove the old DLL because it says it is in use. We can delete the NEW
DLL in the NEW directory with no problem.

I have run the DBCC call numerous times and SQL Server STILL won't
release the DLL for deletion. The only way to delete the OLD DLL is to
stop the SQL Server, delete the DLL, and then restart SQL Server. We
do NOT want to do this because there may be other processes running in
SQL Server.

Any help here would be greatly appreciated.

View 4 Replies View Related

Registeration Of Extended Dlls

May 14, 2007

I require Api call or any ways to find the installed path of SQL SERVER 2005.

This is required becauses you application register set of extended procedures. As part of SQL SERVER 2005 we found that the dll has to be registered with full path in general
<b> "c:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLBinn" </b>
since customers may install the server in any drive , i require to find the installed path.

A help on this will help me a lot..

Thanks
Ilanthendral.R

View 1 Replies View Related

Extended Character Search

Jul 23, 2005

Is there an easy way to perform a SELECT where you haveblah LIKE 'asdf'but instead of just returning all the asdf's, it also looks for àsdf,ásdf, âsdf, etc?

View 4 Replies View Related

How To Extended Stopred Procedure??

Sep 11, 2007



Hello All,
i having one DLL which return Keywords.
i want to use that DLL in SQL Server Stored Proc.
as i know it is possible through Extended Stored Proc.
how to create that ? how i can pass Text Stream as input to that DLL in Extended Stored Procedure.

View 3 Replies View Related

How To Use C# DLL In Extended Stored Procedure?

Sep 11, 2007

Hello,
i have created one C# DLL

xp_hello.dll
Its having below code in Class1.cs


namespace xp_hello

{

public class Class1

{

public string xp_hello()

{

string strReturn = string.Empty;

strReturn = "Chirag Patel";

return strReturn;

}

}

}

i compiled that DLL and kept it in C drive.
now i am trying to create Extended stored procedure using

sp_addextendedproc 'xp_hello', 'c:xp_hello.dll'
its showing successful creation.
Now i am trying to Execute it with


DECLARE @txt varchar(33)

EXEC xp_hello @txt OUTPUT

now its showing below message.

Msg 17751, Level 16, State 0, Procedure xp_hello, Line 1

Could not find the function xp_hello in the library xp_hello.dll. Reason: 127(The specified procedure could not be found.).


can anyone please help me out in this?
Thanks

View 4 Replies View Related







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