VB.Net data source connection error - sql-server

i am using VS2008 VB.net and sql 2008.
I tried to connect a new datasource using Microsoft SQL Server Database File (SqlClient) it gives an error;
I tried to connect a new datasource using Microsoft SQL Server (SqlClient) it gives an error;

In the first instance, it appears you're attempting to attach to an active SQL Server database file that is actually being used by SQL Server and/or the permissions to the file don't grant you access to it. Either stop the local SQL Server to access the file, or find out how you would go about getting the file's permissions modified such that you can access it.
In the second instance, it sounds like an older version of the SqlClient simply doesn't support connection to database servers later than SQL Server 2005, as the error message implies. That would suggest the possibility of installing later patches/updates to get your configuration up to date.

Related

Issues migrating SQL Server 2008 to Azure SQL

I'm working to migrate an existing SQL Server 2008 database (on-premises) to Azure SQL. I'm able to generate a .dacpac file using Visual Studio. When I try to import the .dacpac file into Azure SQL, I get the following error:
Operation Name: Performs a database extension operation.
Error: The storage URI is not valid.
So far, I've verified that there are no spaces in the filename & the account does have permissions.
Any pointers to resolving this issue is appreciated.
Regards,
Rajesh
Some one get the same error which caused by the .bacpac file name contains a space. Please check it you have the same problem: Ref here: Error "The storage URI is not valid" when creating a new SQL Azure database from a bacpac.
I don't what your system is, if you are use windows system, please try to use the “deploy the database to SQL Azure” option from the SQL Server Management Studio (SSMS) to deploy the local SQL database to Azure. It's much easier.
Ref this tutorial: https://developer.relatude.com/deploying-a-sql-database-to-azure-with-sql-server-management-studio.

SQL Server - import bacpac file of Azure SQL database to SQL Server 2014 on Virtual Machine

We are moving our Azure SQL Database to SQL Server 2014 on an Azure Virtual Machine. I created a bacpac file of the Azure SQL Database.
Upon trying to import the bacpac into the SQL Server on the VM, I'm met with the following error:
Could not import package. Warning SQL0: A project which specifies
Microsoft Azure SQL Database v12 as the target platform may experience
compatibility issues with SQL Server 2014. Warning SQL72012: The
object [NegativeMedia_Prod_Data] exists in the target, but it will not
be dropped even though you selected the 'Generate drop statements for
objects that are in the target database but that are not in the
source' check box. Warning SQL72012: The object
[NegativeMedia_Prod_Log] exists in the target, but it will not be
dropped even though you selected the 'Generate drop statements for
objects that are in the target database but that are not in the
source' check box. Error SQL72014: .Net SqlClient Data Provider: Msg
7738, Level 16, State 2, Line 1 Cannot enable compression for object
'Captures'. Only SQL Server Enterprise Edition supports compression.
The way I see it, I have two options:
Upgrade SQL Server on the VM - a little scary to me based on the fact that we have existing data there. Is the upgrade process somewhat straightforward? Based on this: https://learn.microsoft.com/en-us/sql/database-engine/install-windows/upgrade-sql-server it sure looks like anything BUT straightforward.
Figure out a workaround to get this database imported into SQL Server 2014. As far as the compression part goes, I can turn that off in the Azure SQL database and recreate the bacpac file. The rest of the error message then is what I would need to "work around" but I don't fully understand its meaning.
Whichever of the two above options can be achieved in the least amount of time is what I need, in order to keep the boss happy. Please let me know if anyone has any suggestions on either.
Upgrade from SQL Server 2014 to SQL Server 2016 was a quick and painless process. It's certainly come a long way. I have upgraded and have now successfully imported the bacpac file.

invoke_ascmd on sql server 2012

I am trying to create a local cube through an SSIS task. With earlier version of sql server I used ascmd. I could not find ascmd for sql server 2012, so I used invoke-ascmd. However when I use the -Server option to point to the local cube, it errors out with the message:
Warning WarningCode="-1055653884" Description="Errors in the met adata
manager. Either the database with the ID of '' does not exist
in the server with the ID of '\LocalCube', or the user does
not have permissions to access the object." Source="Microsoft SQL
Server 2012 Analysis Services"
Does anyone know how to resolve this?
This appears to be happening only when I migrate projects from sql server 2008. Simply migrating the analysis server project, and changing the connection string values in datasource,building,deploying and recreating the xmla script does not seem to be enough.
I need to actually go to the analysis server project delete the cube, data source etc. and recreate them and then recreate the xmla script.

Error copying SQL Server 2000 database to SQL Server 2008

I'm trying to upgrade a database from a SQL Server 2000 instance to a SQL Server 2008 instance. I'm doing this by right clicking on the database and selecting copy database. My current issue is that I'm getting this error in the log file:
OnError,AQUE-SQLDEV,NT
AUTHORITY\SYSTEM,aque-db2000_aque-sqldev_sql2008_Transfer Objects
Task,{F0ACDE4D-D023-400C-BE3C-91CD3A537988},{40E67169-0F3F-4F86-AD2E-6E2CB532BA5C},18/10/2011
15:38:37,18/10/2011 15:38:37,0,0x,Script failed for User 'WebUser'.
StackTrace: at
Microsoft.SqlServer.Management.Smo.Scripter.ScriptWithList(DependencyCollection
depList, SqlSmoObject[] objects) at
Microsoft.SqlServer.Management.Smo.Scripter.ScriptWithList(SqlSmoObject[]
objects) at
Microsoft.SqlServer.Management.Smo.Transfer.Microsoft.SqlServer.Management.Common.ITransferMetadataProvider.SaveMetadata()
at
Microsoft.SqlServer.Management.Dts.DtsTransferProvider.Configure(ITransferMetadataProvider
metadataProvider) at
Microsoft.SqlServer.Management.Smo.Transfer.GetTransferProvider()
at Microsoft.SqlServer.Management.Smo.Transfer.TransferData() at
Microsoft.SqlServer.Dts.Tasks.TransferObjectsTask.TransferObjectsTask.TransferDatabasesUsingSMOTransfer()
InnerException-->Creating a user without an associated login is not
supported in SQL Server 2008.;
Does anyone know why this might be happening?
Thanks,
Sachin
Based on the error it sounds like you need to create a login first on the SQL 2008 server that matches the same login/user that exists on the SQL 2000 server. You could do a couple of things:
create a new database in 2008 to migrate to
create a new login in 2008 that matches the existing login from sql 2000
map the new login to that new database from step #1
run the copy database wizard
If it was me, I would do as marc_s suggested and perform a full backup of the existing database on sql 2000, then restore to a blank database in sql 2008. If you can, update the compatibility mode in database properties to be 2008. I've done this hundreds of times and works like a charm.
The reason can be that a file with the new Database name already exist on the filesystem. We encountered this when we renamed Database X to X_Old, and tried to copy database Y to X. This cannot be done, because database X_Old is still associated with the filename X.
Either delete the conflicting database, or rename the file on the file system.
See http://codecopy.wordpress.com/2012/01/03/error-while-copying-a-database/

Database Schema Error

When I use the Data-List object in Visual Studio 2008 while creating a website, and select a data source, after I choose my data source and click OK it gives me this error:
alt text http://filedb.experts-exchange.com/incoming/2009/07_w28/t157215/errormessage.jpg
I've searched the net and found that:
http://social.msdn.microsoft.com/Forums/en/sqlexpress/thread/43357002-3895-4fd4-aee2-59f86d594e70
I Installed the "Microsoft SQL Server 2008 Management Objects" and the "Microsoft SQL Server System CLR Types" (this is must in order to install the management objects), restarted my computer, but i still have this problem.
Does someone have any idea what can I do?
This error is saying that you either can't access the specified SQL Server (network connectivity problem) OR the specified credentials in your connection string (Windows Integrated or SQL Server) don't have permissions to the specified database and server combination. Provider some more details and you'll probably get some more help...

Resources