sql project dll deploy
To generate a deployment script using generate scripts
Open
Management Studio and connect to the SQL Server instance where the
managed assembly or database object to be deployed is registered.
In the Object Explorer
, expand the <server name>
and Databases
trees. Right-click the database where the managed database object is registered, select Tasks
, and then select Generate Scripts
. The Script Wizard opens.
Select the database from the list box and click Next
.
In the Choose Script Options
pane, click Next
, or change the options and then click Next
.
In the Choose Object Types
pane, choose the type of database object to be deployed. Click Next
.
For every object type selected in the Choose Object Types
pane, a Choose <type>
pane is presented. In this pane, you can choose from all the instances
of that database object type registered in the specified database.
Select one or more objects and click Next
.
The Output Options
pane comes up when all of the desired database object types have been selected. Select Script to file
and specify a file path for the script. Select Next
. Review your selections and click Finish
. The deployment script is saved to the specified file path.
相关文档:
1、查看表空间的名称及大小
select t.tablespace_name, round(sum(bytes/(1024*1024)),0) ts_size
from dba_tablespaces t, dba_data_files d
where t.tablespace_name = d.tablespace_name
group by t.tablespace_name;
2、查看表空间物理文件的名称及大小
select tablespace_ ......
CLR 用户定义函数只是在 .NET 程序集中定义的静态方法。CREATE FUNCTION 语句已扩展为支持创建 CLR
用户定义函数。
1、创建数据库项目
2、添加用户定义函数
以下是演示代码:
Code
using
System;
using
System.Data;
using
System.Data.SqlClient;
using
System.Data.Sql ......
递归的通用表表达式
递归的CTE是根据至少两个查询(或者称为两个成员)构建的,一个是非递归查询,也成为固定成员,只能调用一次,另外一个是递归查询,也成为递归成员(RM),可以反复调用,直到查询不再返回行。查询由UNION ALL运算符连接为一个单独的CTE。
--使用递归的通用表表达式
GO
CREATE TABLE CarParts
( ......
新的关系运算符 PIVOT/UNPIVOT/APPLY
1、PIVOT
PIVOT运算符将行旋转为列,并且可能同时执行聚合。使用PIVOT运算符时要注意的重要一点是,需要为它提供一个查询表达式,表达式使用视图、派生表或者是CTE只返回所关注的列。
2、UNPIVOT
UNPIVOT运算符执行与PIVOT运算符相反的操作;他将列旋转为行了。
3、APPLY
......