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

Trigger

$
0
0

I want to run trigger that : 

Write an SQL statement to create a trigger called “ValidOrder” checking the value of a new
order inserted into the TEMPOrder table is greater than $100. If the value is less than $100,
the entry needs to be rolled back. 

could be an easy question but would you please do me a favor for fire a trigger on the same table after pass a condition. ( Value>100) 

the table is : 

CREATE TABLE [dbo].[TEMPOrder](
[OrderRef] [int] NOT NULL,
[CustRef] [int] NOT NULL,
[DateOrdered] [date] NOT NULL,
[value] [money] NOT NULL,
[DateDelivered] [date] NULL )

Many Thanks

Ali


SHIFT + SPACE in Table Editor

$
0
0
The default behaviour for pressing SHIFT + SPACE when editing text inside a cell in the Table Editor view in Microsoft SQL Server Management Studio Express is to change focus to select all cells comprising the current row. This behaviour lends itself to the default behaviour for pressing SHIFT + {LEFT | RIGHT | UP | DOWN } in changing the focus to select adjacent cells.

However, I find this is quite annoying as the SHIFT + SPACE combination is quite a common miss-type when entering text in UpperCaps or when entering text with spaces while holding the SHIFT key.

Anyone else have this gripe with MSSMSE? Anyone know how to disable this behaviour?

Simon

Restoring database and stored procedures & functions

$
0
0

I am not SQL administrator so this is probably a dumb question, but If I backup a database and copy it to a new server, it should bring along all of the stored procedures and functions correct? 

The developer of the application made a point to tell me to make sure those were brought over as well which got me to questioning if that is true or not? Can procedures and functions be stored somewhere outside the database?

Thanks!

1 media families, but 2 media families are expected

$
0
0

Hi! I tried to make a full backup of 2008 r2 sql server database and got an error:

Backup failed for Server “x”. (Microsoft.SqlServer.SmoExtended)

Additional information:

System.Data.SqlClient.SqlError: The media loaded on “PATH\Tlog.bak” is formatted to support 1 media families, but 2 media families are expected according to the backup device specification (Microsoft.SqlServer.Smo)

What is wrong and what needs to be done?

Thanks,

Michael

SQL query to view data in edit mode

$
0
0

Hi,

What is the query to get the the records of the table in edit mode.

Initailly we right click on the table and select edit top 200rows.

where can I download the file?

$
0
0

I was working in a project build .exe file with wix toolset,  and I need to download the file:

File Name en_sql_server_2012_express_with_service_pack_2_x64_4384750.exe
File Size 296 MBytes
SHA1 Hash B647AAF78757EC7A28500EBF9AB457D965192CAC
File Type EXE
Architecture x64
Language English
Release Date 2014-07-01 07:34:03
Product ID 1547
File ID 60134

but I can't find the download url, I just want to download the file whose name is en_sql_server_2012_express_with_service_pack_2_x64_4384750.exe and hash value is B647AAF78757EC7A28500EBF9AB457D965192CAC. I'm worry about it, so could you please help me to find this?

thanks

B647AAF78757EC7A28500EBF9AB457D965192CAC
B647AAF78757EC7A28500EBF9AB457D965192CAC
B647AAF78757EC7A28500EBF9AB457D965192CAC
B647AAF78757EC7A28500EBF9AB457D965192CAC
B647AAF78757EC7A28500EBF9AB457D965192CAC
B647AAF78757EC7A28500EBF9AB457D965192CAC

Web page down SQL Server 2014 Express SP1?

$
0
0

Can some one tell me if this page is down permanently or just temporarily for maintenance only? 

https://www.microsoft.com/en-us/download/details.aspx?id=46697

Kind regards, 

Gio Chow 

Export database schema into Excel file

$
0
0
HI I need to export Database Schema from SQL Server management studio express 2005 into MSExcel? generate script is giving me the script. but i need to have Excel file contains database schema. how do i do with SQL server management studio express 2005?

Error on installing SQL server 2012 express and SSMS 16

$
0
0
I cannot install neither SQL server 2012 express nor Management Studio 16 on my computer.

It says: Microsoft Sql Server 2012 Native Client: There is a problem with this Windows Installer package. A DLL required for this installation to complete could not be run.

I have tried every solution I found, but non of them worked.

I have the log files but I cannot post the link yet (as I am new I cannot do that here), sfc scan only found the winhlp.exe file corrupted, nothing else, no DLLs.

Maybe useful from the error log: BootstrapperEngineDataModel.OnError: Burn engine encountered error. PackageId: sqlncli_x64, ErrorType: WindowsInstaller, ErrorCode: 1723, Data: 1723,SNAC_SetClientSSNLDefaults_64,SNAC_SetClientSSNLDefaults,C:\WINDOWS\Installer\MSIC280.tmp, ErrorMessage: There is a problem with this Windows Installer package. A DLL required for this installation to complete could not be run. Contact your support personnel or package vendor. , UIHint: 0
[133C:0610][2017-02-03T14:23:51]i000: MainViewModel.AddFailedCondition: Error: Microsoft SQL Server 2012 Native Client : There is a problem with this Windows Installer package. A DLL required for this installation to complete could not be run. Contact your support personnel or package vendor.
[133C:0610][2017-02-03T14:23:51]e000: MainViewModel.OnPackageError: setup failed for packageId: sqlncli_x64, package: Microsoft SQL Server 2012 Native Client , errorCode: 1723, errorMessage: There is a problem with this Windows Installer package. A DLL required for this installation to complete could not be run.

Already asked the question on TechNet, but they said I should ask here.

Please help!

Cannot backup database BACKUP DATABASE is terminating abnormally

$
0
0

Hello,

We are experiencing some backup issues

The machine is fresh,nothing is installed except MSSQL Express 2017 and IIS, can't backup any idea?


Sqllib error: OLEDB Error encountered calling ICommandText::Execute. hr = 0x80040e14. SQLSTATE: 42000, Native Error: 3013

Error state: 1, Severity: 16
Source: Microsoft SQL Server Native Client 11.0
Error message: BACKUP DATABASE is terminating abnormally.
SQLSTATE: 42000, Native Error: 3209
Error state: 1, Severity: 16
Source: Microsoft SQL Server Native Client 11.0
Error message: Operation is not supported on user instances.

SQLVDI: Loc=SignalAbort. Desc=Client initiates abort. ErrorCode=(0). Process=1688. Thread=2100. Client. Instance=202668CB-B050-4F. VD=Global\{A07A9CD8-D46A-4355-9129-16601ACDBEDC}1_SQLVDIMemoryName_0. 

A VSS writer has rejected an event with error 0x800423f4, The writer experienced a non-transient error.  If the backup process is retried,
the error is likely to reoccur.
. Changes that the writer made to the writer components while handling the event will not be available to the requester. Check the event log for related events from the application hosting the VSS writer. 

Operation:
   PrepareForSnapshot Event

Context:
   Execution Context: Writer
   Writer Class Id: {a65faa63-5ea8-4ebc-9dbd-a0c4db26912a}
   Writer Name: SqlServerWriter
   Writer Instance Name: Microsoft SQL Server 2017:SQLWriter
   Writer Instance ID: {405742bb-9377-4518-bdc1-0f5091b8ff30}
   Command Line: "C:\Program Files\Microsoft SQL Server\90\Shared\sqlwriter.exe"
   Process ID: 1688



Query the Safe Removal of SQL Server 2014

$
0
0

I have a server that has over time needed to have assorted versions of SQL Server installed.  Each Application vendor has required a specific version from 2008 R2 to 2012 and recently 2014.

We recently attempted to migrate to a new product only to find "the powers that be" had been swept up by the charm of the sales people and not the facts.  The product did not do half the things stated and was not suited to the size of the organisation.  A scenario all too familiar to IT pros sadly.

I want to remove the SQL Server 2014 Express from the server. 

Historically I would disable any redundant SQL instances, but want to remove the SQL 2104 Express instance altogether from the server.  Is it simply a case of running the setup and using it to remove the installed SQL 2014.  We no longer need the data the DB contains (their migration team only converted about 5% of the data)



My application is trying to connect in SQL Server Express but I attach my database to SQL Server Enterprise.

$
0
0
My application is trying to connect in SQL Server Express when it runs, but I attach my .mdf database to SQL Server 21016 Enterprise, what should I do to make my application connects to SQL Server 2016 Enterprise?

Sql server keep alive closing my pooling connections

$
0
0

I'm using select * from sys.dm_exec_connections for seeing active pooling connections. When i'm create a new sql pool connection through tcp(wifi) it creates my new connection as image below.

The problem is that if wifi will close for 30 sec, then it destroys my connection. Why is this happening? I have set min pool size =5 in connection string.

Server=myServerAddress;pooling = true; min pool size =5;max pool size =5;Database=myDataBase;User Id=myUsername;

After 30sec

عناوين صيانة ثلاجه سامسونج المهندسين   ٠1210999852 @ ٠235700994 توكيل معتمد سامسونج

$
0
0
عناوين صيانة  ثلاجه سامسونج المهندسين   ٠1210999852 @ ٠235700994 توكيل معتمد سامسونج 

OPENROWSET error accessing XLSX if not manually saved

$
0
0

Good day,

Apologies if this is in the wrong forum. Please refer me to the correct one if this is the case, thank you.

I have a bunch of excel files that are added to a Dropbox folder on a monthly basis. These files should then be imported to a SQL Server Database.

My problem is that, when I try and import data from SOME of these XLSX files, OPENROWSET gives me the following error:

Msg 7399, Level 16, State 1, Line 14
The OLE DB provider "Microsoft.Ace.OLEDB.12.0" for linked server "(null)" reported an error. The provider did not give any information about the error.
Msg 7303, Level 16, State 1, Line 14
Cannot initialize the data source object of OLE DB provider "Microsoft.Ace.OLEDB.12.0" for linked server "(null)".

This is a general error message and I was not able to find a solution related to my problem in another thread.

Once I open a file and SAVE it MANUALLY, then OPENROWSET SUCCESSFULLY reads the selected range from the XLSX file.

I think that means OPENROWSET has some kind of access or permition restriction to these files, but I do not know why as other files with the same format does not produce this error.

Is there a way to give OPENROWSET power to read these files even if they have not been manually saved? Any alternate suggestion on how to overcome this problem in SQL will be much appreciated. 

Thanks,

Raynard


Identity columns reset on restore

$
0
0

Using SQL EXPRESS 2017, I use BACKUP to create a database backup, the database comprising tables which have identity columns.  I just use plain vanilla BACKUP DATABASE x TO DISK='xxx'.  It all works just fine.  I was testing the restore using, again, plain vanilla RESTORE DATABASE x FROM DISK='xxx'.  I have tried both with and without using WITH REPLACE.  After the restore, the data are all present in the tables.  However, each table that has a column with IDENTITY=yes has lost the IDENTITY modifier.  The column is there; the data are there; the column is no longer an IDENTITY column.  Bulk copy is not an appropriate option for these procedures nor is table recreation and data copy.  Is there a switch or option i am not setting?

2017 Installation Will Not Complete: Error Decompressing SQL Server Media

$
0
0

Hello. I am attempting to install SQL Server Express Edition 2017. Unfortunately, the installation will not complete and I keep getting the following error:

"Error decompressing SQL Server Media.  Access to the path 'C:\SQLServer2017Media\SQLEXPR_x64_ENU.exe' is denied.

I verified that I meet all of the system requirements.

I was able to install the SQL Server Management Studio; however, I noticed that the Services manager does not shown any instance of SQL Server. I am assuming that is because the installation is not complete. Any help is greatly appreciated. 

ShondaL

SQL Server 2014 Express extract file parameter?

$
0
0

I am working to bundle SQL Server 2014 Express with an application.  I am using the following command line to install via an InstallShield prerequisite:  /qs /INSTANCENAME=MYINSTANCE /ACTION="Install" /FEATURES=SQLEngine,Conn,SSMS /SECURITYMODE=SQL /SAPWD="Password" /TCPENABLED=1 /SQLSVCACCOUNT="NT AUTHORITY\SYSTEM" /IACCEPTSQLSERVERLICENSETERMS

The installer I am using is SQLEXPRWT_x86_ENU.exe.

When the installer starts up their is a dialog named:  Choose Directory for Extract Files.  In earlier versions of SQL Server Express this dialog did not require the user to press Ok to continue.  Since it takes several minutes to install SQL Server Express I prefer to show the installation to the user, so they can see that something is taking place.  The /q (Quiet) parameter will suppress this dialog, but nothing is seen for several minutes.  Note:  the Installer documentation does state that:  The /QS switch only shows progress, does not accept any input, and displays no error messages if encountered. The /QS parameter is only supported when /Action=install is specified.  Consequently, I believe the /QS parameter should not be requiring input.

All that for these questions:

1) Is there away to suppress this dialog while still using the /qs (Quiet Simple) parameter.

2) Is there a parameter to tell the installer to extract the files to a specified location?

Thanks,

Les

Couldn't download SQL Server 2008 R2 SP3 TLS 1.2 Update

$
0
0

Hi,

I try to download SQL Server 2008 R2 SP3 TLS 1.2 Update, but failed many time. once i click request hotfix button, page reloaded and not other response.

https://support.microsoft.com/en-us/hotfix/kbhotfix?kbnum=3144114&kbln=en-us&forceorigin=esmc

Thanks,

Liquid Cui

Lcui@outlook.com

SQL Server 2017 Express Edition installation fails

$
0
0

Hi,

I have the following problem: I want to install SQL Server 2017 Express and have tried several times, but I keep getting the same error. I googled the error but couldn't find any solutions that worked for me.

The installer says:

Unable to install SQL server (setup.exe). Exit code (Decimal): -2068119551 Error description: The specified service does not exist as an installed service

Any help is highly appreciated!

Thanks in advance!

Viewing all 3319 articles
Browse latest View live


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