Quantcast
Channel: Forum Getting started with SQL Server
Viewing all 6989 articles
Browse latest View live

Connect time out

$
0
0

I would like to set policy of connection time out on SQL server.

If no activities duration 15 minute, the connection will be time out.

How can I set this policy?

Please you kindly help guide me how to do.


Execute SQL server stored proc on multiple servers

$
0
0

Hi, 

I have some SQL that I need to execute on multiple servers.  I don't want to push this SQL onto all the servers as there are hundreds of them.  So is this possible?  Can I execute my dbo.usp_someProc on server\inst etc ? 

Thanks

How is my table populated ?

$
0
0

Hi Folks - Is there a way to identify how my tables are populated ,any script or trace log can help me.

I have a Oracle database (Production) ,daily the records are populated into my SQL Server . I have checked the server ,can't find any SSIS packages which does the work ,not sure how they are loaded . I don't have any documentation for my peer ,so taught of posting here. 

Can any one pls help.

Regards,

satish.p


Computed_Column table showing isComputed Flag true but definition is null ?

$
0
0

I am working on  Microsoft SQL Server 2012 (SP3-CU2) (KB3137746) - 11.0.6523.0 (X64) Mar 2 2016 21:29:16 Copyright (c) Microsoft Corporation Enterprise Edition (64-bit) on Windows NT 6.1 <X64> (Build 7601: Service Pack 1)

I am facing an issue, where the table mydata has two column one ismydata_number_old and second is mydata_number and both are numeric type (18,0) null.

I have another table mydata_audit that contains same column namemydata_number.

I am trying to fetch the ddl from the created database. and for created table which I run my java code, it returns the create query but without mydata_number column.

Normal query from MS SQL Server Management Studio - showing that mydata_number is numeric (18,0) null but when we look for isComputed Column , it was returning true and definition column is null

So my query is - Is it possible this case with sql server where column type is mumeric (18, 0) null and isComputed true but definition is null ?

I am running following query

RESULT OF : select t.nameas tablename, c.* from sys.computed_columns c join sys.tables t on c.object_id = t.object_id where c.name = 'mydata_number';

SSMA for Access Error

$
0
0

I have been trying to get the Migration Assistant to work for several months now. I keep getting this error:

<code> Unable to cast COM object of type 'Microsoft.Office.Interop.Access.Dao.DBEngineClass' to interface type 'Microsoft.Office.Interop.Access.Dao._DBEngine'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{00000021-0000-0010-8000-00AA006D2EA4}' failed due to the following error: Library not registered. (Exception from HRESULT: 0x8002801D (TYPE_E_LIBNOTREGISTERED)).
     An error occurred while loading database content. </code>

A friend has been loading databases to my server until I can make it work on my computer.  I have Office 2010 with a standalone version of MS Access 2013. I create an Excel file and then pull it into my Access program. I then save and close Access and try to upload to a MsSql 2005 Server. My friend who uses SSMA has no issues uploading my files. He has even sent me his Access file that he uses to upload and I still cannot get SSMA to work.

I have tried deleting a registry that was noted to help some people with this issue, (something to do with 2010 vs 2013) it did not help me. I registered the dao360.dll that I found in Program Files (x86), no joy there either. I paid good money for the Access 2013 program and I need it to work. Up until now, I was using it to create .xml files and now I need it for database use and it has given me nothing but trouble.

And I am using 32 bit everything as I know it makes a difference

Download SQL Server 2012 Enterprise edition

$
0
0

I am looking to download SQL Server 2012 Enterprise Edition.However,I can see only 2012 Express edition or the latest version offering(2016).If anyone can share me the link to download SQL Server 2012 Enterprise Edition?

Also kindly share details on when SQL Server 2012 is getting Out of Support.

Thanks!!!

SQL server could not start at window start in win 2012

$
0
0

hello

i have window 10 64 bit. i am install SQL server 2012. SQL server services not start automatically give me a solution

I am not able to install SQL server Express

$
0
0

Hello,

Everytime that I tried to install the SQL Server express, I had an error said: No se ha podido descargar el archivo de instalador de SQL "https://download.microsoft.com/download/F/8/8/F885BD35-7C37-48CD-A24B-9F7B268785E8/SQLEXPR_x64_ESN.exe" debido a problemas de red. Vuelva a intentarlo más tarde.

Could you help me?

Thanks


Can't delete full text index, also can't rebuild it

$
0
0

I have a database on a remote server running sql server 2013(?) hosted by a hosting company. I decided I would like to be able to use it offline, so I backed it up and ftp'ed the backup to my local PC. I successfully restored it to a local version.  I was not able to back up "filegroups" but normally that is not a problem

The problem is that one of my tables has a field called "searchtext" (varchar(100)" which has a full-text index on it.  That does not work any more on my local copy (that I administer with sql server 2016).

so I connected to the local copy in SSMS, and clicked on 'storage", then right-clicked on the full text index name, and chose REBUILD.  This crashed SSMS.

So I tried deleting the field (the column named searchtext) from the table.  This failed, with an error message that the column was enabled for full text search.

So I tried deleting the full text index.  That failed too, with a similar error message.

And all this time, I wanted to be bicycling in Tahiti!

Any help is appreciated.

Auto Filling Option

$
0
0

Hi, I wanted to know how to change the settings in SQL server management studio to list down the columns and table names, when typing the query. Thanks in advance.

SQL server 2012 could not start at window start in win 10

$
0
0

hello

i have window 10 64 bit. i am install SQL server 2012. SQL server services not start automatically give me a solution


how to create setup file including sql database and run in another pc ,the program in c#

$
0
0
i make c# project which attached by sql database and i want to make setup file to run on another pc did not has sql server or visiual studio 

SQL Server Installation failed

$
0
0
I am trying to install sql server express 2016. My system has windows 10 64 bit with 8 gb ram, but installation is failed every time. searched a lot of topics but still issue persist, can someone help me!!

Monday Interview with Forum Ninja Noel D Paton

XML To SQL

$
0
0

I have an online ordering form that stores the data in XML (See below).  I need to put this data into SQL so that we can build work tickets using Crystal Reports.   Ideally, two tables would be created (1) order.header (2) order.details

Everything in italics would need to appear in the order.header table. Everything in Bold would need to appear in the order.details table.  

Any suggestions where we begin?

<Order id="519">
  <id>519</id>
  <dealer_id>377</dealer_id>
  <submitted>yes (2016-08-25)</submitted>
  <account_code>0022305</account_code>
  <account_name>MIKE TONSIL</account_name>
  <user>mfromo</user>
  <ordernumber>W000519</ordernumber>
  <clientname>TEST</clientname>
  <directship>true</directship>
  <orderdate>08/25/2016</orderdate>
  <PreviousOrder>NEW</PreviousOrder>
  <sample>true</sample>
  <sex>M</sex>
  <rush2week>false</rush2week>
  <rush1week>true</rush1week>
  <rushdeliverydate>08/31/2016</rushdeliverydate>
  <wishdate />
  <shipment>Overnight Early AM</shipment>
  <address>123 any street</address>
  <label>own</label>
  <city>Newark</city>
  <state>New Jersey</state>
  <zip>07105</zip>
  <firstbutton>2&amp;#188;</firstbutton>
  <buttonfront>7</buttonfront>
  <front>French</front>
  <back>Regular</back>
  <neck>17</neck>
  <waist>42</waist>
  <waist_allowance>6</waist_allowance>
  <hip>43</hip>
  <hip_allowance>6</hip_allowance>
  <chest>44</chest>
  <chest_allowance>6</chest_allowance>
  <overarm>54</overarm>
  <tail>33</tail>
  <tailstyle>squarevent</tailstyle>
  <yokedepth>4</yokedepth>
  <yokemeasurement>19</yokemeasurement>
  <leftsleeve>34</leftsleeve>
  <rightsleeve>34</rightsleeve>
  <leftsleevehalf>21</leftsleevehalf>
  <rightsleevehalf>21</rightsleevehalf>
  <sleevefit>full</sleevefit>
  <leftcuff>10</leftcuff>
  <rightcuff>10</rightcuff>
  <leftshoulder>+1</leftshoulder>
  <rightshoulder>-1</rightshoulder>
  <facing>true</facing>
  <heightfeet>4</heightfeet>
  <heightinches>4</heightinches>
  <weight>190</weight>
  <monogram>
    <first>M</first>
    <middle>D</middle>
    <last>F</last>
  </monogram>
  <shoulder>2</shoulder>
  <cuff>
    <stitchtype>edge</stitchtype>
    <lining>
      <fuse>false</fuse>
    </lining>
    <fusetype>builtup</fusetype>
  </cuff>
  <collar>
    <stitchtype>regular</stitchtype>
    <lining>
      <fuse>true</fuse>
    </lining>
    <fusetype>soft</fusetype>
  </collar>
  <custommonogram>true</custommonogram>
  <lineitems>
    <collar>
      <stay>
        <id>2</id>
        <name>Removable</name>
        <index>1</index>
      </stay>
      <option>
        <id>4</id>
        <value>H</value>
        <name>H</name>
        <type>HIDDEN BUTTON DOWN</type>
        <index>3</index>
      </option>
      <style>B32B</style>
    </collar>
    <picstitch>
      <id>9</id>
      <value>17</value>
      <name>[17] Dk Pink</name>
      <index>17</index>
    </picstitch>
    <saddlestitch>
      <name>NONE</name>
    </saddlestitch>
    <button>
      <id>55</id>
      <value>011</value>
      <name>[011] Navy</name>
      <index>11</index>
    </button>
    <buttonstitch>
      <id>45</id>
      <value>5</value>
      <name>[5] Hunter</name>
      <index>5</index>
    </buttonstitch>
    <buttonhole>
      <id>1</id>
      <value>1</value>
      <name>[1] Lime</name>
      <index>1</index>
    </buttonhole>
    <pocket>
      <id>1</id>
      <value>X</value>
      <name>No Pocket</name>
      <type>NONE</type>
    </pocket>
    <flaps>
      <id>18</id>
      <value>R</value>
      <name>Round</name>
      <type>FLAPS</type>
      <index>17</index>
    </flaps>
    <crowsfoot>
      <name>NONE</name>
    </crowsfoot>
    <checkedsample>false</checkedsample>
    <sample>true</sample>
    <fabric>6000</fabric>
    <cmt>x</cmt>
    <quantity>1</quantity>
    <tiespace>0</tiespace>
    <chkwhitecollar>true</chkwhitecollar>
    <whitecollar>7987</whitecollar>
    <sleevehalf>false</sleevehalf>
    <sleevelong>true</sleevelong>
    <cuff>
      <option>
        <id>13</id>
        <value>A</value>
        <name>Angle</name>
        <type>2 BUTTON</type>
        <index>12</index>
      </option>
    </cuff>
    <chkwhitecuff>true</chkwhitecuff>
    <whitecuff>8008</whitecuff>
    <pocketbutton>true</pocketbutton>
    <harris>11023</harris>
    <harrismodified>true</harrismodified>
    <monostyle>24</monostyle>
    <monocolor>19</monocolor>
    <monolocation>Pocket Center</monolocation>
    <tuxedo>true</tuxedo>
    <bib>9999</bib>
    <pleats>&amp;#189;</pleats>
    <studs>4</studs>
    <epaulets>true</epaulets>
    <anglebuttonholes>true</anglebuttonholes>
    <anglebuttonstack>Triple Stack</anglebuttonstack>
    <iscrowsfoot>true</iscrowsfoot>
    <ispicstitch>true</ispicstitch>
    <issaddlestitch>false</issaddlestitch>
    <sleevetabs>true</sleevetabs>
    <reversibleCC>true</reversibleCC>
  </lineitems>
  <lineitems>
    <collar>
      <stay>
        <id>2</id>
        <name>Removable</name>
        <index>1</index>
      </stay>
      <option>
        <id>4</id>
        <value>H</value>
        <name>H</name>
        <type>HIDDEN BUTTON DOWN</type>
        <index>3</index>
      </option>
      <style>B32B</style>
    </collar>
    <picstitch>
      <id>9</id>
      <value>17</value>
      <name>[17] Dk Pink</name>
      <index>17</index>
    </picstitch>
    <saddlestitch>
      <name>NONE</name>
    </saddlestitch>
    <button>
      <id>55</id>
      <value>011</value>
      <name>[011] Navy</name>
      <index>11</index>
    </button>
    <buttonstitch>
      <id>45</id>
      <value>5</value>
      <name>[5] Hunter</name>
      <index>5</index>
    </buttonstitch>
    <buttonhole>
      <id>1</id>
      <value>1</value>
      <name>[1] Lime</name>
      <index>1</index>
    </buttonhole>
    <pocket>
      <id>1</id>
      <value>X</value>
      <name>No Pocket</name>
      <type>NONE</type>
    </pocket>
    <flaps>
      <id>18</id>
      <value>R</value>
      <name>Round</name>
      <type>FLAPS</type>
      <index>17</index>
    </flaps>
    <crowsfoot>
      <name>NONE</name>
    </crowsfoot>
    <checkedsample>false</checkedsample>
    <sample>true</sample>
    <fabric>6000</fabric>
    <cmt>x</cmt>
    <quantity>1</quantity>
    <tiespace>0</tiespace>
    <chkwhitecollar>true</chkwhitecollar>
    <whitecollar>7987</whitecollar>
    <sleevehalf>false</sleevehalf>
    <sleevelong>true</sleevelong>
    <cuff>
      <option>
        <id>13</id>
        <value>A</value>
        <name>Angle</name>
        <type>2 BUTTON</type>
        <index>12</index>
      </option>
    </cuff>
    <chkwhitecuff>true</chkwhitecuff>
    <whitecuff>8008</whitecuff>
    <pocketbutton>true</pocketbutton>
    <harris>11023</harris>
    <harrismodified>true</harrismodified>
    <monostyle>24</monostyle>
    <monocolor>19</monocolor>
    <monolocation>Pocket Center</monolocation>
    <tuxedo>false</tuxedo>
    <bib>9999</bib>
    <pleats>&amp;#189;</pleats>
    <studs>4</studs>
    <epaulets>true</epaulets>
    <anglebuttonholes>true</anglebuttonholes>
    <anglebuttonstack>Triple Stack</anglebuttonstack>
    <iscrowsfoot>true</iscrowsfoot>
    <ispicstitch>true</ispicstitch>
    <issaddlestitch>false</issaddlestitch>
    <sleevetabs>true</sleevetabs>
    <reversibleCC>true</reversibleCC>
  </lineitems>
</Order>


Save job into semi-delimited

$
0
0

Hi guys,

I create job where I put this query. Its working.

SELECT T0.U_Scid as 'id', T3.U_Boarding as 'start', T3.U_Boarding as 'end', T5.U_Partner as 'room_id', T1.Name as 'status', T0.U_CardName as 'customer', T0.U_ShipName as 'name_ship', T5.U_Type as 'equipment', T3.U_Port as 'port', T3.U_ETA as 'ETA', T3.U_ETD as 'ETD', T0.U_Scid as 'service_id', T2.Name as 'service_classification', T5.U_Type as 'equipment' FROM [XXX].[dbo].[@COR_SC_EQUIP] T5,[XXX].[dbo].[@COR_SC_GENERAL] T3,

[XXX].[dbo].[@COR_SC_HEADER] T0 INNER JOIN [XXX].[dbo].[OSCS] T1 on T0.U_Status = T1.statusID INNER JOIN [XXX].[dbo].[OSCO] T2 on T0.U_Classifi = T2.originID WHERE T3.U_ScID = T0.U_ScID AND T5.U_ScID = T0.U_SciD AND T3.U_Boarding > '2016-01-01 00:00:00.000'

ORDER BY T3.U_ScID

Then I choose advanced in job steps..and choose to save as test.csv.  And when I open test.csv, I have data in this format: 217775      2016-07-21 00:00:00.000                                2016-07-21 00:00:00.000                      66    and not comma delimited. Should I change type  from Transact-SQL into something else? So when I want to import it into database it will be in right format.

Thank you so much for your advice                 

PS: Of course when I run sql I am able to copy table with header and save it into EXCEL and import it easily into another database.

Service stops claiming can't connect to database

$
0
0

So a client has a SQL 2008R2 running on a W2008R2 box, and it is there for two 3rd part programs, one work well with no frequent SQL issues, the other has a problem in staying connect to its small database.  A few times users have been denied logins from the 3rd party interface, but that was restored without any action on my part or the 3rd party's.  They said it was a problem communicating with the database, network issues, etc.  None of which could be proven.

Now a service, that runs right on the server & starts a mail notification program solely for their program, stop at random, sometimes restarts, and sometimes doesn't.  They claim it's the fault of  SQL, somehow, but can't explain further, just that their program logs Microsoft error 2147467259  when failing to reconnect.    Manually, I can always restart the service, and temporarily have a scheduled Windows task to run a "net start" for the service a couple of time a day, just in case.

They won't help, claiming NONE of their other customers has had this issue.   Can anyone here suggest how I can proceed to "fix" this?    Thanks.




Help finding how-to videos for SQL

$
0
0

Hello, Skippy Flatrock here.

I am trying to learn how to make databases with SQL server 2016. I downloaded the SSMS program which enables me to make a database. I also know how to connect to a database hosted by my PC. What I need help with is to find a free video series that will show me the ins and outs of SQL server 2016. 

Thank in advance for all of your help.

Installing SQL Server 2014 Express

$
0
0

I have downloaded this version to my PC and ran the installation completely. There is a C:\Program Files\Microsoft SQL Server directory that has been created but I find no way of running SQL Server. The All Apps of Windows 10 shows

SQL Server 2014 Configuration

SQL Server 2014 Error and Usage Reporting

SQL Server 2014 Import and Export Data(64 bit)

SQL Server 2014 Installation Center(64 bit)

Can you help?

How to fix error 18456

$
0
0

1. I have installed sql server express 2014.

2. I have log on as > Built In Account > Local Service.

3. When i am trying to connect with Sql Server using Management studio then it shows error Login Failed , Microsoft SQL Server Error Code 18456. The detailed message is given below.

____________________________________________________________________________________________

===================================

Cannot connect to DESKTOP-VKG96O2.

===================================

Login failed for user 'DESKTOP-VKG96O2\TARUN VERMA'. (.Net SqlClient Data Provider)

------------------------------
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&EvtSrc=MSSQLServer&EvtID=18456&LinkId=20476

------------------------------
Server Name: DESKTOP-VKG96O2
Error Number: 18456

Severity: 14
State: 1
Line Number: 65536


------------------------------
Program Location:

   at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, DbConnectionPool pool, String accessToken, Boolean applyTransientFaultHandling)
   at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)
   at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup, DbConnectionOptions userOptions)
   at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)
   at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
   at System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
   at System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry)
   at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)
   at System.Data.SqlClient.SqlConnection.Open()
   at Microsoft.SqlServer.Management.SqlStudio.Explorer.ObjectExplorerService.ValidateConnection(UIConnectionInfo ci, IServerType server)
   at Microsoft.SqlServer.Management.UI.ConnectionDlg.Connector.ConnectionThreadUser()

_____________________________________________________________________________________________

Guys! Am i using wrong server name or anything else ?

I have only 1 user account on my machine.

DESKTOP-VKG96O2 is  my machine name.

DESKTOP-VKG96O2\TARUN VERMA is my user name.

I dont have any password for this user, and it is admin account.

Help me please.

Viewing all 6989 articles
Browse latest View live


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