Quantcast
Channel: Getting started with SQL Server forum
Viewing all 9243 articles
Browse latest View live

Row Values Dispaly in Columns

$
0
0

Hi,

One Table have 2 Columns.

1.Order_number

2.PSON NUmber

In Table Contains 6 rows with 2 order_numbers and different PSON Number

I want Order Number,PSON1,PSON2,PSON3,PSON4 and its Values

Ex:--Order_number    PSON NUmber

             1                    ONT10

             1                    ONT11

              1                   ONT12

              2                   ONT13

               2                   ONT14

I want   data :-      Order_number    PSON1          PSON2        PSON3

                                  1                     ONT10      ONT11       ONT12

                                   2                      ONT13     ONT14       Null

Can u PLease suggest any SQL Query...Please


Sql query to display Max values for each ID's

$
0
0

Hi Team,

I have table that contains below data

Date                              ID             Message
2015-05-29 7:00:00      AOOze            abc
2015-05-29 7:05:00      AOOze            start
2015-05-29 7:10:00      AOOze            pqy
2015-05-29 7:15:00      AOOze            stop
2015-05-29 7:20:00      AOOze            lmn     
2015-05-29 7:25:00      LaOze            12a
2015-05-29 7:30:00      LaOze            start 
2015-05-29 7:35:00      LaOze            s34
2015-05-29 7:45:00      LaOze            stop
2015-05-29 7:45:00      LaOze            asr     
and so on following the series for every set of different ID with 5 entries

I need to Find Maximum interval time for each ID and for condition in given message (between Start and Stop)

For example, in above table
For ID AOOze, in message "start" is logged at 7:05 and stop and 7:15, so interval is 10 mins
For ID LaOze, in message "start" is logged at 7:30 and stop and 7:45, so interval is 15 mins

I am looking for a sql query that will return in below format

ID     MAX interval
AOOze   15
LaOze   10

Can you please help

Able to connect to named instance through SQLCMD but not from SSMS? (SQL browser is stopped and instance is hidden)

$
0
0

Hi All,

I am able to connect to named instance through SQLCMD but not from SSMS? (SQL browser is stopped and instance is hidden).

This is SQL SERVER 2008 on a Active/active cluster and i have not configured any alias. 

Wanted to know why the behaviour is like this?

I believe this has to do something with 32bit/64bit architecture? if yes than how it is configured in SQL 2014 as we are planning to upgrade to SQL 2014


aa

Best Practice Number of DBAs

$
0
0

Hi all,

I am curious if anyone is aware of best practice recommendations for the number of Microsoft DBAs for an organization. This is just for Microsoft SQL Server, for a per instance, server, or DB recommendation; hoping to have it backed up by a reputable third party company like Gartner or a staffing organization, or your own experience. I do realize that this is highly dependent on many factors (i.e. what functions/technologies you use, how highly available and complex your environment is, etc.) so I am hoping I don't get that included in the response; I understand that already. Something very general and high level that we could use as a general benchmark.

Really appreciate any guidance.  

copy production sql database to a new development instance on the same server

$
0
0

I recently released to production a working CRUD site on a WS 2012 Datacenter. Now, I seek to copy an instance of the live database into a second instance on the same server in order to continue development without fouling up the production site. I found some similar threads but the differences were enough that these did not work.

I need to do this twice. Once for the "data" and again for the "security" databases. My security database is the VS auto-generated roles/membership which by default is called ASPNETDB.MDF. My data file is named Intake_be.

I want the new files to be named Intake_dev and Intake_security. Both sites can utilize the same roles/membership file. The live production site does not yet have controlled access enabled. Since other sites will be hosted on this server, I want the ASPNETDB.MDF to have a friendly yet specific name.

Thanks in advance.

Kurt

Connection problems to remote sql server

$
0
0

Good day,

I'm currently working on a test project that has 2 SQL servers on 2 remote sites with firewalls and VPN connection in between the 2 sites.

Now that the setup is completed, i am facing a problem reaching one server from another.

The authentication seems to be working, but something after the authentication seems to be blocked, as if i enter wrong credentials, i get the wrong credentials error. but if i enter the correct credentials, i get a time out error, and cannot open the sql server node.

Any suggestions?

select into statement without taking the auto increment of the Id column to the new table

$
0
0

Hi there,

Due to localization I have the need to make child tables, where there is a composite Primary Key, between the Id column and the LanguageSign column. On the parent table the Id column is Identity column with auto increment.

The problem is that during the select into query to copy columns from parent to child, this auto increment behaviour of the parent-Id is copied to the child-Id. However I do not want that, because the same Id will be used by different LanguageSign entries

Is there a way to use 'select into' without copying the auto increment, or is my only option to make a whole new column without auto increment on the child and copy the records?

kind regards, robin

 

btw I have used this statement

SETIDENTITY_INSERT MyTableON , so that inserting into the Id column is possible. I can see however that this does not take away the auto increment...

SQL SERVER permission denied in master

$
0
0

 I have installed SQL Server 2012. I also have SQL server management studio. 

when I try to create a database I get the error  -> CREATE DATABASE permission denied in database "master".

(Microsoft SQL Server,error:262)

I am also denied access when I write a query.

HELP

Jay Smith


SQL 2008 R2 aborts during installation, without error msg

$
0
0

Greeting all.

On a Windows 2008 std server im trying to install SQL 2008 R2, but during installation it just aborts and I end up in  SQL server Installation Center again.

I get to the point where I type in the product key > then I get to the License Terms page > then the Setup Support Files page where I hit "Install", I then see the 'ExecuteCalculateScenarioWorkflow' ect. messages just above the progress bar, and the screen tells me "Setup Support Files in progress". THEN it quits back to the main screen and without any messages what so ever.

Additional info:

SBS 2011 premium add-on. Previous we have had the SQL installed on the same machine, but it have been uninstalled. I have also cleaned up folders and registry. I'm using the domain admin to install

Thanks
Otto

SQL server alias on config manager necessary?

$
0
0

Hi All, so you have two place to configure alias, in SQL server configuration manager under aliases tab on and on the cliconfg.exe tool on a different machine. If I want another server to see this sql server by the alias name I will need to configure the alias on the cliconfg tool on the client machine. It looks like as long as I have the alias configured in the cliconfg on the client machine, I don't need the alias to exist on the config manager, the client can still see SQLserver using just the alias on cliconfg...if so, I wondering under what situation I would really need the alias on the configuration manager? thanks in advance.

Thanks.

Rezwan


SQL Server 2012 installed to Windows Server 2008 R2

$
0
0

It would appear that SQL Server has installed except for the DataBase Engine. Isn't that the reason for even having SQL Server?

I have downloaded the ISO file numerous times, I have burned numerous DVD's I have used different DVD players to do the install, I have copied the contents to the desk top.  I still cannot get an accurate install of SQL Server 2012 onto Windows Server 2008 R2.  SQL Server 2008 R2 is also installed and working just fine.

I am getting the error stating that a CAB file is either missing or corrupt.

I am up against building a second Server Computer to make this work.

Anyone have any Ideas?

I am also trying to install SQL Server Developers Addition 2012 to Windows 7 computer and run into the same problems.  The Windows 7 computer is a complete fresh install with Office 2013, WorkPerfect Office x7, and Adobe installed.  doesn't get much cleaner than that and SQL Server Developer does not install.

What gives?????


dave


What Cloud SQL Server Solutions Are There?

$
0
0

Hello,

I'm developing a WinForm-based ERP application using Visual Studio. Rather than purchasing a dedicated on-premises server just to host the database, does Microsoft provide a cloud alternative without limitations? If not, what reliable vendors can provide this service.

I need a solution that provides the following:-

  1. As much control of the database as that on a dedicated on-premises server.
  2. Accepts SQL connections from any Microsoft Platform (with user control of course) whether it isExcel, InfoPath or any Visual Studio - developed application.

Regards,

Seif

importing database

$
0
0
hello guys how can i import the database that i have created in mysql and ms access to ms sql server

How to list the Table Name on SQL Server use VB.Net 2013

$
0
0

1. How to list the Table Name on SQL Server use VB.Net 2013

2. and also List out the Field Name and type



Create Sql Azure user and set database role

$
0
0

Hello,

I need a code for a stored procedure to create :

a Login named: MyLogin

a User for MyLogin named: MyUser

and set my dabase role to MyUser named: MyRole

Thank you for your help.


How to increase the data file size of database which is configured for always on

$
0
0

HI All,

Could some one please confirm if we can add space(increase data file size) for the database which is configured for always on similar to that of mirroring or we need to follow any different procedure.

I have a requirement wherein the datafiles on both the primary and secondary replica got full, if i add space to the primary database will it automatically get added to the secondary replica or not?

Thanks in Advance,

Regards, Kranthi

Chain of Transaction

$
0
0
Hi,
We have a chain of transactions which need to be completed next
And the deadlock has occurred
What is the solution?

sql connection disconnected on random interval

$
0
0

Dear Sir,

We have Sql Server 2008 installed on windows server 2012 (64 bit) operating system and database is kept on this pc working as a server.

We have installed sql server 2008 on client Pc (Windows 7OS 64 bit) - Total 4

The other network client PCs (Windows 7 OS - Total 4) are connected with database on server with connection string of username and login as server authentication.
Server - Client are connected with Domain Group.
We are getting successful connection but....after sometime

Client network Pcs are getting disconnected from sql server after some random interval and gives error 26 and unable to do database connection.

if we restart the client pc then it works again perfectly, but getting disconnected after some random interval.

please help us in above problem.

Enable Debugging SQL Server 2008

$
0
0

Dear All,

How i can enable debugging for sql server 2008 R2?

Which server roles that grant user to debugging on sql server 2008?

Which user mapping that grant user to debug on sql server 2008?

please help.

best regards,

Surbakti

SQL Server Agent service account cannot be a built-in account "NT SERVICE\SQLSERVERAGENT"

$
0
0
How to run SQL Server Agent service not as a built-in account like: "NT SERVICE\SQLSERVERAGENT"
Viewing all 9243 articles
Browse latest View live


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