Connectivity issue with local instance of sql server

hi everbody,
well for the last couple of days i have almost taken my head out to get this issue resolved.
but still i am no where. i have already referred to so many tips available online but still can't fix the prob.
i am trying to connect a C# ( .net 2005) program to connect to the  integrated sql server 2005 instance on my local computer.
i have got windows 7 home basic on my pc with .net frame work 2.0 sp2 and have also upgraded to sql server 2005 sp3 as per some online study.
i have also tried all these steps but still getting the error 40.
1. Check Whether the SQL Server is running or not.
Because the trial to connect to the stopped server may also cause this problem.
2. Check the name of the SQl Server.
For example, if we try to connect to SQL server using .NET application, for some SQL Server, the name of the server "localhost" works, but for some server, we may need to mention "(local)".
3. Check Whether the SQL Browser Service is running
4. Check Whether the TCP/IP is enabled for SQL Server Configuration
* Expand SQL Server Configuration Manager
* Enable TCP/IP
5. Firewall Settings
You may need to add the port of Sql server to the Firewall if it is other than the default port(1433).
Go to Control Panel | Windows Firewall | Change Settings | Exceptions | Add Port
6. Enable the Remote Connection
Goto SQL Server Management Studio.
Right Click on Server node
Click On Properties
Check the Allow Remote connections to Server Check Box
7. Enable Named Pipes
- Open the "SQL Server Configuration Manager" (under Configuration Tools)
- Expand the "SQL Server 2005 Network Configuration"
- Select the "Protocols for "
- Set the Named Pipes To Enabled
8. Create Exception of Sqlbrowser.exe
kindly provide me some help with your valuable suggestions.

Hi Mukesh Devrani,
Thank you for posting.
Your question is more like SQL. I suggest that you can ask your question in SQL forum.
http://social.msdn.microsoft.com/Forums/en/category/sqlserver/
Best Regards,
Larcolais
MSDN Subscriber Support in Forum
If you have any feedback of our support, please contact [email protected]
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.

Similar Messages

  • Cannot Connect to Remote Named Instance of SQL Server

    We have 3x instances of SQL Server 2012 installed on a single remote server - there's the default MSSQLSERVER instance, then \INSTANCE01 and \INSTANCE02. I can remotely connect to the default MSSQLSERVER instance through SSMS, but I cannot connect to
    either of the additional named instances (\INSTANCE01 or \INSTANCE02). 
    For example, if I try to connect to "sql.domain.com", I can successfully access the default instance on the remote server. If I try to connect to "sql.domain.com\INSTANCE01", I get an error stating
    "A network-related or instance-specific error occurred while establishing a connection to SQL Server".
    HOWEVER - if I try to connect to "sql.domain.com\INSTANCE01, 49301" (where 49301 is the TCP Port for the TCP/IP Protocol for this SQL Server instance), I am able to successfully connect.
    This leads me to think that there's a communication issue with the SQL Server Browser service running on the remote SQL Server and my workstation. 
    The following items have been verified:
    SQL Server Browser is running on the remote SQL Server
    Windows Firewall has been disabled on the SQL Server
    TCP Ports 1433, 1434, 1954, and 49301 have been opened up on the remote destination's firewall
    UDP Port 1434 has been opened up on the remote destination's firewall
    Thoughts? Did I miss something?

    Hi brgnewman,
    Use computername\instancename to connect to the database engine. Please try again. I think the configuration is OK.
    Refer to Connecting from Another Computer:
    http://msdn.microsoft.com/en-us/library/ms345343.aspx.
    Thanks.
    Maggie Luo
    TechNet Community Support

  • Upgrading DPM 2012 SP1 to DPM 2012 R2 fails (DPM Setup is unable to connect to the specific instance of SQL Server Reporting Service (ID: 33431)

    The Background:
    1.  DPM 2012 SP1 was originally installed on a server with local SQL 2008 R2 instance (SQL was installed as part of DPM)
    2.  SQL database was upgraded to SQL 2012 SP1
    Now I want to upgrade DPM 2012 SP1 CU3 to R2.  It is throwing the following error.  Any help would be appreciated. 

    This absolutely fixed my issue.  I had upgraded my version of SQL and was then trying to upgrade DPM 2012 to 2012R2 and I could not figure out where the installation was querying old version of the reporting services.
    DPM Log Before:
    [6/4/2014 2:53:32 PM] Information : Query WMI provider for path of configuration file for SQL Server 2008 Reporting Services.
    [6/4/2014 2:53:32 PM] Information : Querying WMI Namespace: \\DPMServer\root\Microsoft\SqlServer\ReportServer\RS_MSDPM2012\v10\admin for query: SELECT * FROM MSReportServer_ConfigurationSetting WHERE InstanceName='MSDPM2012'
    [6/4/2014 2:53:32 PM] * Exception :  => System.Management.ManagementException: Provider load failure
    DPM Log After:
    [6/4/2014 3:25:36 PM] Information : SQL Server 2008 R2 SP2 instance MSDPM2012 is not present on this system.
    [6/4/2014 3:25:36 PM] Information : Query WMI provider for SQL Server 2008.
    [6/4/2014 3:25:36 PM] Information : Querying WMI Namespace: \\DPMServer\root\Microsoft\SqlServer\ComputerManagement11 for query: Select * from SqlServiceAdvancedProperty where ServiceName='MSSQL$MSDPM2012' and PropertyName='Version'
    [6/4/2014 3:25:36 PM] Information : SQL Server 2008 R2 SP2 instance MSDPM2012 is present on this system.
    [6/4/2014 3:25:36 PM] Information : Inspect context initialized with
    SQL Server namespace: \\{0}\root\Microsoft\SqlServer\ComputerManagement11
    Reporting namespace: \\{0}\root\Microsoft\SqlServer\ReportServer\RS_{1}\v11\admin
    SqlServerDetected: True
    [6/4/2014 3:25:36 PM] Information : Check if SQL Server 2012 Service Pack 1 Tools is installed.
    [6/4/2014 3:25:36 PM] Information : Inspect.CheckSqlServerTools : MsiQueryProductState returned : INSTALLSTATE_DEFAULT
    [6/4/2014 3:25:36 PM] Information : **********************************************************************************
    Thanks for This FIX!

  • Issue with migration DB from SQL Server 2005 to Oracle 11.2 using SQL Developer Migration workbench

    Hi,
    We face an issue while migrating an SQL Server 2005 DB to Oracle 11.2.  It fails during the process.  I hope someone on the forum has seen this before and can give us some advice.
    I use the latest version of SQL Developer with JRE included (3.2.20.09).  The JDBC driver to connect to SQL Server 2005 is 1.2.0
    Here are the steps we take in the Migration Workbench wizard:
    I made an online extract of the SQL Server database.
    Using the workbench in SQL Developer I created a migration repository in schema PDM_MIGRATION.
    Next I start the migration, it captures the tables fine, but immediately after the start of the conversion I get a failed message without further explanations.
    This is the content of the error xml:
    <?xml version="1.0" encoding="windows-1252" standalone="no"?>
    <log>
    <record>
      <date>2013-08-14T16:23:32</date>
      <logger>oracle.dbtools.migration.workbench.core.MigrationLogResourceBundle</logger>
      <level>SEVERE</level>
      <class>oracle.dbtools.migration.workbench.core.logging.MigrationLogUtil</class>
      <message>Ongeldig naampatroon.: PDM_MIGRATION .MIGR_FILTER</message>
      <param>oracle.dbtools.migration.workbench.core.logging.LogInfo@4c12ab</param>
      <exception>
        <message>oracle.dbtools.migration.convert.ConvertException: Ongeldig naampatroon.: PDM_MIGRATION .MIGR_FILTER</message>
        <frame>
          <class>oracle.dbtools.migration.convert.ConverterWorker</class>
          <line>1078</line>
        </frame>
        <frame>
          <class>oracle.dbtools.migration.convert.ConverterWorker</class>
          <line>316</line>
        </frame>
        <frame>
          <class>oracle.dbtools.migration.workbench.core.ui.FullMigrateTask</class>
          <line>1002</line>
        </frame>
        <frame>
          <class>oracle.dbtools.migration.workbench.core.ui.FullMigrateTask</class>
          <line>303</line>
        </frame>
        <frame>
          <class>oracle.dbtools.migration.workbench.core.ui.FullMigrateTask</class>
          <line>205</line>
        </frame>
        <frame>
          <class>oracle.dbtools.migration.workbench.core.ui.FullMigrateTask</class>
          <line>159</line>
        </frame>
        <frame>
          <class>oracle.dbtools.raptor.backgroundTask.RaptorTask</class>
          <line>193</line>
        </frame>
        <frame>
          <class>java.util.concurrent.FutureTask$Sync</class>
          <line>303</line>
        </frame>
        <frame>
          <class>java.util.concurrent.FutureTask</class>
          <line>138</line>
        </frame>
        <frame>
          <class>oracle.dbtools.raptor.backgroundTask.RaptorTaskManager$RaptorFutureTask</class>
          <line>515</line>
        </frame>
        <frame>
          <class>java.util.concurrent.Executors$RunnableAdapter</class>
          <line>441</line>
        </frame>
        <frame>
          <class>java.util.concurrent.FutureTask$Sync</class>
          <line>303</line>
        </frame>
        <frame>
          <class>java.util.concurrent.FutureTask</class>
          <line>138</line>
        </frame>
        <frame>
          <class>java.util.concurrent.ThreadPoolExecutor$Worker</class>
          <line>886</line>
        </frame>
        <frame>
          <class>java.util.concurrent.ThreadPoolExecutor$Worker</class>
          <line>908</line>
        </frame>
        <frame>
          <class>java.lang.Thread</class>
          <line>662</line>
        </frame>
      </exception>
    </record>
    <record>
      <date>2013-08-14T16:23:32</date>
      <logger>oracle.dbtools.migration.workbench.core.MigrationLogResourceBundle</logger>
      <level>SEVERE</level>
      <class>oracle.dbtools.migration.workbench.core.logging.MigrationLogUtil</class>
      <message>Ongeldig naampatroon.: PDM_MIGRATION .MIGR_FILTER</message>
      <param>oracle.dbtools.migration.convert.ConverterWorker.copyModel(ConverterWorker.java:1078)</param>
      <param>oracle.dbtools.migration.convert.ConverterWorker.runConvert(ConverterWorker.java:316)</param>
      <param>oracle.dbtools.migration.workbench.core.ui.FullMigrateTask.doConvert(FullMigrateTask.java:1002)</param>
      <param>oracle.dbtools.migration.workbench.core.ui.FullMigrateTask.doMaskBasedActions(FullMigrateTask.java:303)</param>
      <param>oracle.dbtools.migration.workbench.core.ui.FullMigrateTask.doWork(FullMigrateTask.java:205)</param>
      <param>oracle.dbtools.migration.workbench.core.ui.FullMigrateTask.doWork(FullMigrateTask.java:159)</param>
      <param>oracle.dbtools.raptor.backgroundTask.RaptorTask.call(RaptorTask.java:193)</param>
      <param>java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)</param>
      <param>java.util.concurrent.FutureTask.run(FutureTask.java:138)</param>
      <param>oracle.dbtools.raptor.backgroundTask.RaptorTaskManager$RaptorFutureTask.run(RaptorTaskManager.java:515)</param>
      <param>java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)</param>
      <param>java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)</param>
      <param>java.util.concurrent.FutureTask.run(FutureTask.java:138)</param>
      <param>java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)</param>
      <param>java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)</param>
      <param>java.lang.Thread.run(Thread.java:662)</param>
      <param>oracle.dbtools.migration.workbench.core.logging.LogInfo@5dc1bc</param>
      <exception>
        <message>oracle.dbtools.migration.convert.ConvertException: Ongeldig naampatroon.: PDM_MIGRATION .MIGR_FILTER</message>
        <frame>
          <class>oracle.dbtools.migration.convert.ConverterWorker</class>
          <line>1078</line>
        </frame>
        <frame>
          <class>oracle.dbtools.migration.convert.ConverterWorker</class>
          <line>316</line>
        </frame>
        <frame>
          <class>oracle.dbtools.migration.workbench.core.ui.FullMigrateTask</class>
          <line>1002</line>
        </frame>
        <frame>
          <class>oracle.dbtools.migration.workbench.core.ui.FullMigrateTask</class>
          <line>303</line>
        </frame>
        <frame>
          <class>oracle.dbtools.migration.workbench.core.ui.FullMigrateTask</class>
          <line>205</line>
        </frame>
        <frame>
          <class>oracle.dbtools.migration.workbench.core.ui.FullMigrateTask</class>
          <line>159</line>
        </frame>
        <frame>
          <class>oracle.dbtools.raptor.backgroundTask.RaptorTask</class>
          <line>193</line>
        </frame>
        <frame>
          <class>java.util.concurrent.FutureTask$Sync</class>
          <line>303</line>
        </frame>
        <frame>
          <class>java.util.concurrent.FutureTask</class>
          <line>138</line>
        </frame>
        <frame>
          <class>oracle.dbtools.raptor.backgroundTask.RaptorTaskManager$RaptorFutureTask</class>
          <line>515</line>
        </frame>
        <frame>
          <class>java.util.concurrent.Executors$RunnableAdapter</class>
          <line>441</line>
        </frame>
        <frame>
          <class>java.util.concurrent.FutureTask$Sync</class>
          <line>303</line>
        </frame>
        <frame>
          <class>java.util.concurrent.FutureTask</class>
          <line>138</line>
        </frame>
        <frame>
          <class>java.util.concurrent.ThreadPoolExecutor$Worker</class>
          <line>886</line>
        </frame>
        <frame>
          <class>java.util.concurrent.ThreadPoolExecutor$Worker</class>
          <line>908</line>
        </frame>
        <frame>
          <class>java.lang.Thread</class>
          <line>662</line>
        </frame>
      </exception>
    </record>
    <record>
      <date>2013-08-14T16:23:32</date>
      <logger>oracle.dbtools.migration.workbench.core.MigrationLogResourceBundle</logger>
      <level>WARNING</level>
      <class>oracle.dbtools.migration.workbench.core.ui.FullMigrateTask</class>
      <message>Building converted model: FAILED : Database Migration : FAILED</message>
      <param>oracle.dbtools.migration.workbench.core.logging.LogInfo@15a3779</param>
    </record>
    Does anybody know what this error means and what steps we should take to continue the migration?
    I see the PDM_MIGRATION.MIGR_FILTER is a type.
    Many thanks in advance,
    Kris

    Hi Wolfgang,
    Thanks for your reply.
    This is how the type MIGR_FILTER looks like:
    create or replace
    TYPE MIGR_FILTER IS OBJECT (
      FILTER_TYPE INTEGER, -- Filter Types are 0-> ALL, 1->NAMELIST, 2->WHERE CLAUSE, 3->OBJECTID LIST
      OBJTYPE VARCHAR2(40),
      OBJECTIDS OBJECTIDLIST,
      NAMES NAMELIST,
      WHERECLAUSE VARCHAR2(1000));
    I think the repository user has the correct privileges.  This is the overview of privileges it has:
    SQL> select * from dba_sys_privs where GRANTEE in ('PDM_MIGRATION') order by GRANTEE;
    GRANTEE PRIVILEGE ADM
    PDM_MIGRATION ALTER SESSION NO
    PDM_MIGRATION CREATE CLUSTER NO
    PDM_MIGRATION CREATE DATABASE LINK NO
    PDM_MIGRATION CREATE PROCEDURE NO
    PDM_MIGRATION CREATE SEQUENCE NO
    PDM_MIGRATION CREATE SESSION NO
    PDM_MIGRATION CREATE SYNONYM NO
    PDM_MIGRATION CREATE TABLE NO
    PDM_MIGRATION CREATE TRIGGER NO
    PDM_MIGRATION CREATE VIEW NO
    PDM_MIGRATION UNLIMITED TABLESPACE NO
    SQL> select * from dba_role_privs where GRANTEE in ('PDM_MIGRATION') order by GRANTEE;
    GRANTEE GRANTED_ROLE ADM DEF
    PDM_MIGRATION CONNECT NO  YES
    PDM_MIGRATION RESOURCE NO  YES
    Best regards,
    Kris

  • Problem with a JDBC Adapter when connect to Instance on SQL Server

    Hi,
    Currently I'm setting up a communication channel with the JDBC adapter to work on a SQL Server database. When I use a string without specifying the connection instance, the JDBC driver takes the default instance and connects to a database without problems.
    jdbc: sqlserver: / / Server01; databaseName = IntegraSAP1
    The problem is when I need to connect to another instance of it server.
    jdbc: sqlserver: / / Server01; instanceName = SAP; databaseName = IntegraSAP2
    The JDBC driver, in short, send me the following error:
    Cause Exception: 'Error when attempting
    to get processing resources: com.sap.aii.af.lib.util.concurrent.ResourcePoolException:
    Unable to create new pooled resource: DriverManagerException:
    Can not establish connection:: com.microsoft.sqlserver.jdbc.SQLServerException:
    The connection to the named instance  has failed. Error:
    java.net.UnknownHostException: .
    I appreciate your help,
    Regards,
    Johnny

    Not sure, might be port number is not required in case using instance. Give one more try with :
    jdbc:sqlserver:/ /Server01\SAP; databaseName = IntegraSAP2
    A comment from http://msdn.microsoft.com/en-us/library/ms378428.aspx
    "SQL Server 2000 and SQL Server 2005 allow for the installation of multiple database instances per server. Each instance is identified by a specific name. To connect to a named instance of SQL Server, you can either specify the port number of the named instance (preferred), or you can specify the instance name as a JDBC URL property or a datasource property."
    Regards,
    Sunil Chandra

  • Error"Failed to open the connection"  - Named Instance of SQL Server 2005

    "Failed to open the connection" error, when connecting to the Named Instance of SQL Server 2005
    The report is throwing error, when changing the logon information dynamically through C#.
    Code
         string reportPath = @"D:\NET\TestReport\TestReport.rpt";
         ReportDocument reportDocument = new ReportDocument();
         reportDocument.Load(reportPath);
         foreach(CrystalDecisions.CrystalReports.Engine.Table table in tables)
              TableLogOnInfo tableLogonInfo = table.LogOnInfo;                         
              tableLogonInfo.ConnectionInfo.ServerName = @"TestServer\Instance1";  //Connnecting to Named instance of SQL Server 2005
              tableLogonInfo.ConnectionInfo.UserID = "sa";
              tableLogonInfo.ConnectionInfo.Password = "password";
              tableLogonInfo.ConnectionInfo.DatabaseName = "TEST_DB";
              table.ApplyLogOnInfo(tableLogonInfo);     
         crystalReportViewer1.ReportSource = reportDocument;
    Error Message
         Failed to open the connection.
         Failed to open the connection.
         C:\DOCUME1\PUGALE1\LOCALS~1\Temp\{DF9593A5-5C80-4CBC-ABC3-EC4EF204A7EB}.rpt
    The error is occuring only whenever i am connecting to the Named Instance of SQL Server 2005.
    Thanks in Advance
    Edited by: pugalendran p on Feb 2, 2009 10:32 AM
    Edited by: pugalendran p on Feb 2, 2009 10:43 AM

    Hi,
    Following solution might help you to resolve the issue.
    Solution1:
    Issue happens because universe connection to the Database is not responding and the Data Source Name is not configured to write SQL Server 2005 database.
    Resolution
    Created new DSN connection under SYSTEM DSN to SQL Server 2005 Database.
    Import the universe from the designer.
    Go to File->Parameters.
    Edit Connection.
    On the Database Middleware Page expand SQl Server 2005->Select SQL Server 2005 driver.
    Change the DSN to new DSN connection
    Test the connection.
    Save the Universe and Export it to the repository.
    Solution2:
    I am taking Oracle as an example over here.
    This can be caused when the SQLNET.ora is located in a remote location using mapped drives.
    Resolution
    To resolve,
    check the registry [HKLM\SOFTWARE\ORACLE] you should see a folder called HOME0
    look for any paths that contain a mapped drive partition
    Change the mapped drive letter to a UNC path (
    server\folder)
    Open a command prompt and do a tnsping using the tnsname and verify the location of the SQLNET.ora or TNSNAMES.ora
    If the path is not updated to the new path
    Reboot the server
    Regards,
    Sarbhjeet Kaur

  • Problem with provisioning and external SQL server connection

    I am configuring IPAM 2012 R2 on a our management server.  Completed the first step by enabling the feature.  No issues.
    Now I am on the Provisioning IPAM step.  I get to the Configure Database step...
    I choose Microsoft SQL server,
    What should those values be in the Server name and Database name fields.  Instructions show fqdn or ip address but that doesnt seem to be working for me.
    I get the following error at the end of the Provisioning IPAM wizard,
    IPAM Deployment failed with the following error.
    Failed to connect to database server. Check the database name, connectivity and remote access.
    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: TCP Provider, error: 0 - No connection could be made because the target machine actively refused it.)
    You can restart this provisioning wizard from the IPAM overview page.
    From the management server I have tested the SQL Connection with a udl file.  I used myServer\myInstance and it works.  It reports that I have made the Connection to the server and database with the sql credentials i have provided.
    Thanks

    Ran
    into a problem with connecting to the DB on the SQL server from the IPAM server.  The Dba and I checked the target SQL instance was enabled TCP and listening on a valid TCP port.  SQL server was set to use port 1443 for incoming connections. 
    IPAM was set by default to use 1433. 
    Also used
    netstat-n to identify issue and verified 1443 on SQL server was
    being used.  Made the correction under the IPAM provisioning wizard and connected to the database.  Fixed. 
    Important note I was able to connect to the database with a .udlfile
    without any issues
    Also note that 2012 R2 IPAM only supports 2012 SQL Enterprise.  Why?

  • Error 18452 "Login failed. The login is from an untrusted domain and cannot be used with Windows authentication" on SQL Server 2008 R2 Enterprise Edition 64-bit SP2 clustered instance

    Hi there,
    I have a Windows 2008 R2 Enterprise x64 SP2 cluster which has 2 SQL Server 2008 R2 Enterprise Edition x64 SP2
    instances.
    A domain account "Domain\Login" is administrator on both physcial nodes and "sysadmin" on both SQL Server instances.
    Currently both instances are running on same node.
    While logging on to SQL Server instance 2 thru "Domain\Login" using "IP2,port2", I get error 18452 "Login failed. The login is from an untrusted domain and cannot be used with Windows authentication". This happened in the past
    as well but issue resolved post insatllation of SQL Server 2008R2 SP2. This has re-occurred now. But it connects using 'SQLVirtual2\Instance2' without issue.
    Same login with same rights is able to access Instance 1 on both 'SQLVirtual1\Instance1' and "IP1,port1" without any issue.
    Please help resolve the issue.
    Thanks,
    AY

    Hello,
    I Confirm that I encountred the same problem when the first domain controller was dow !!
    During a restarting of the first domain controller, i tried to failover my SQL Server instance to a second node, after that I will be able to authenticate SQL Server Login but Windows Login returns Error 18452 !
    When the firts DC restart finishied restarting every thing was Ok !
    The Question here : Why the cluster instance does'nt used the second DC ???
    Best Regards     
    J.K

  • SQL Developer connection issue with JDBC

    Hi skutz & friends,
    I have problem with Oracle SQL Developer I can not connect to any oracle db
    because Status : Failure -Error loading native JDBC driver library.
    However, I download SQL developer [ Oracle SQL Developer for Windows (JDK1.5.0_06 is bundled in this zip) ]
    After it is not working. Also I download JDK 5.0 Update 14
    The Java SE Development Kit (JDK) to install it on my PC again.
    But it does not work. My install path information:
    install path as C:\Program Files\SQLDEVELOPER_INSTAL\sqldeveloper
    local oracle as !0g 10201
    SQL version as sqldeveloper-1.2.1.3213 which download last versionfrom OTN on 2/18/2008.
    for connection, taken basic.
    port as default 1521
    hostname and saver name are same.
    I created a environment variable in window xp.
    SQLDEVELOPER_USER_DIR AS C:\Program Files\SQLDEVELOPER_INSTAL\sqldeveloper
    can anybody help me with this connection?
    thanks
    Jimmy

    Duplicate thread: Please enter all responses on other thread: SQL seveloper connection issue with JDBC

  • To list only user databases with the size for a instance in sql server 2005

    Hi,
    I looking for T-SQl to  list only user databases with their size for a instance in sql server 2005

    Try this:
    use [databasename]
    go
    if convert(varchar(20),SERVERPROPERTY('productversion')) like '8%'
    SELECT [name], fileid, filename, [size]/128.0 AS 'Total Size in MB',
    [size]/128.0 - CAST(FILEPROPERTY(name, 'SpaceUsed') AS int)/128.0 AS 'Available Space In MB',
    CAST(FILEPROPERTY(name, 'SpaceUsed') AS int)/128.0 AS 'Used Space In MB',
    (100-((([size]/128.0 - CAST(FILEPROPERTY(name, 'SpaceUsed') AS int)/128.0)/([size]/128.0))*100)) AS 'percentage Used'
    ,((CAST(FILEPROPERTY(name, 'SpaceUsed') AS int)/128.0)/([size]/128.0))*100 as 'percentage used'
    FROM sysfiles
    else
    SELECT [name], file_id, physical_name, [size]/128.0 AS 'Total Size in MB',
    [size]/128.0 - CAST(FILEPROPERTY(name, 'SpaceUsed') AS int)/128.0 AS 'Available Space In MB',
    CAST(FILEPROPERTY(name, 'SpaceUsed') AS int)/128.0 AS 'Used Space In MB',
    (100-((([size]/128.0 - CAST(FILEPROPERTY(name, 'SpaceUsed') AS int)/128.0)/([size]/128.0))*100)) AS 'percentage Used'
    --,((CAST(FILEPROPERTY(name, 'SpaceUsed') AS int)/128.0)/([size]/128.0))*100 as 'percentage used'
    FROM sys.database_files
    go
    Or can refer below link:
    http://gallery.technet.microsoft.com/scriptcenter/All-Databases-Data-log-a36da95d
    Please click the Mark as answer button and vote as helpful if this reply solves your problem

  • BPC 4.2 connectivity issues with server

    Hello All, I have a user that is experiencing connectivity issues with our server.  This appears to be at a client level and I would like to know how to correct it.  We are currently using BPC 4.2 (service pack 2).
    The problem occurred when they had IE8 uninstalled and installed IE6 today.  This morning he had no issues connecting to BPC w/ IE8, but lost that connection when IE6 was installed.  When working through the connection wizard, the following errors appear.
    Here are the pop-up error messages they are receiving:
    "The server name, or IP address (srvbpmarl01) is unreachable now.  Please check the following:
    1.  LAN connection or Internet connection is working properly.
    2.  Server name or IP address is invalid
    Detailed Error Message:  Internet connection is not available"
    "The system cannot download information from server:  SRVBPMARL01.
    There may be a network or security issue.
    Error message:  Your LAN connection or Internet connection is not working properly.
    Detailed error message:  Internet connection is not available."
    I can't help but feel this issue is a result of the IE 8/6 complications, but I do not know which actions to take next.
    Thanks for any help you could provide!

    I don't think the problem is related to IE.
    It seems to be more a problem of configuration of IE.
    I suggest to chec the follow:
    1. Please make sure you are not using any proxy into connection of IE. Ot if you neede then make sure you will add your server into exceptions of proxy.
    2. Try to connect with IE to server. use: http://nameofserver/osoft and also http://nameofserver.
    If you received errors in both cases then it seems it is a problem with installaion of IE.
    If you are able to connect and to display the default page for osoft then it must be a configuration problem.
    I suppose MSDTC or Pivot table services is not correct.Try to use slow connection when you connect to server not High connection.
    Regards
    Sorin Radulescu

  • Why SCCM 20012 Install fails with remote 64 bit SQL Server but proceeds for remote 32 bit SQL Server

    I have the following setup:
    AD User accounts
    - SQLAdmin (used to run SQL Services i.e. Database Engine)
    - SCCMADmin (used to install SCCM 2012)
    SPN registered for user account SQLAdmin
    setspn -S MSSQLSvc/SQL.Domain_Name:1432 Domain_Naem\SQLAdmin
    setspn -S MSSQLSvc/SQL:1432 Domain_Name\SQLAdmin
    setspn -S MSSQLSvc/SQL.Domain_Name:1433 Domain_Naem\SQLAdmin
    setspn -S MSSQLSvc/SQL:1433 Domain_Name\SQLAdmin
    and checked with setspn -L TESTING\SQLAdmin
    1 SERVER called SQL
    32bit Server with SQL Server 2008 + SP3 + Cumulative Update 6
    2 SQL instances - Default (MSSQLSERVER) and
    SCCM2012
    MSSQLSERVER instance uses TCP port 1433
    SCCM2012 Instance users TCP port 1432 (no dynamic ports)
    User accounts that have been given public and sysadmin SQL server roles
    on both instances are: SQLAdmin, SCCMAdmin, Domain Administrator, Local Administrator and computer account SCCM
    Client Protocols TCP enabled (and Named Pipes) (checked via SQL Server Configuration Manager)
    Local Administrators Group on this server has members - SQLAdmin, SCCMAdmin, Domain Administrator, Local Administrator and computer account SCCM
    Firewall turned on with access allowed on Ports 1432, 1433, 4022,445, and WMI - WMI-in, DCOM-in and ASync-iN builtin rules allowed\enabled.
    1 SERVER called SQL3
    64bit Server with SQL Server 2008 + SP3 + Cumulative Update 6
    2 SQL instances - Default (MSSQLSERVER) and
    SCCM2012
    MSSQLSERVER instance uses TCP port 1433
    SCCM2012 Instance users TCP port 1432 (no dymanic ports)
    User accounts that have been given public and sysafmin SQL server roles on both instances are:
    SQLAdmin, SCCMAdmin, Domain Administrator, Local Administrator and computer account SCCM
    Client Protocols TCP enabled (and Named Pipes) (checked via SQL Server Configuration Manager)
    Local Administrators Group on this server has members - SQLAdmin, SCCMAdmin, Domain Administrator, Local Administrator and computer account SCCM
    Firewall turned off
    1 SERVER called SCCM
    64bit Server that is to be the Primary Site Server\MP for SCCM 2012
    ODBC link to SQL\SCCM2012,1432
    ODBC link to SQL3\SCCM2012,1432
    ODBC uses SQL Native Client 10.0 (64 bit)
    Both ODBC connections when TESTed pass and suggest connectivity to SQL Servers
    Install process doe SCCM2012
    Tried to install SCCM 2012 RC2 when logged in to SCCM Server as AD user account
    SCCMAdmin,  and when utilising the SCCM2012 SQL instance on
    32 bit server of SQL install proceeds barring warning about 8GB rec, for SQL Server. Then fails on PKI certificate issue. Installation (chose HTTP for MP). I beleive the PKI failure as install starts is
    due to the fact that SCCM 2012 needs its database server to b 64 bit ?
    Thus i then tried to install SCCM 2012 RC2 when logged in to SCCM Server as AD user account SCCMAdmin,  and
    when using the SCCM2012 SQL instance on
    64 bit server of SQL install proceeds but fails at checking stage and says:
    SQL Server sysadmin rights FAILED SQL3.Domain_Name
    Either the user account running Configuration Manager Setup does not have sysadmin SQL Server role permissions on the SQL Server instance selected for site database installation, or the SQL Server instance could not be contacted to verify permissions. Setup
    cannot continue.
    and
    Site System to SQL Server communication  WARNING SCCM.Domain_Name
    A communication error has been detected between the specified site system and the site database computer. This error can occur when the site database server is offline or if a valid SPN has not been registered in Active Directory Domain Services for the SQL
    Server instance hosting the site database. Setup cannot continue.
    Why does the install of SCCM 2012 with 32 bit SQL proceed further than the install with 64 bit SQL, with the latter process failing as above error meesages show and yet both servers are set identically (apart from temporary turning off Firewall on the 64 
    bit server) and during the install the Databse Server specified is accepted ?

    Thanks for the reply.
    I can connect via ODBC to the the 32 bit SQL Server and the 64 bit SQL Server from the SCCM Server
    The SQL Server Unit called SQL3 unit is a 64 bit SQL.
    The SQL Server Unit called SQL is only 32 bit, but at least gets past the final checking stage and the error messages about sysadmin rights and Site System to SQL Server communication problem, and then fails with PKI certificate error message. 
    When trying to install SCCM specifying the 64 bit SQL Server as the Database Server it gives the 2 error messages at the final checking stage of the installation as listed.
    So as I said what is confusing is the fact that if the SCCM install uses the remote 32 bit SQL Server it passes the final checking (although fails with PKI certificate message) but the 64 bit SQL Server set up exactly the same apart from the Firewall being
    left off for the time being, fails at the final check stage with the 2 listed errors.
    If I use a local 64 bit SQL Server the installation is fine.
    Still would like to find out what cause the 2 issues for the remote 64 bit SQL Server, when ODBC seems fine, sysadmin rights have been given for the installer account and the SCCM computer account and SPNs have been set for the user account running the SQL
    Services.

  • Is it possible to have two or more virtual machines point to a shared instance of SQL Server 2008 R2 for systems administration?

    Hello All,
    I am the Systems Admin for a production box running SQL Server 2008 R2.  I have been ask to do the following and and trying to figure out if it's even possible.
    1. The Production Server is named ProductionA
    2. Create 3 Administrator accounts on ProductionA each with access to the SQL Server instance on ProductionA.  Use Standard SQL Server login for credentials. i.e. Username/Password and assign the role sysadmin.
    3. Install 3 Virtual Machines on ProductionA each with Windows 2008 R2 64 bit operating system.
    4. For each Virtual Machine, Install SQL Management Studio and write down the IP Address assigned to each VM.
    5. Using Remote Desktop Connection, connect to each virtual machine to be able to manage the SQL Server.
    Is this possible?  And, why am i doing it?  Because I DO NOT want the three people who will be having access to the production SQL Server to also have access to the primary host ProductionA.  Since I have to allow them to RDC into the box
    to manage the SQL Server, I figure why not create a separate VM for each one of them and they can RDC into those instead.
    Does this make any sense?
    Any tips are greatly appreciated.  The main reason for doing this is because the three people who will be accessing the box, I need to isolate each one of them and at the same time keep them off of the primary ProductionA.
    Thanks for your help.
    M

      Because I DO NOT want the three people who will be having access to the production SQL Server to also have access to the primary host ProductionA.  Since I have to allow them to RDC into the box to manage the SQL Server, I figure why not create
    a separate VM for each one of them and they can RDC into those instead.
    Does this make any sense?
    Any tips are greatly appreciated.  The main reason for doing this is because the three people who will be accessing the box, I need to isolate each one of them and at the same time keep them off of the primary ProductionA.
    Thanks for your help.
    M
    Hello M,
    Since you dont want the 3 guys to have access to Production machine A.You can install SQL Server client .By client i mean SQL server management studio(SSMS) on there local desktop and then create login for them in SQL Server.Open port on which your SQL server
    is running for three of the machines so that they can connct.Now with SSMS installed on each machine each can connect to SQL server from there own machine.
    I would also like you to be cautious with giving Sysadmin privilege to all three of them ,first please note down what task they would do and then decide what rights to be provided.
    Your option will also work but you need to create 3 VM for that .Which is more tedious task.
    Hope this helps
    Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers

  • Cannot uninstall instance of SQL Server 2014

    Hello,
    I have two instances of SQL Server 2014 installed and i want to uninstall them (and install SQL Server 2012 evaluation). I managed to uninstall the one instance. When i try to uninstall the second a message informs me that the operating system does not meet
    the minimum requirements. I had the same proble when uninstalling SQL Server 2012 and i went to the setup file and changed the compatibility mode to Windows Vista. Is there something similar that i should do in the case of SQL Server 2014 or i should do something
    totally different?
    Thanks in advance,
    Andreas

    Hi,
    Personally I have not faced this situation but this seems bug below Connect Item MS closed as not reproducable
    https://connect.microsoft.com/SQLServer/feedback/details/707706/unable-to-uninstall-sql-server-2012-rc0-from-control-panel
    Below connect Item deals with same issue as your
    https://connect.microsoft.com/SQLServer/feedback/details/974626/cannot-uninstall-sql-express-2014-on-windows-7-sp1
    Workaround should be instaed of uninstalling using GUI please use command prompt
    Launch setup.exe from an elevated command shell. Change to the directory "c:\Program Files\Microsoft SQL Server\120\Setup Bootstrap\SQLServer2014", then type:
    Setup.exe /action=uninstall
    Please change uninstall script as per need
    Normal uninstall Script would look like
    Setup.exe /Action=Uninstall /FEATURES=SQL,AS,RS,IS,Tools /INSTANCENAME=InstanceName
    Please refer to
    this link for uninstall parameters
    Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it
    My Technet Wiki Article
    MVP

  • Cannot connect to Oracle 11gR2 database from SQL Server 2005

    Both SQL Server (Windows) and Oracle (Linux) are in 64bit environments.
    I have done the following on a Windows 2008 R2 with SQL Server 2005:
    Install InstantClient from Oracle Database 11g Release 2 Client (11.2.0.1.0) for Microsoft Windows (x64) to C:\Oracle
    Install oledb from 64-bit ODAC 11.2 Release 3 (11.2.0.2.1) for Windows x64 by executing install.bat oledb c:\oracle odac
    Note: Not sure whether 11.2.0.2.1 version of ODAC will cause any problem since I cannot find 11.2.0.1.0 version.
    I have checked the Allow inprocess of OraOLEDB.Oracle provider in SSMS.
    I have executed sp_addlinkedserver @server = 'ORACLE_TEST', @srvproduct = 'Oracle', @provider = 'OraOLEDB.Oracle', @datasrc = '##.##.##.##:1521/TEST'
    The ##.##.##.## is the ip address of the Linux server which has the Oracle 11gR2 database TEST.
    I have executed sp_addlinkedsrvlogin @rmtsrvname = 'ORACLE_TEST', @useself = 'FALSE', @rmtuser = 'xxxx', @rmtpassword = 'yyyy'
    The xxxx is the oracle username and yyyy is the password for the oracle user xxxx.
    I know the oracle database TEST is up since I have setup connection in Oracle SQL Developer having:
    ##.##.##.## as the hostname
    1521 as the Port
    xxxx as the username
    yyyy as the password
    TEST as the service name
    When I click Test Connection for the linked server ORACLE_TEST in SSMS, it just hang.
    When I issue a query like select count(*) from oracle_test..xxxx.table1, it just run forever. I'm not so sure how to query an oracle table. I have also tried select count(*) from oracle_test.xxxx.xxxx.table1.
    When I retype the password in the Linked Server Properties, it just run forever.
    Do I need to create a tnsnames.ora on the Windows machine?
    Do I need to change the tnsnames.ora on Linux machine?
    I'm very new to Oracle.

    This forum is dealing with connections from an Oracle database to SQL Server - so the Oracle database is the driving site and this is the way round from your linked server set up.
    As you're suing the instant client you might post your issue in the instant client forum:
    Instant Client

Maybe you are looking for

  • ICC profile for Aperture books?

    All- I've looked around Apple's web site and have not been able to find an ICC profile for soft-proofing a book. Does anyone know of a source for such a thing? Thanks, Andreas

  • Function module for filename

    hi friends,               can any1 pls tell the name of the FM which asks where to download the file.               i am converting smartform to pdf and using FM convert_otf_2_pdf to convert.i want a pop-up window which will ask me where to store the

  • OBIEE Data level security - OR condition among multiple filters

    Hi All, we have an requirement in OBIEE 11.1.1.5 to apply data level security based on mutiple dimension ( for example: Product, Geography and Customer). we have implemented by creating 3 groups one for each dimension, added appropriate filters for e

  • Error when create user via OIM web

    Hi Gurus.. I hava some problem when I creating new user via web OIM, error appear while inpute the start date value. Need help for you guys, This is the error code. <Error> <oracle.adfinternal.view.faces.config.rich.RegistrationConfigurator> <BEA-000

  • Converting psd photos to jpeg

    I have edited certain photos in Photoshop Elements 11 (using the Expert guide for advanced editing techniques)and for some reason, these photos were converted to a psd format. Now I cannot seem to be able to upload these psd photos to an outside Phot