2015-03-24 12 views
25

Posiadałem zestaw Azure SDK 2.5 i narzędzia do VS2013, które działały poprawnie przez jakiś czas. Dzisiaj zainstalowałem SDK i narzędzia dla VS2015, a teraz mój emulator Azure Storage Emulator nie uruchomi się. Na pierwszy spróbować go uruchomić Mam SQLException:Emulator Azure Storage Emulator kończy się niepowodzeniem po dodaniu zestawu SDK VS 2015

Unhandled Exception: System.Data.SqlClient.SqlException: 
An error occurred while processing the log for database If possible, 
restore from backup. If a backup is not available, it might be 
necessary to rebuild the log. 

Po ponownym uruchomieniu urządzenia, jestem coraz mniejszy błąd:

C:\Program Files (x86)\Microsoft SDKs\Azure\Storage Emulator>WAStorageEmulator start Windows Azure Storage Emulator 
3.4.0.0 command line tool Error: The storage emulator needs to be initialized. Please run the 'init' command. 

Ale działa startowych nie działa:

C:\Program Files (x86)\Microsoft SDKs\Azure\Storage Emulator>WAStorageEmulator init Windows Azure Storage Emulator 3.4.0.0 command line tool Error: Cannot create database. 

Począwszy od -inprocess mówi, że mój login nie działa. Jestem administratorem maszyny, więc to dziwne.

C:\Program Files (x86)\Microsoft SDKs\Azure\Storage Emulator>WAStorageEmulator start -inprocess 
Windows Azure Storage Emulator 3.4.0.0 command line tool 
Cannot open database "WAStorageEmulatorDb34" requested by the login. The login failed. 
Login failed for user 'DOMAIN\genslow'. 
3/24/2015 10:00:57 AM [Info] Starting Service: Blob 
3/24/2015 10:00:57 AM [Verbose_debug] [Nephos.Storage] { Initialize 
3/24/2015 10:00:57 AM [Info_debug] Loading config Param NephosAllowPathStyleUris (Allow path-style URIs) read: true 
3/24/2015 10:00:57 AM [Info_debug] Successfully loaded NephosAllowPathStyleUris: True 
3/24/2015 10:00:57 AM [Info_debug] Loading config Param NephosIncludeInternalDetailsInErrorResponses (Include internal details in error responses) read: false 
3/24/2015 10:00:57 AM [Info_debug] Successfully loaded NephosIncludeInternalDetailsInErrorResponses: False 
3/24/2015 10:00:57 AM [Info_debug] Loading config Param StampName (Stamp Name) read: StorageEmulator 
3/24/2015 10:00:57 AM [Info_debug] BlockBlob: Load Interval failed. IsGC: True, Exception at System.Number.ParseDouble(String value, NumberStyles options, NumberFormatInfo numfmt) 
    at Microsoft.WindowsAzure.DevelopmentStorage.Store.BlockBlobGarbageCollector.GetTimerIntervalOrDefault(Boolean isGC) 
3/24/2015 10:00:57 AM [Info_debug] BlockBlob: Load Interval failed. IsGC: False, Exception at System.Number.ParseDouble(String value, NumberStyles options, NumberFormatInfo numfmt) 
    at Microsoft.WindowsAzure.DevelopmentStorage.Store.BlockBlobGarbageCollector.GetTimerIntervalOrDefault(Boolean isGC) 
3/24/2015 10:00:57 AM [Verbose_debug] [Nephos.Storage] } Initialize 
Service Status: Blob http://127.0.0.1:10000/ True 
3/24/2015 10:00:57 AM [Info] Starting Service: Queue 
3/24/2015 10:00:57 AM [Verbose_debug] [Nephos.Queue] { Initialize 
3/24/2015 10:00:57 AM [Info_debug] Loading config Param NephosAllowPathStyleUris (Allow path-style URIs) read: true 
3/24/2015 10:00:57 AM [Info_debug] Successfully loaded NephosAllowPathStyleUris: True 
3/24/2015 10:00:57 AM [Info_debug] Loading config Param NephosIncludeInternalDetailsInErrorResponses (Include internal details in error responses) read: false 
3/24/2015 10:00:57 AM [Info_debug] Successfully loaded NephosIncludeInternalDetailsInErrorResponses: False 
3/24/2015 10:00:57 AM [Info_debug] Loading config Param StampName (Stamp Name) read: StorageEmulator 
3/24/2015 10:00:57 AM [Verbose_debug] [DevelopmentStorage.Queue] } Initialize 
Service Status: Queue http://127.0.0.1:10001/ True 
3/24/2015 10:00:57 AM [Info] Starting Service: Table 
3/24/2015 10:00:57 AM [Verbose_debug] [Nephos.Table] { Initialize 
3/24/2015 10:00:57 AM [Info_debug] Loading config Param NephosAllowPathStyleUris (Allow path-style URIs) read: true 
3/24/2015 10:00:57 AM [Info_debug] Successfully loaded NephosAllowPathStyleUris: True 
3/24/2015 10:00:57 AM [Info_debug] Loading config Param NephosIncludeInternalDetailsInErrorResponses (Include internal details in error responses) read: false 
3/24/2015 10:00:57 AM [Info_debug] Successfully loaded NephosIncludeInternalDetailsInErrorResponses: False 
3/24/2015 10:00:57 AM [Info_debug] Loading config Param StampName (Stamp Name) read: StorageEmulator 
3/24/2015 10:00:57 AM [Info] NOT using custom threadpool for blocking calls 
Service Status: Table http://127.0.0.1:10002/ True 

Running startowych z -inprocess wydaje następujący szczegół:

C:\Program Files (x86)\Microsoft SDKs\Azure\Storage Emulator>WAStorageEmulator init -inprocess 
Windows Azure Storage Emulator 3.4.0.0 command line tool 
Added reservation for http://127.0.0.1:10000/ in user account DOMAIN\genslow. 
Added reservation for http://127.0.0.1:10001/ in user account DOMAIN\genslow. 
Added reservation for http://127.0.0.1:10002/ in user account DOMAIN\genslow. 

Found SQL Instance (localdb)\MSSQLLocalDB. 

Creating database WAStorageEmulatorDb34 on SQL instance '(localdb)\MSSQLLocalDB'. 
Cannot create database 'WAStorageEmulatorDb34' : Database 'WAStorageEmulatorDb34' already exists. Choose a different database name.. 
One or more initialization actions have failed. Resolve these errors before attempting to run the storage emulator again. 
Error: Cannot create database 'WAStorageEmulatorDb34' : Database 'WAStorageEmulatorDb34' already exists. Choose a different database name.. 

Więc czy jest tak, aby odzyskać od tego czy należy odinstalować wszystko i zacząć od nowa?

Odpowiedz

74

Możesz użyć następującego procesu, aby odzyskać od większości problemów init związanych z bazą danych. Zauważ, że wszelkie dane w emulatorze są obecnie tracone.

Usuwanie instancji SQL:

sqllocaldb stop MSSQLLocalDB 
sqllocaldb delete MSSQLLocalDB 

Teraz usuń następujące pliki bazy danych:

%USERPROFILE%\AzureStorageEmulatorDb*.mdf 
%USERPROFILE%\AzureStorageEmulatorDb*.ldf 

Wreszcie odtworzenie instancji SQL:

sqllocaldb start MSSQLLocalDB 

Następnie ponownie init emulatora.

+2

Dzięki, że działało to również dla mnie. –

+0

Dziękuję, miałem ten sam problem z Azure SDK 2.8.2 i emulatorem pamięci 4.2 i to rozwiązało problem – Frederic

+0

Miałem podobny problem, ale nie miałem plików WAStorageEmulatorDb * .mdf i WAStorageEmulatorDb * .ldf w moim Folder% USERPROFILE%. –

Powiązane problemy