Error restoring database on new SQL server instance - sql-server-2008-r2

I am trying to restore a database backup on a newly installed named instance on SQL Server 2008 R2. I have several other named instances on the same server and have no problems restoring database backups but when I try the restore on the new instance I get as far as the "Specify Backup" dialog and click the "Add" button and instead of getting the "Locate Backup File" dialog I get the following error ...
Failed to retrieve data for this request. (Microsoft.SqlServer.Management.Sdk.Sfc)
An exception occurred while executing a Transact-SQL statement or batch.
(Microsoft.SqlServer.ConnectionInfo)
Column name or number of supplied values does not match table definition. (.Net SqlClient Data Provider)
Server Name: localhost\DEVSERVER1
Error Number: 213
Severity: 16
State: 7
Procedure: xp_fixeddrives
Line Number: 1
I installed SP2 for the instance and rebooted the server but I still get the above issue. A named instance that restores fine and the new named instance with errors are showing the same version in SQL Server Mgmt Studio 10.50.4000.
I am starting SQL Server Mgmt Studio as Administrator. Still no joy.
Any ideas?

Related

Postgres Server Migration on Azure

I am performing a postgres server migration on azure but I keep getting a failure. Every time I migrate it fails on extensions with the following error:
Data migration could not be started for one or more of the DBSets. Error details: PGv2RestoreError: PG Restore failed for database 'DATABASE_NAME' with exit code '1' and error message 'error: could not execute query: ERROR: must be owner of extension hypopg'.
Any ideas? The data appears to be in the tables, but the migration in the Azure portal just says failed. This is happening on two servers.

SQL Server 2008 R2 ODBC Error: SQL state HTY00

My application server (say 192.168.100.1) and database server (say 192.168.100.2) both are on the same domain. I'm trying to create an ODBC connection from the application server to a SQL Server database on the database server, but at the time of login it generates this error:
Microsoft SQL Server Login
Connection failed:
SQL State: 'HYT00'
SQL Sever Error: 0
[Microsoft][ODBC SQL Server Driver]Login timeout expired
I've checked all configuration for SQL Server and tried possible solutions without resolving this issue.
Important:
A DSN can be successfully created from my own PC but when attempting this server to server as described above, ODBC is facing this problem.
OK, I have got the solution. Sometimes, if SQL Server can't be found on network by its name while creating DSN in windows, the logging in takes time more than usual which tells ODBC manager that Database Server we are looking for is not responding or responding too late.
Solution.
Instead of selecting server from the list while making dsn, use 'server-ip\SQLExpress'.
e.g 192.168.100.2\SQLExpress.
Thats All.

EF7: error connecting to a local db database

I'm trying to create a new asp.net core app which uses EF7 to access a local db database and I'm having some problems with the connection string. I've installed the local db service and I have already created several instances:
PS C:\Users\luisabreu> sqllocaldb info
MSSQLLocalDB
ProjectsV12
ProjectsV13
v11.0
MSSQLLocalDB is running v12:
PS C:\Users\luisabreu> sqllocaldb info mssqllocaldb
Name: MSSQLLocalDB
Version: 12.0.2000.8
Shared name:
Owner: GRM\luisabreu
Auto-create: Yes
State: Running
Last start time: 05/04/2016 08:46:17
Instance pipe name: np:\\.\pipe\LOCALDB#518FD662\tsql\query
This is the connection string I'm passing to EF:
{
"usersCnnString": "Data Source=(localdb)\\MSSQLLocalDB;Initial Catalog=UsersInfo;Integrated Security=True"
}
Btw, I've already tried this one too:
"usersCnnString": "Server=(localdb)\\mssqllocaldb;Database=UsersInfo;Trusted_Connection=True"
And here's the setup code I'm using for setting up ED dependencies:
services.AddEntityFramework()
.AddSqlServer()
.AddDbContext<UsersContext>(options => options.UseSqlServer(Configuration["usersCnnString"]));
Whenever I try to access the database,I end up with the following error:
System.Data.SqlClient.SqlException (0x80131904): A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 50 - Local Database Runtime error occurred. Specified LocalDB instance name is invalid.)
I'm surely doing something wrong, but what?
thanks!
Luis
Well, it was something simpler...don't forget to kill iis express whenever you change the config of an ASP.NET Core app so that you'll get the correct config data when you re-run the app. The problem was that when I pasted the path:
Server=(localdb)\\mssqllocaldb...
into the json file, VS 2015 automatically escaped the string, turning it into:
Server=(localdb)\\\\mssqllocaldb...
Yes, I've noticed it, but only after trying to load the app on the browser. I corrected the path but didn't kill the IIS Express instance I was using to test my app. So, the error message was absolutely correct because it was still using the old path (which was trying to reach the mssqllocaldb instance running on a localdb server).
Again, stupid error. Hoping that my mistake will save someone else's 30 mins in the future...
if I create a project with user accounts using VS 2015 with RC1 the project template generates the connection string like this:
{
"Server=(localdb)\\mssqllocaldb;Database=thedbnamehere;Trusted_Connection=True;MultipleActiveResultSets=true"
}
I would try making it closer to that, but also wondering if for some reason UsersInfo might not be a valid name, could be some keyword clash
I noticed that vs uses the "userSecretsId" from project.json as the dbname, not sure if that is required but might be worth trying

db2fs shows exception TypeError: netscape.security.PrivilegeManager is undefined

After successfully installing IBM DB2 Express V10.5_01 on an Ubuntu 14.04 LTS machine I tried to follow the next step and start
db2fs
in an X-Windows session. I am asked to create a profile for firefox and a browser window comes up with an error message dialog showing
exception TypeError: netscape.security.PrivilegeManager is undefined
When pressing ok for a few times the "create sample database" button disappears and instead a warning appears:
First Steps was unable to connect to the online DB2 Information Center and could not find an instance of a locally installed DB2 Information Center for this version of the product. To access product information, one of the following types of connections to a DB2 Information Center is required:
Internet access to the online DB2 Information Center
A locally installed version of the DB2 Information Center
Access to a remotely configured DB2 Information Center
As a workaround I tried to use
db2sampl
after adding my user to the groups dasadm1 db2iadm1 and db2fadm1 that had been created by the installation procedure.
db2sampl -force
Creating database "SAMPLE"...
Existing "SAMPLE" database found...
Dropping and recreating database "SAMPLE"...
Attempt to drop existing database "SAMPLE" failed.
Attempt to create the database "SAMPLE" failed.
SQL1013N The database alias name or database name "SAMPLE " could not be
found. SQLSTATE=42705
db2 list db directory
shows:
Database alias = SAMPLE
Database name = SAMPLE
Local database directory = <path>/db2inst1
Database release level = 10.00
Comment =
Directory entry type = Indirect
Catalog database partition number = -1
Alternate server hostname =
Alternate server port number =
unfortunately
db2cc
is not available anymore as an admin tool in V10.5 see DB2 Express V10.1 and db2cc binary and before downloading
IBM Data Studio I'd first like to check the basic integrity of my installation.
db2help
e.g. gives the errormessage
/bin/sh: 0: Illegal option -p
In all I have the feeling that Ubuntu 14.04 LTS is not a properyly supported platform for IBM DB2 Express V10.5_01.
How feasible is it to get IBM DB2 Express V10.5_01 running in this environment?

MobileFirst install - cannot connect to database appcntr after it was created

Trying to install MobileFirst 6.3 (Using DB2 v 10.5, Windows Server 2012 R2 std) - and during the creation of the DB2 APPCNTR database stage, I get the error:
Creating database APPCNTR (this may take 5 minutes) ...failed:
Cannot connect to database 'APPCNTR' with user 'db2admin' after it was created: com.ibm.db2.jcc.am.SqlException: DB2 SQL Error: SQLCODE=-1035, SQLSTATE=57019, SQLERRMC=null, DRIVER=4.17.29
This is a clean installation of DB2, with no other programs using it (that I know of). The db2admin user is a member of my windows security group 'DB2ADMS' as well as 'DB2USERS' just in case
If I go back in the installer, then press next again, it says the database is already created (not sure if it's fully successful or partial)....
I believe that the database has been created successfully but for some reason, it is not possible to connect to the database via JDBC.
The explanation for the error message can be found here -- it can be many reasons: http://www-01.ibm.com/support/knowledgecenter/SSEPGG_9.5.0/com.ibm.db2.luw.messages.sql.doc/doc/msql01035n.html
When that happens to me the issue is often resolved by waiting a bit and retarting Installation Manager. Restarting the DB2 instance helps also. (If you don't restart Installation Manager, it believes it needs to create the database and fails because the database was created).
If the problem is not resolved by waiting a bit, you can also create the database manually prior running install Manager using that procedure (use a different database name than the one that is considered busy):
https://www-01.ibm.com/support/knowledgecenter/SSHS8R_6.3.0/com.ibm.worklight.installconfig.doc/admin/t_creating_the_db2_database_for_App_Center.html
Then use that database name when running Installation Manager,