Database context does not exist or is invalid wincc что делать
Сообщения: 9 Благодарности: 0
SQL сервер запущен, надо было поставить в настройках TCP ip. Получилось зайти под локальной админкой в Managment Studio, а дальше проблемы, при открытии своей БД пишет следующее TITLE: Microsoft SQL Server Management Studio ——————————
The database ‘name database’ is not accessible. (ObjectExplorer)
OK —————————— А если вызвать у БД свойства то будет ошибка связанная с правами доступа.
Property Collation is not available for Database ‘[namedatabase]’. This property may not exist for this object, or may not be retrievable due to insufficient access rights. (Microsoft.SqlServer.Smo)
Так же при создании нового пользователя появляется ошибка TITLE: Microsoft SQL Server Management Studio ——————————
Unable to cast object of type ‘System.DBNull’ to type ‘System.String’. (Microsoft.SqlServer.Smo)
fpm_start("true");
После этого база стала открываться, создание пользователей заработало, создали админа бд, опять остановили сервер, удалили параметр, запустили и вошли под только что созданным.
We are currently migrating servers (2005 to 2008) and our host backed up the SQL database and transferred it to the new server.
I have transferred the website files and changed the IP address in the connection string and the global.asa file.
So technically speaking we have a mirror image on the new server, but when I try to launch a page that connects to the SQL I get the following error.
7 Answers 7
Check your TCP/IP Port is enabled or not
— Open SQL Server Configuration Manager from start program. — Expand SQL Server Network Configuration — Click on Protocols for XXXX — Right Click on TCP/IP and open properties — Enable TCP/IP — In IP Address Tab, Set Port 1433 in the last option (IPAll)
The error message in this case is very likely correct. First, verify that the network path from you to the new server works and you can connect with the specified userid/pwd.
1) Open Management Studio and attempt to connect to the SQL Server instance by ip address. (By the way, you will probably need to use a SQL Server userid/pwd if you aren’t already since you’re on an Internet host and there is very likely no AD context for Windows auth.)
2) If you can indeed connect to the instance and your database using Management Studio then you’ve probably missed a connection string somewhere. Try to maintain only 1 location for said connection string, usually in a config file. Examine the error line reported in detail to discover which connectionstring is being used and to verify that it reflects the new server ip.
With misconfigured IP in SQL TCP/IP config does let you:
This happens when the server is cloned from another SQL server which carries the SQL IP config from the primary server as residue.
But client applications fail to connect using connection strings though using the server name with the following message:
Do the following to verify on the SQL Server:
I experienced this issue as well when setting up an installation on a new computer.
The connection problem I experienced was due to a firewall setting on the server that hosts MSSQL. The setting gave individual IP addresses access to it which ‘works’ in our environment since IP addresses are described by our administrator as ‘sticky’. Once the Firewall access was granted to my new machine’s IP address, the PHP odbc_connect(. ) statement I was running in my local WAMP setup completed immediately.
As with many problems, there is probably more than one way to run into them, but I wanted to be as explicit as possible about how I experienced it.
This probably would have been a little more clear if I had my own installation of MSSQL management studio on my PC but I do not.
Of the Inbound rules on the server housing MSSQL, I found a rule referring to the MSSQL instance and sure enough found the IP address of my old machine there underneath the properties tab «Scope» as a «Remote IP address». Here’s to hoping I remember this whenever I get my next machine! (The decommissioned PC’s IP has been removed)
@Darren, if you could leave a comment under the answer you accepted, it might be nice to know which of @Tahbaza’s suggestions led you to your resolution.
I’m really in trouble having Wincc RT Professional running on my computer. It has consistently come with an error «Compilation not possible. the «WinCC» SQL instance is either not running or not available» anytime I compile it. I searched that it dues to SQL server (WINCC) is not running so I was gonna enable it in Sql server configuration manager but it didn’t have such thing like that in the list of SQL Server services. How can I install it manually or make Wincc Pro run successfully? I’m using TIA Portal V14 that worked well with Wincc RT Advanced and the SIMATIC WinCC Runtime Professional has also installed formerly. Hope this description enough and clear for you. Thanks in advance.
2 Answers 2
This error has been reported a number of times on the Siemens forums. Unfortunately, it seems every time the forum users stop short of saying what they did to fix it (or they didn’t fix it).
As you may have guessed, the backbone of WinCC RT Professional is a Microsoft SQL Server database, although what flavor and version of SQL they embed in their product, I’m not sure.
Your installation has gone bad in some way. Sorry that’s not a helpful description, but it’s hard to tell why without further information, so here are some fault finding steps I would take.
If you haven’t done so already, have a quick scan of forum to see if you can find a quick fix.
If you were never, ever able to compile with this installation, can I suggest the following as general fault-finding: A. if a working installation on another machine is available, compare the installs as much as possible to find out what’s different. You might find the compatibility tool useful for this: compatibility tool B. If (A) is not possible, perform a fresh installation on a different machine without any other siemens software, and try to compile. C. if (B) works, you might have a software conflict. It happens. I thought that the installers for the different flavors of WinCC check for this before installing, but I’m not sure.
I’ve been using a localDB named ‘Projects’ for a while now. This is the same database that is created by default ASP.NET MVC 5 project. However, suddenly it stopped and I’m not able to connect to it nor restart it using
I see the folder in
also, I have v11.0 in
I’m able to connect to v11.
What else can I try to reconnect to it?
The connection string is
Edit
I tried Attaching the Db file to the connection string
However, I’m still not able to connect
4 Answers 4
Seems like (localdb)\Projects instance got deleted. You can either use (localdb)\v11.0 or recreate Projects instance using SqlLocalDB utility
Command line explained
In my case the Projects instance was already there, actually after invoking this in the command line:
A list of all the instances shows up, mine were:
The connection string in my Web.Config had Data Source=(LocalDb)\v11.0 by default, so I supposed the instance should actually be v11.0 and not Projects. By executing sqllocaldb i v11.0 :
And by starting the instance with sqllocaldb s v11.0 the State was changed to Running, but even while these instances were all running, the exception was still being thrown.
Target database is: ‘Videos.Models.VideoDb’ (DataSource: (localdb)**v12.0**, Provider: System.Data.SqlClient, Origin: Convention).
Therefore I just needed to create v12.0 instance with sqllocaldb c v12.0 12.0 and adjust the Web.Config to this name. After doing this the update was successful.
Interesting that I just experienced the same problem after using (LocalDb)\Projects just fine for months.
I happen to know the last thing I did on my machine before it stopped working was to install an updated version of Telerik’s Kendo MVC UI (which also happens to install a KENDO.MVC.EXAMPLES\APP_DATA\SAMPLE.MDF in LocalDb v11.0) and I’ll bet starts and stops the v11.0 local db which screws the Projects instance up somehow and just like you nothing restarts it.