Can we open audit file from SQL Server in Visual Studio? - sql-server

Can we open audit files from SQL Server in Visual Studio?
I used this query, but it throws an "ODBC Handle" exception
SELECT *
FROM sys.fn_get_audit_file ('E:\\SQL_Audit_Files\*.sqlaudit', default, default);
Thanks in advance.

Related

server name in sql server management studio

when I want to use SQL server managment studio , I dont know what have to write in in server name . pleas help me when I write "." it shows this error
This might help you.
SQL Server Management Studio (SSMS) shows Server name from installed SQLServer.
Uninstall SQLServer if you already installed or install SQLServer from here
Once you reinstall SQLServer. Open SSMS on connect panel
Click on Server name dropdown
Select [Browse for servers]
Selected [Database Engine]
Choose your machine and that's it

"Unable to connect to target server" error occurred while trying to publish sql server project from visual studio 2013

I had an SQL server 2012 database project created in my VS2013. When I try to publish it to SQL Server 2014, it throws "Unable to connect to target server".
I verified the connection setting and the test connection is working fine, it fails only during publish action.
enter image description here
If you have a SQL Database project created using Visual Studio 2013, which you are trying to deploy in SQL Server 2014 instance, you may be receiving an error stating that the data tools are “Unable to connect to target server”:
Most possible reason for this error is You haven't updated/installed "SQL Server Data tools For SQL Server 2014".
Open Visual studio 2013
Select "Tools" -> "Extensions and Updates.." menu.
Select “Updates” -> “Product Updates”
select the “Microsoft SQL Server Update for database tooling” and click the “Update” button.
complete the installation and open your database project in VS2013 and "publish" agian. This time it should work as expected.

VS 2012 Database no longer working after opening in SQL Server Management Studio

I have a database that I have been working with in Visual Studio 2012. I had opened the database user SQL Server Management Studio for SQL Server 2012 so that I could backup the database. After backing up the database, I detached it from SQL Server Management Studio. Now I can not get the database to open in Visual Studio 2012. I get the following message:
The database 'H:\PBC\PBCSITE2012\APP_DATA\PBCDATA.MDF' cannot be opened because it is version 706. This server supports version 662 and earlier. A downgrade path is not supported.
Could not open new database 'H:\PBC\PBCSITE2012\APP_DATA\PBCDATA.MDF'. CREATE DATABASE is aborted.
An attempt to attach an auto-named database for file H:\PBC\PBCSite2012\App_Data\PBCData.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.
Any ideas on what I did to cause this or what I can do to repair it?
Version 706 is a database file from Sql Server 2012
Version 665 is a database file from Sql Server 2008R2 (post SP1 ?)
You are attempting to open a later version of the database file than the current server version ( for example using 2008 r2 to open a 2012 database)
Check your connection strings to verify that connection is being made to the correct instance of the database server.

SQL LocalDB Open in SQL Mgmt Studio Run Script

I created a new LocalDB database from Visual Studio in my WPF project. Now I'd like to run a SQL Script to create all the tables in it. But I can't find how I can open the database with SQL Management Studio? Is it supposed to work like an .sdf file where you can browse to open the database?
Thanks
You must install SQL Server 2012 Management Studio (Express) as described here: http://blogs.msdn.com/b/sqlexpress/archive/2011/10/27/net-framework-4-now-supports-localdb.aspx - download location: http://www.microsoft.com/download/en/details.aspx?id=29062

Cannot open .sdf files in SQL Server Management Studio 2008 SP3

Has made a .sdf database file in Microsoft Visual Web Developer 2010. When I try to open it in SQL Server Management Studio 2008 Service Pack 3, it displays error message:
Cannot connect to C:\Users\Xtreme\Documents\Dishes.sdf.
Incompatible Database Version. If this was a compatible file, run
repair. For other cases refer to documentation. [ Db version =
4000000,Requested version = 3505053,File name =
\?\C:\Users\Xtreme\Documents\Dishes.sdf ] (SQL Server Compact ADO.NET
Data Provider)
What is wrong? There is no problem to work with the .sdf in Microsoft Visual Web Developer 2010.
You cannot use SSMS to open SQL CE 4.0 Database files.
You can use the Microsoft Web Platform Installer to load VS Tools for SQL CE 4 however.
source: http://social.msdn.microsoft.com/Forums/en/sqlce/thread/a9fca12d-6403-47ff-ab6b-fc1db42205c3
WebMatrix should be able to view/edit these database files as well.
Check out Erik EJ's web log - he has a ton of tools for handling all sorts of operations with .sdf files, and also an extensive list of third-party tools that work with SQL Server Compact Edition's .sdf files.
1.Open SQL Server Management Studio, or if it's running select File -> Connect Object Explorer...
2.In the Connect to Server dialog change Server type to SQL Server Compact Edition
From the Database file dropdown select
3. Open your SDF file.

Resources