Quantcast
Channel: SQL Server Express forum
Viewing all 3319 articles
Browse latest View live

output UTF-8 file

$
0
0

Dear Sir,

I am using SQL Server Express 2012 and its Import/Export Wizard to output data to text file.

I have a table with collation Chinese_Hong_Kong_Stroke_90_CI_AS.

How to specify the output text file in UTF-8 code page ?

Thanks,

Joe


How to delete an update field automatically

$
0
0

Dear all,

I have a a local SQL server 2012 express version where I have a dedicated table which stored local ORDERS.

In this table named "SALESORDER" I have a Boolean field called Transfert. When an order is place, that field is set to FALSE.

Then I have an running NT service which pool every 15 s that SALESORDER table for new records where Transfert=FALSE.

Then for each records found, they are send to the cloud. Once a records get successfully send to the cloud, I need to set the Transfert field to TRUE.

Then what I need to do is having a trigger that when a record gets its Transfer field = True, I need to delete that record from local table because it has been successfully proceed.

How to do that efficiently ?

INFO : Just a remark that I am storing orders locally in order to delegate the sending cloud task to a different process for performance reason

could not write value to key \software

$
0
0

could not write value to key \software error

TITLE: Microsoft SQL Server 2008 R2 Setup
------------------------------

The following error has occurred:

Could not write value  to key \SOFTWARE.   Verify that you have sufficient access to that key, or contact your support personnel.

For help, click: http://go.microsoft.com/fwlink?LinkID=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=10.50.1600.1&EvtType=0xDF039760%25401201%25401

------------------------------
BUTTONS:

OK
------------------------------

Analysis Services - SQL SErver 2008 Express

$
0
0
Hi,
I have used MIcrosoft Sql Server 2000 for a while, namely analysis services. What I want to know is if Sql Server Express Edition 2008 has also tools to handle with datawarehouses, olap and data mining, that is, which are the limitations of SQLServer 2008 Express Edition, they are related with that tools?

if it provides that tools, do you know good documentation related with these issues?? And books??

Thanx for your help

MP

Installer Size

$
0
0
Hi! I would like to know if theres a way to downsize the installer so it get smaller. I noticed after first execution the installer auto descompact itself. Could I just copy the folder/files I need for a Non Full installation? I only install the database services and management..

Connect to SQL Server Express 2014 from c++ application using ODBC

$
0
0

I am using the following code and I can't connect to the database. The app and the server are on the same PC.  I am able to manage the server through SQL Server Management Studio.

#include "stdafx.h"
#include <iostream>
#include <windows.h>
#include <sqltypes.h>
#include <stdio.h>
#include <sql.h>
#include <sqlext.h>

int _tmain(int argc, _TCHAR* argv[])
{

SQLHENV henv;
SQLHDBC hdbc;
SQLHSTMT hstmt;
SQLRETURN retcode;

SQLWCHAR       SqlState[6], SQLStmt[100], Msg[SQL_MAX_MESSAGE_LENGTH];
SQLINTEGER    NativeError;
SQLSMALLINT   MsgLen;

SQLCHAR * OutConnStr = (SQLCHAR * )malloc(255);
SQLSMALLINT * OutConnStrLen = (SQLSMALLINT *)malloc(255);

   // Allocate environment handle
   retcode = SQLAllocHandle(SQL_HANDLE_ENV, SQL_NULL_HANDLE, &henv);

   // check is environment handle set
   if(retcode != SQL_SUCCESS)
	 {
	  std::cout << "Failed to allocate environment";
	 }

   // Set the ODBC version environment attribute
   if (retcode == SQL_SUCCESS || retcode == SQL_SUCCESS_WITH_INFO) {
      retcode = SQLSetEnvAttr(henv, SQL_ATTR_ODBC_VERSION, (void*)SQL_OV_ODBC3, 0);
	  std::cout << "ODBC Version Set" << std::endl;

      // Allocate connection handle
      if (retcode == SQL_SUCCESS || retcode == SQL_SUCCESS_WITH_INFO) {
         retcode = SQLAllocHandle(SQL_HANDLE_DBC, henv, &hdbc);
		 std::cout << "Environment Allocated" << std::endl;

         // Set login timeout to 30 seconds
         if (retcode == SQL_SUCCESS || retcode == SQL_SUCCESS_WITH_INFO) {
            SQLSetConnectAttr(hdbc, SQL_LOGIN_TIMEOUT, (SQLPOINTER)30, 0);
			std::cout << "Connection Handle Allocated" << std::endl;

            // Connect to data source
            //retcode = SQLConnect(hdbc, (SQLWCHAR*) "KnowledegBase", SQL_NTS, (SQLWCHAR*) NULL, 0, NULL, 0);
			retcode = SQLConnect(hdbc, (SQLWCHAR*) "KnowledgeBase", SQL_NTS, (SQLWCHAR*)"",SQL_NTS, (SQLWCHAR*)"", SQL_NTS);
			// Check for Failure
			if (retcode != SQL_SUCCESS && retcode != SQL_SUCCESS_WITH_INFO)
			   {
		       std::cout << "Failed to connect";
			   }
			if (retcode == SQL_SUCCESS_WITH_INFO)
				{
				std::cout << "SQL_SUCCESS_WITH_INFO Code " << SQL_SUCCESS_WITH_INFO << std::endl;
				}

// Allocate statement handle
            if (retcode == SQL_SUCCESS || retcode == SQL_SUCCESS_WITH_INFO) {
               retcode = SQLAllocHandle(SQL_HANDLE_STMT, hdbc, &hstmt);

               // Process data
               if (retcode == SQL_SUCCESS || retcode == SQL_SUCCESS_WITH_INFO) {
                  SQLFreeHandle(SQL_HANDLE_STMT, hstmt);
				  std::cout << "Connected to KnowledgeBase";
               }

               SQLDisconnect(hdbc);
            }

            SQLFreeHandle(SQL_HANDLE_DBC, hdbc);
         }
      }
      SQLFreeHandle(SQL_HANDLE_ENV, henv);
   }



 std::cin.get();

return 0;
}

Looping through a table

$
0
0

I have table1 with fields KEY1, KEY2, QNTY

rows :

1234, 1, 1000

1234,2,2000

1235,1,4000

1235,2,5000

1235,5,6000

KEY1+KEY2 will be unique in this table

I have table2 with fields KEY1, KEY2, SDATE, SQNTY

Rows:

1234,1,A,500

1234,1,B,500

1234,1,C,500

1234,2,A,1000

1234,2,Q,1000

1234,2,Z,1000

1235,1,A,2500

1235,1,B,2500

1235,1,G,2500

1235,2,S,5000

1235,5,D,4000

1235,5,D,4000

The totals of SQNTY for KEY1+KEY2 in Table2 are shown as more than the corresponding QNTY of KEY1+KEY2 in Table1

I want to skip through Table1, and pick out rows from Table2 matched over KEY1+KEY2 which is ordered by KEY1+KEY2+SDATE(desc) till the sum of SQNTY is greater or equal to QNTY in Table1. If the sum is greater, the SQNTY for the last row is reduced to match PQNTY.

These rows are inserted into a new table.

Is there a way to loop through "While Not EOF() " in T-SQL?

I want to end up with

1234,1,A,500

1234,1,B,500

1234,2,A,1000

1234,2,Q,1000

1235,1,A,2500

1235,1,B,1500

1235,2,S,5000

1235,5,D,4000

1235,5,D,2000

Request help!

Thanks

Mohan


MohanSQL

SQL 2008 R2 Express Install Failure

$
0
0

An attempt to install SQL 2008 R2 Express results in failure - Fusion Active Template (.ATL) file failure.  Is there a way to correct this failure?  Thank You


SQL Server express

$
0
0
SQL Server express - is this a good place to house an Access database that will be used by multiple users (4-6)? Is it secure?

LocalDB - Visual Studio 2013 will not automatically start the SQL 2014 LocalDb ProjectsV12 Instance.

$
0
0

P.S. - I am having the same issue with both SQL 2012 and 2014 LocalDB.

I have been looking for days for the answer to this question, and have installed, uninstalled, repaired, etc.  I have deleted, and created instances, I have corrected Environment Path, moving the SQL 2014 paths to the beginning of the path.

I have VS2013 installed.

I have SQL 2014 SQL Express with tools and LocalDB installed.

I have VS2013 configured as follows:

TOOLS -> Options -> Database Tools -> Data Connections -> (LocalDB)\ProjectsV12

"SQLLocalDb info" showed that ProjectsV12 exists, but "SQLLocalDb start ProjectsV12" failed to start, so I deleted it and recreated and started it with the following commands:

"SQLLocalDb delete ProjectsV12"

"SQLLocalDb create ProjectsV12"

"SQLLocalDb start ProjectsV12"

LocalDb starts just fine, no errors in error.log either.

Then I issue the stop command to place LocalDb in its default state:

"SQLLocalDb start ProjectsV12"

At this point, I expect VS2013 to autostart it when I attempt to Add a new SQL Database by adding a SQL Database to a project.

Instead I get an ERROR MESSAGE saying, "...instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessable. 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 during LocalDB instance startup: SQl Server process failed to start.)

Then I start again:

"SQLLocalDb start ProjectsV12"

I can add now the SQL Database to the VS2013 project as expected.

The problem then is VS2013. When I count on VS2013 to autostart it for me, I get the ERROR MESSAGE above.

When I look at the SQLLocalDb error.log:

C:\Users\Z617699\AppData\Local\Microsoft\Microsoft SQL Server Local DB\Instances\ProjectsV12\error.log

THINGS START OFF FINE:

2014-12-19 15:07:29.64 spid9s      The resource database build version is 11.00.3000. This is an informational message only.

2014-12-19 15:07:29.64 spid7s      Starting up database 'msdb'.

2014-12-19 15:07:29.82 spid9s      Starting up database 'model'.

2014-12-19 15:07:30.04 spid9s      Clearing tempdb database.

2014-12-19 15:07:30.34 spid9s      Starting up database 'tempdb'.

2014-12-19 15:07:30.64 spid14s     The Service Broker endpoint is in disabled or stopped state.

2014-12-19 15:07:30.64 spid14s     The Database Mirroring endpoint is in disabled or stopped state.

2014-12-19 15:07:30.65 spid14s     Service Broker manager has started.

2014-12-19 15:07:30.72 spid7s      Recovery is complete. This is an informational message only. No user action is required.

THEN START TO GO WRONG:

2014-12-19 15:07:49.12 Logon       Error: 17828, Severity: 20, State: 3.

2014-12-19 15:07:49.12 Logon       The prelogin packet used to open the connection is structurally invalid; the connection has been closed. Please contact the vendor of the client library. [CLIENT: <named pipe>]

2014-12-19 15:07:49.18 Logon       Error: 17828, Severity: 20, State: 3.

2014-12-19 15:07:49.18 Logon       The prelogin packet used to open the connection is structurally invalid; the connection has been closed. Please contact the vendor of the client library. [CLIENT: <named pipe>]

2014-12-19 15:07:50.16 spid52      Starting up database 'EBF298F6-0828-4B3D-B5FF-1A03937ACD96'.

2014-12-19 15:07:50.31 spid52      Setting database option AUTO_SHRINK to ON for database 'EBF298F6-0828-4B3D-B5FF-1A03937ACD96'.

2014-12-19 15:07:50.32 spid52      Setting database option OFFLINE to ON for database 'EBF298F6-0828-4B3D-B5FF-1A03937ACD96'.

2014-12-19 15:12:14.09 Logon       Error: 17828, Severity: 20, State: 3.

2014-12-19 15:12:14.09 Logon       The prelogin packet used to open the connection is structurally invalid; the connection has been closed. Please contact the vendor of the client library. [CLIENT: <named pipe>]

2014-12-19 15:12:14.83 spid52      Starting up database 'C57A07F2-36B0-4232-8054-6D5047DC6FDD'.

2014-12-19 15:12:15.03 spid52      Setting database option AUTO_SHRINK to ON for database 'C57A07F2-36B0-4232-8054-6D5047DC6FDD'.

2014-12-19 15:12:15.04 spid52      Setting database option OFFLINE to ON for database 'C57A07F2-36B0-4232-8054-6D5047DC6FDD'.

2014-12-19 15:30:21.38 spid14s     Service Broker manager has shut down.

2014-12-19 15:30:21.40 spid52      .NET Framework runtime has been stopped.

2014-12-19 15:30:21.67 spid52      Server shut down by request from login USWIN\z617699.

2014-12-19 15:30:21.67 spid52      SQL Trace was stopped due to server shutdown. Trace ID = '1'. This is an informational message only; no user action is required.

I have 2 computers facing this issue, and 1 that works fine.

Do you have any suggestions?

Thank you,

Dave Boal

The remote procedure call failed. [0x800706be]

$
0
0

I have just installed "SQL Server 2008 R2 Express with Advanced Services" on my Windows 7 workstation.  I'm going through the Walkthrough: Installing and Configuring SQL Server 2008 R2 Express with Advanced Services located here:http://msdn.microsoft.com/en-us/library/gg512108(v=vs.91).aspx.  I'm down to the heading "Configure Your New Instance of SQL Server for the Installation of the AdventureWorks Databases" step 2 which says: in SQL Server Configuration Manager left pane select "SQL Server Services.  When I do,  I get this:

Can anyone help me solve this problem?


Joe

Visual studio 2012 and sql express

$
0
0

Hello guys,

I hope you can help me with this. Basically, on my computer at work I have visual studio 2012 installed and when I want to create a new SQL database I use the following settings:

http://s2.postimg.org/gvkmm2kah/SQL_Settings.jpg

I have recently installed a copy of Visual studio 2012 on my own machine at home but when I use the above settings to create a database I get the following error:

http://s12.postimg.org/wsxldwwgd/sql.jpg

Is there any chance that somebody could help me with that so that I can use SQL express?

I really don't know what to do to sort this out.

thanks

Express 2012 exit error

$
0
0

I am installing Express 2012 and get the following

Install failed with exit code:-2054422508

Sql server 2008 and Windows 8

$
0
0

Hi

I published my WPF application using VS 2010 Express edition and trying to install it on Windows 8.  The application runs but when it comes to searching the database that was included in the installation package it gives the error

"This program has compatibility issues Microsoft SQL Server(2008 and 2008 R2)"

The installer when setup was run did download SQL Server so I am not sure why I am getting this error.  Any advice?

Sql Server 2012 Uninstalling Error:

$
0
0

Hi All,

I have tried to uninstall SQL Server Express 2012 from my lap, during the uninstallation process i am getting the following error:

"An installation package for the product Microsoft SQL Server 2008 Setup Support Files cannot be found. Try the installation again using a valid copy of the installation package 'sqlsupport.msi'.

What is the reason behind this error?What can i do now?Shall i continue the uninstallation process or stop it,while getting this message?Please help me to solve this error.

Thanks and Regards,

T.Tharaneetharan


Do tables in SQL Server Express need to be added programmatically?

$
0
0
Do tables in SQL Server Express need to be added programmatically?

I installed SQL Server Express 2014.  I'm uncertain how to create a table ... then add fields to that table.

I did run SQL Server 2014 Management Studio ... File -> New -> Project ... resulted in .ssmssln, .ssms_suo, and ssmssqlproj files.

Double clicking on the .ssmssln file opens the Management Studio ... File -> Connect Object Explorer lead to the Database engine.

Was this sequence correct?  Next steps?  Or does this need to be done programmatically?

bhs67

What is the correct wording to connect to an SQL Server Express 2014 database?

$
0
0
I am connecting to an Access 2007 database:

oleConnection = new OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\...\\Db.accdb");

What is the correct wording to connect to an SQL Server Express 2014 database?


bhs67

SQL Server Express 2014 Installation Completes with Failures and Repair Does Nothing to Help

$
0
0

I am attempting to install SQL Server Express 2014 on a development machine and as usual old versions of SQL and the remnants of them are a plague to the installation.

I have used to Revo Uninstaller to scrub the old installations and with my first attempt after some additional work on the registry I was able to get an instance to install and remarkably I was able to connect to the instance. However, I removed an application reference to SQL Server 2008 after the SQL Express 2014 installation (through Control Panel > Programs > Programs and Features) and it stopped working immediately.

So I removed (uninstalled using Revo Uninstaller) every reference to any SQL Server application as well as removed all of the registry references (using Revo) and I can now install SQL Server Express 2014 with "Feature" failures [Reporting Services, Database Engine Services, Full-Text and Semantic Extractions for Search and SQL Server Replication]  and of course it doesn't work.

Now when I attempt "Repair" the installation the process ends normally (no errors) and reports  "Success" however SQL still has no instance and the services are not running nor are they visible when I open the "SQL Server Configuration Manager".

This is the "Repair" log:

Overall summary:
  Final result:                  Passed
  Exit code (Decimal):           0
  Start time:                    2014-12-21 17:21:37
  End time:                      2014-12-21 17:29:10
  Requested action:              Repair

Machine Properties:
  Machine name:                  EDWARD-PC2
  Machine processor count:       4
  OS version:                    Windows 7
  OS service pack:               Service Pack 1
  OS region:                     United States
  OS language:                   English (United States)
  OS architecture:               x86
  Process architecture:          32 Bit
  OS clustered:                  No

Product features discovered:
  Product              Instance             Instance ID                    Feature                                  Language             Edition              Version         Clustered  Configured
  SQL Server 2014                                                          Management Tools - Basic                 1033                 Express Edition      12.0.2000.8     No         Yes
  SQL Server 2014                                                          Management Tools - Complete              1033                 Express Edition      12.0.2000.8     No         Yes
  SQL Server 2014                                                          Client Tools Connectivity                1033                 Express Edition      12.0.2000.8     No         Yes
  SQL Server 2014                                                          Client Tools Backwards Compatibility     1033                 Express Edition      12.0.2000.8     No         Yes
  SQL Server 2014                                                          Client Tools SDK                         1033                 Express Edition      12.0.2000.8     No         Yes
  SQL Server 2014                                                          LocalDB                                  1033                 Express Edition      12.0.2000.8     No         Yes

Package properties:
  Description:                   Microsoft SQL Server 2014
  ProductName:                   SQL Server 2014
  Type:                          RTM
  Version:                       12
  SPLevel:                       0
  Installation location:         C:\Users\Edward\Downloads\SQLEXPRADV_x86_ENU\x86\setup\
  Installation edition:

User Input Settings:
  ACTION:                        Repair
  AGTDOMAINGROUP:                <empty>
  AGTSVCACCOUNT:                 <empty>
  AGTSVCPASSWORD:                <empty>
  AGTSVCSTARTUPTYPE:             Manual
  ASCONFIGDIR:                   Config
  ASSVCACCOUNT:                  <empty>
  ASSVCPASSWORD:                 <empty>
  CLTSTARTUPTYPE:                0
  CLTSVCACCOUNT:                 <empty>
  CLTSVCPASSWORD:                <empty>
  CONFIGURATIONFILE:
  CTLRSTARTUPTYPE:               0
  CTLRSVCACCOUNT:                <empty>
  CTLRSVCPASSWORD:               <empty>
  ENU:                           true
  FAILOVERCLUSTERGROUP:          <empty>
  FAILOVERCLUSTERNETWORKNAME:    <empty>
  FTSVCACCOUNT:                  <empty>
  FTSVCPASSWORD:                 <empty>
  HELP:                          false
  IACCEPTSQLSERVERLICENSETERMS:  false
  INDICATEPROGRESS:              false
  INSTANCENAME:                  <empty>
  ISSVCACCOUNT:                  NT AUTHORITY\Network Service
  ISSVCPASSWORD:                 <empty>
  ISSVCSTARTUPTYPE:              Automatic
  QUIET:                         false
  QUIETSIMPLE:                   false
  SQLSVCACCOUNT:                 <empty>
  SQLSVCPASSWORD:                <empty>
  UIMODE:                        AutoAdvance
  X86:                           false

  Configuration file:            C:\Program Files\Microsoft SQL Server\120\Setup Bootstrap\Log\20141221_172135\ConfigurationFile.ini

Detailed results:
  Feature:                       Management Tools - Complete
  Status:                        Passed

  Feature:                       Client Tools Connectivity
  Status:                        Passed

  Feature:                       Client Tools SDK
  Status:                        Passed

  Feature:                       Client Tools Backwards Compatibility
  Status:                        Passed

  Feature:                       Management Tools - Basic
  Status:                        Passed

  Feature:                       SQL Browser
  Status:                        Passed

  Feature:                       Documentation Components
  Status:                        Passed

  Feature:                       SQL Writer
  Status:                        Passed

  Feature:                       LocalDB
  Status:                        Passed

  Feature:                       SQL Client Connectivity
  Status:                        Passed

  Feature:                       SQL Client Connectivity SDK
  Status:                        Passed

  Feature:                       Setup Support Files
  Status:                        Passed

Rules with failures:

Global rules:

There are no scenario-specific rules.

Rules report file:               C:\Program Files\Microsoft SQL Server\120\Setup Bootstrap\Log\20141221_172135\SystemConfigurationCheck_Report.htm

However this is what the "SQL Sever Configuration Manager" look like:

Why does this appear to not be working properly? I can not connect the the "local" instance and I would guess that the service either does not exist or is not running.


Edward Walker

Full Text Search

$
0
0

I have implemented Full text search, and I have created some stop words like 0,1,2,3,4,5,6,7,8 and other are default.

I am using this function CONTAINSTABLE(Employee, , '"0007*"',1033) and I am taking only 10 records at first so when i run this i got records other then 0007 and I got 0007 on 40 row.

So i want at the first position whatever is the exact match it comes first and other are coming after that.

I do not want to use weight term.Please advise me how to achieve this.

thanks, Keyur


SQL Express 2014 Global Rules Failure Persists

$
0
0

I have been running afoul of a SQL Server Express 2014 Installation Rule:

This computer does not have a required update for .NET Framework 2.0 or .NET Framework 3.5 SP1 that is needed for a successful installation of .NET Framework 4 and Visual Studio components that are included in SQL Server. To continue, download and install the required update package from http://go.microsoft.com/fwlink/?LinkID=196047. A computer restart is required after installing this update.

  • I have disabled/enabled .NET Framework 3.5 in order to re-install the framework to no avail.
  • I have attempted to install the .NET Framework 2.0 (for some strange reason) with no luck.
  • I have attempted using the .NET Framework Clean Up Tool HERE.
  • I uninstalled and have attempted to install this update.

All of this to no avail however. Any help with this issue would be greatly appreciated.


Edward Walker



Viewing all 3319 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>