Quantcast
Channel: SQL Server Analysis Services Forum
Viewing all articles
Browse latest Browse all 2472

Impersonation info via AMO - not copied when cloning SSAS DB ?

$
0
0

Hi there,

I have SSAS DB which has Impersonation info set to specific Windows user name and password.

I have AMO script in SSIS, which clone DB to another with different name, update structure with full expand and when I try to process new DB it fails with error "The name provided is not a properly formed account name....."

When i check it in SSMS I see, that impersonation mode is set to correct user but without password. When I set password manually in SSMS, then I am able to process new DB from AMO script.

Could you please let me know how to set with AMO also impersonation mode to USER and PASSWORD ?

Here is my code

Public Sub Main() Dim Connection As ConnectionManager Dim Server As New Server Connection = Dts.Connections("SSAS") Server.Connect(Connection.ConnectionString)

'Clone existing DB CUBE

Dim OldDB As Database = Server.Databases.FindByName("CUBE") Dim NewDB As Database = OldDB.Clone() NewDB.Name = "CUBE_merging" NewDB.ID = "CUBE_merging" Server.Databases.Add(NewDB) NewDB.Update(UpdateOptions.ExpandFull)

NewDB.Process(ProcessType.ProcessFull) '!!!!!!!! processing not working Server.Disconnect() Dts.TaskResult = ScriptResults.Success End Sub

Could someone help? Thanks


Viewing all articles
Browse latest Browse all 2472

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>