views:

912

answers:

2

I'm trying to script the changes to a SQL Server Compact Edition database running on windows mobile 6 and could really use:

EXECUTE sp_rename 'MyTable.SomeColumn', 'BrandNewName', 'COLUMN'

What other system stored procedures are available?

What are the differences to the non compact version?

Edit: There ARE system stored procedures in ce, sp_rename is an example although it only seems to work against tables not columns.

A: 

SQL CE doesn't support stored procedures, so there are none at all.

ctacke
User stored procs no, system stored procedures yes.
TreeUK
Downvote away people. But I seriously doubt that the SQLCE team would have actually implemented a full SP engine and then exposed only 2 procedures and no ability to add user procs. I'm willing to bet that the two listed aren't SPs at all but instead are hard-coded into the query engine.
ctacke
I'm having to script changes to a compact database deployed to more than 40 devices. I saw sp_rename was there so my question was to find other sprocs that might help the scripting. So I think your declaration of 'there are none' posting an article about user sprocs is what got you downvoted.
TreeUK
I was already aware that user sprocs are not available, but that wasn't the question. Article is appreciated though, so +1 from me.
TreeUK
These "system" sprocs don't exist. They are actually C functions that just get mapped to a sql function for some situations. There is no internal sproc engine.
Jason Short
Which is exactly what I suspected.
ctacke
+2  A: 

I don't believe there are any stored procedures available in SqlCe. My solution has been to create a class that contains a SqlCeEngine and expose my own methods like RenameColumn, and do the work internally.

EDIT 1: Now, that's very interesting (the existence of sp_rename). Considering the documentation out there that states there are no stored procedures in SQL CE, I don't think it's really fair to downvote anyone for that assumption.

EDIT 2: I've come across this link from MSDN that indicates at least one other proc: sp_show_statistics. I'm assuming you're using SQL CE 3.5 SP1.

overslacked
Again, you can't define your own stored procedures which is what ctacke's article says but the database runs off system stored procs internally. Which is what my question is about.
TreeUK
That looks as close to a definitive list as I can get :) thanks
TreeUK
There are not actually procs - you call them that way but they are mapped internal functions that are just exposed that way. There is no internal secret stored proc engine.
Jason Short