Wednesday, March 28, 2012
How can I change the table schema?
however I would like to change the database schema in the SQL server. How
can I do that? e.g. such as adding a field in the table or changing the data
type of the column field.
Thank you
Regards
Jabba
use sp_repladdcolumn or sp_repldropcolumn. You can also right click on your
publication, select publication properties, go to Fitler Columns and add
your columns there.
Hilary Cotter
Looking for a book on SQL Server replication?
http://www.nwsu.com/0974973602.html
"Jabba" <Jabba@.discussions.microsoft.com> wrote in message
news:C10B986C-F38D-4360-B945-11184633AD78@.microsoft.com...
> I have perform merge replication in the SQL server with access database,
> however I would like to change the database schema in the SQL server. How
> can I do that? e.g. such as adding a field in the table or changing the
data
> type of the column field.
> Thank you
>
> Regards
> Jabba
Wednesday, March 21, 2012
How can i add a tool to SQL Server as a add-in(plug-in)
I have developed a tool which you can use to convert XML(DTD or XML Schema) to relational database model. I want to add it to SQL Server.
Can i do it?
If you are asking if you can install a plug-in to Management Studio (SSMS) the answer is no. Currently SSMS is locked down. For the next release of SQL Server we are investigating how to expose a full extensibility interface.
Cheers,
Dan
Monday, March 19, 2012
How can default schema change in stored procedure ?
Hello,
How can default schema change in stored procedure ?
For Example:
There are two user 'User1', 'User2' in TestDb Database.
These users default schema is same name, like 'User1's default schema is 'User1', and 'User2's default schme is 'User2'.
And each users have 'Table1' table, like [User1].[Table1], [User2].[Table1]
In this enviroment,
query 'SELECT * FROM [Table1]' refer default schema of execute user.
like 'User1' execute 'SELECT * FROM [User1].[Table1]'.
But if dbo create a stored procedure below, default schema doesn't work.
CREATE PROCEDURE SelectTable1
AS
SET NOCOUNT ON
SELECT * FROM Table1
GO
When User1/User2 execute this stored procedure, error happend because Table1 not found.
So, I want to change default schema in stored procedure to current users default schema.
EXECUTE AS CALLER is change current user principal only, this doen't change default schema.
Regards,
This is not possible to do in TSQL right now without using dynamic SQL for the query inside the stored procedure. For EXECUTE AS CALLER the unqualified object names resolve against the schema for the owner of the SP and not the caller. This is known issue and there have been requests to provide the facility to resolve object name against the invoker of the SPs. Oracle for example allows you to specify this when creating PL/SQL SPs.