A few features I like in the SQL 2008:
- Database encryption
- Database backup compression
- FileStream support for big files
I also like the IntelliSense in the new SQL Management Studio.
A few features I like in the SQL 2008:
I also like the IntelliSense in the new SQL Management Studio.
Add referrence to Micosoft.SQLServer.ManagedDTS.dll. It is in your SQL Server Program Files Folder\SDK\Assemblies.
using Microsoft.SqlServer.Dts.Runtime;
namespace ExecuteSSIS
{
class Program
{
static void Main(string[] args)
{
Application app = new Application();
//
// Load package from file system
//
Package package = app.LoadPackage(@”c:\myPackage.dtsx”, null);
package.ImportConfigurationFile(@”c:\myPackage.dtsConfig”);
//Pass parameters
Variables vars = package.Variables;
vars[“variable”].Value = “values”;
DTSExecResult result = package.Execute();
Console.WriteLine(“Package Execution results: {0}”,result.ToString());
//
// Load package from Sql Server
//
Package package2 = app.LoadFromSqlServer(
“myPackage”,”server_name”, “sa”, “password”, null);
package2.ImportConfigurationFile(@”c:\myPackage.dtsConfig”);
//Pass parameters
Variables vars2 = package2.Variables;
vars2[“variable”].Value = “value”;
DTSExecResult result2 = package2.Execute();
Console.WriteLine(“Package Execution results: {0}”,
result2.ToString());
}
}
}
Today I spent sometime to review the System.DirectoryServices name space in .Net 2.0. It is very convenient to use it to access A.D. and doing Authentication for your apps. Here are some sample codes in C# you might need to start with:
//Variables for getting groups
string _path;
string _filterAttr;
bool validateUser(string username, string password)
{
//Validate Users
string path = “LDAP:// your domain”;
string domainUserName = domain + @”\” + username;
DirectoryEntry entry = new DirectoryEntry(path, domainUserName, password);
try
{
// Bind to the native object to force authentication to happen
Object obj = entry.NativeObject;
DirectorySearcher search = new DirectorySearcher(entry);
search.Filter = "(SAMAccountName=" + username + ")";
search.PropertiesToLoad.Add("cn");
SearchResult result = search.FindOne();
if (result != null)
{
// Authenticated
_path = result.Path;
_filterAttr = result.Properties["cn"][0].ToString();
return true;
}
else
return false;
}
catch (Exception ex)
{
throw new Exception("User not authenticated: " + ex.Message);
}
}
//Getting the groups this user belongs to
string getUserGroups()
{
DirectorySearcher search = new DirectorySearcher(_path);
search.Filter = “(cn=” + _filterAttr + “)”;
search.PropertiesToLoad.Add(“memberOf”);
StringBuilder groups = new StringBuilder();
try
{
SearchResult result = search.FindOne();
int nCnt = result.Properties["memberOf"].Count;
for (int i = 0; i {
string dn = result.Properties["memberOf"][i].ToString();
int eidx = dn.IndexOf("=", 1);
int cidx = dn.IndexOf(",", 1);
if (eidx == -1)
{
return string.Empty;
}
groups.Append(dn.Substring(eidx + 1, cidx - eidx - 1));
groups.Append("|");
}
}
catch(Exception ex)
{
throw new Exception("Groups not getting: " + ex.Message);
}
return groups.ToString();
}
My computer has been complaining for “Referenced assembly System.Deployment is not installed…” whenever trying to install any ClickOnce apps. And those apps were not installed successfully since sometime. Here are the solutions I found from msdn forum. It worked very well after I delete the ClickOnce store folder.
Run “Mage -cc”. (Mage.exe can be found in the .NET 2.0 SDK)
Uninstall the application via Add/Remove Programs and reinstall it
If neither of these work then the last option is to delete the ClickOnce store and get back to clean state. To delete the ClickOnce store delete the folder “%userprofile%\Local Settings\Apps”.
It is very convenient to use AuthorizationStoreRoleProvider with ActiveDirectoryMembershipProvider for ASP.net application authentication and security control. But there are a few tricks you need to know when developing and deploying. Here are the useful links:
How To: Use Authorization Manager (AzMan) with ASP.NET 2.0
When I tried to deploy the app to Windows 2003 Service Pack 1, it didn’t work. I found out it needs to apply this fix (KB915786) to make it work.
Went to MSDN Event yesterday. Lynn‘s talk and presentation was quite useful. Here are some of the new stuffs I got.
Microsft Popfly (www.popfly.com) is a new Web Platform still in Beta. But looks very interesting. I just signed in and played around a little bit. The design and architecture is very good. I will use it definitely.
Astoria (astoria.mslivelabs.com) is also a very interesting project. It is kind of advanced Web Data Access framework and foundation.
And I got a book “Introduction to Silverlight 1.0”, too. Although it will be outdated soon since 2.0 is on the way.
I just happened to find this old article. But it is still good.
http://www.databasejournal.com/features/mssql/article.php/10894_2244381_1
I have been tested the Studio 2008 Beta 2 for two months already. So far, it is pretty stable. And I already used it to maintain some of our websites. It is faster than Studio 2005. Let’s wait for the final release soon.
Recently, I need to create a data dictionary for our 12GB database. And I did a research on creating data dictionary, and found this good tool - Data Dictionary Creator. It stores all the information in Extended Properties. Here are some blog link for this cool tool:
tag:
缺失模块。
1、请确保node版本大于6.2
2、在博客根目录(注意不是yilia根目录)执行以下命令:
npm i hexo-generator-json-content --save
3、在根目录_config.yml里添加配置:
jsonContent: meta: false pages: false posts: title: true date: true path: true text: false raw: false content: false slug: false updated: false comments: false link: false permalink: false excerpt: false categories: false tags: true