SQL Server Creation
Feb 13, 2005Hi, What should I type in as the server name if I would want to create a local database, I tried 'local' and 'localhost' but it didn't work.
View 1 RepliesHi, What should I type in as the server name if I would want to create a local database, I tried 'local' and 'localhost' but it didn't work.
View 1 RepliesWe have an SSAS instance where when we run the query "select * from $system.discover_traces" the creation time in the resultset shows a different time from when we actually started the trace.
for example if we have create the trace at 3.30pm it shows 7.35 pm in the Sql server management studio resultset when we run the query "select * from $system.discover_traces".
A recent SharePoint upgrade has rendered several views obsolete. I am redefining them so that our upper level executive reports show valid data.(yes, I know that doing anything to sharepoint could cause MS to deny support, having said that, this is something I've inherited and need to fix, pronto) The old view was created like so:
USE [AHMC]
GO
/****** Object: View [dbo].[vwSurgicalVolumes] Script Date: 09/04/2015 09:28:03 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE VIEW [dbo].[vwSurgicalVolumes] AS
SELECT
[code]....
As I said, this view is used in a report showing surgical minutes.SharePoint is now on a new server, which is linked differently (distributed?) I've used OPENQUERY to get my 'new' query to work;
SELECT *
FROM OPENQUERY ([PORTALWEBDB], 'SELECT
--AllLists
AL.tp_ID AS ALtpID
,AL.tp_WebID as altpwebid
,AL.tp_Title AS ALTitle
[code]....
My data (ie surgical minutes, etc) seems to be in the XML column, AUD.tp_ColumnSet . So I need to parse it out and convert it to INT to maintain consistency with the previous view. How do I do this within the context of the view definition?Here is a representation of the new and old view data copied to excel :
<datetime1>2014-08-14T04:00:00</datetime1><float1>2.000000000000000e+000</float1><float2>4.190000000000000e+002</float2><float3>1.600000000000000e+001</float3><float4>8.110000000000000e+002</float4><sql_variant1 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:sqltypes="http://schemas.microsoft.com/sqlserver/2004/sqltypes"
[Code] ....
can't format it to make it look decent. InHouseCases =2, InHouseMinutes=419, OutPatientCases =16, OutPatientMinutes=1230. This corresponds to the new data I can see in the XML column; 2.000000000000000e+000 is indeed 2 and 4.190000000000000e_002 is indeed 419.
HI,
I need to create a function in SQL Server 7.0. Is there any way I can do this in this version.
I appreciate your help in advance.
thanks,
Sravan.
When I am trying to create a linked server, I am getting the following error:
Error 6: Specified sql server not found.
I am using 'be made using login's current security contex' option. I have sa access on both servers.
Any ideas?
I m using SQL server 2005 express edition and management studio express. I m still confused with some terms. What is the difference between a new server registration, a new login and a named instance? I installed sql express using default configuration. It shows that my server name is- TANVIRSQLEXPRESS (where Tanvir is my hostname) and it uses windows authentication. I created a new log in from Security>logins in the object explorer of express manager. In the property of this new login I just put the login name and gave password under sql server authentication and leaving everything else as default. I have enabled tcp/ip for both sqlexpress and client protocol in Sql server configuration manger. YET, I cant log in using my new log in name and password. I got the following error-
Cannot connect to TANVIRSQLEXPRESS.
ADDITIONAL INFORMATION:
Login failed for user 'Tanvir'. The user is not associated with a trusted SQL Server connection. (Microsoft SQL Server, Error: 18452)
------------------------------
I just want to know HOW to create a user with password in sql express edition.
I m using SQL server 2005 express edition and management studio express. I m still confused with some terms. What is the difference between a new server registration, a new login and a named instance? I installed sql express using default configuration. It shows that my server name is- TANVIRSQLEXPRESS (where Tanvir is my hostname) and it uses windows authentication. I created a new log in from Security>logins in the object explorer of express manager. In the property of this new login I just put the login name and gave password under sql server authentication and leaving everything else as default. I have enabled tcp/ip for both sqlexpress and client protocol in Sql server configuration manger. YET, I cant log in using my new log in name and password. I got the following error-
Cannot connect to TANVIRSQLEXPRESS.
ADDITIONAL INFORMATION:
Login failed for user 'Tanvir'. The user is not associated with a trusted SQL Server connection. (Microsoft SQL Server, Error: 18452)
------------------------------
I just want to know HOW to create a user with password in sql express edition.
I have downloaded adventurework database intall it then configure the databases in managemnt studio and then make a ERD of the db all works fine.
Then I have intall asp.net 2.0 starter kits.
1,Club Starter kit2,Commerce Starter Kit3,eBay Selling StarterKit4,Jobs Site Starter Kit5,Personal Site Starter kit6,Time Tracker Starter kit
install them and configure the databases in managemnt studio.all thing works fine but when I create erd of any of these databases I get message
Database diagram support objects cannot be installed because this database does not have a valid owner. To continue, first use the Files page of the Database Properties dialog box or the ALTER AUTHORIZATION statement to set the database owner to a valid login, then add the database diagram support objects.
I have read the microsoft kbarticle but really no help.
If any body have gone through same situation and resolve it then please reply.
Thanks
Kamran Shahid
Software Engineer(MCSD.NET)
Progressive Systems (Pvt) Ltd.
Karachi,Pakistan
Tel :92-21-5675294-96
Cell :920304-2212616
Email :kamranshahid@netprosys.com
:kamii47@hotmail.com
I'm trying to create an SSIS package that will do a straight data copy between databases. The problem is that the underlying schema of the origin may change and the requirement is that the transfer be table driven. i.e. the tables that are copied are listed in a table and there should be no human intervention when the schema changes.
I'm moving data between SQL Server and SQL Azure, so backup and restore doesn't work. Has to be an SSIS package.
What's the best way to deal with a changing schema in an SSIS package? Can I delete and rewrite the underlying XML for any tables that change? Do I need to do it programmatically with C#? Do I need to create the package from scratch each time?
I want to create a XML file with data in my table. I have a question about tags.
SELECT
-- Root element attributes
'http://tempuri.org/Form.xsd' AS 'xmlns',
'http://www.w3.org/2001/XMLSchema-instance' AS 'xmlns:xsd',
(
SELECT
-- Creating a default element
[Code] ....
This is my query. When I use 'xmlns' namespace the result is below:
<Form xmlns="http://tempuri.org/Form.xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema-instance">
<Veri xmlns="">
<Satir>
<Id>1</Id>
</Satir>
</Veri>
</Form>
I dont want to see 'xmlns' in 'Veri' tag. When I use xmlna or another word instead of 'xmlns' the result is below:
<Form xmlns="http://tempuri.org/Form.xsd" xmlna:xsd="http://www.w3.org/2001/XMLSchema-instance">
<Veri>
<Satir>
<Id>1</Id>
</Satir>
</Veri>
</Form>
How can I remove 'xmlns' from 'Veri' tag while using it in 'Form' tag
We have a problem with the creation a tempdb on SQL Server 2005 startup
We lost the Q: drive in which tempdb had a datafile
We can't attach a Q: drive because we are using a cluster
When we boot up, here what we get:
tempdb..sysfiles:
fid filename
1 I:Microsoft SQL ServerMSSQL.3MSSQLDATA empdb.mdf
2 I:Microsoft SQL ServerMSSQL.3MSSQLDATA emplog.ldf
master..sysaltfiles
fid filename
1 I:Microsoft SQL ServerMSSQL.3MSSQLDATA empdb.mdf
2 I:Microsoft SQL ServerMSSQL.3MSSQLDATA emplog.ldf
3 P:MSSQLData empdb1.ndf
4 R:MSSQLData empdb2.ndf
5 S:MSSQLData empdb3.ndf
6 T:MSSQLData empdb4.ndf
7 P:MSSQLData empdb_1.ndf
8 P:MSSQLData empdb_11.ndf
9 P:MSSQLData mp1.ndf
10 R:MSSQLData mp2.ndf
11 P:MSSQLData emp1.ndf
12 Q:MSSQLData emp2.ndf
13 R:MSSQLData emp3.ndf
14 S:MSSQLData emp4.ndf
15 S:MSSQLData mp3.ndf
16 T:MSSQLData mp4.ndf
17 P:MSSQLData mp_1.ndf
18 R:MSSQLData mp_2.ndf
19 S:MSSQLData mp_3.ndf
20 T:MSSQLData mp_4.ndf
We've tried to use the 'allow update' option but it won't work. I can't remove lines from sysaltfiles.
We need tempdb to use 4 other devices for performance but it won't remember it's definition because it failed each time. Here the log entry:
CREATE FILE encountered operating system error 21(The device is not ready.) while attempting to open or create the physical file 'Q:MSSQLData emp2.ndf'.
Now I found information on how to resolve this on 2000:
http://groups.google.ca/group/microsoft.public.sqlserver.server/browse_thread/thread/eb365f82650d78d1/7c30472ae0a11448%237c30472ae0a11448
By using a trace flag but I don't see how I can use this on 2005 ! Can someone help me ?
we planning to create partitioning on existing tables. The partitioning is on date column, there should be one partition for each year.
Creating of new partitions should be automated, and also we dont have any plans of archiving old data, all we want is that new partition creation should be automated.
We have created a DDL trigger on SQL server 2005 database for DB audit purpose. Following is the script used for trigger creation
USE [master]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[ChangeLog](
[Code] ....
After the DDL trigger creation. Application team started reporting following error while executing a stored procedure.
*********************************
Error 1:
INSERT failed because the following SET options have incorrect settings: 'ARITHABORT'. Verify that SET options are correct for use with indexed views and/or indexes on computed columns and/or query notifications and/or xml data type methods.
Error2:
[Execute SQL Task] Error: Executing the query "exec sp_drop_indexes_EnhLeaseData delete from dbo.leases where vin_num='XXX' and lease_acct_num='XXXX' delete from dbo.leases where vin_num='XXX' and lease_acct_num='080066225' " failed with the following error: "INSERT failed because the following SET options have incorrect settings: 'ARITHABORT'. Verify that SET options are correct for use with indexed views and/or indexes on computed columns and/or query notifications and/or xml data type methods.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.
I have written a script to GENERATE Random Password. But I want to modify that to a some kind of password which is little easy to remember!
I have seen some of the online sites where they generate passwords which are easy to remember and having some way to remember them,
my script:-
declare @db_pswd nvarchar(4000);
declare @len1 int = 16,
@min tinyint = 40,
@range tinyint = 74,
@exclude varchar(50) = '11cdtyuXR#0:;<=>?@O[]`^/abfty#$%^&1234567890*',
@output varchar(500)
[Code] .....
Script they use to generate indexes in SQL 2005.
I have 2 databases on a separate instance. I want to script out all indexes from database1 then execute it on database2.
How to accomplish this task efficiently.
I need to create a DB dynamically in the Server from the SSIS only....
How to implement this....
SQL Server 2014 BI edition.
select * from sys.dm_os_performance_counters returns the object names prefixed with "SQLServer:" (e.g. SQLServer:Databases)
It was expected as in other editions also. Issue is that when we try to crate "SQLServer Performance Condition alert", object names in "Object" list comes without the prefix "SQLServer:" (e.g. Databases). Please see the attached snapshots.
Hi,
Does any know how to increase a session timeout for Report Creation uing SQL Server 2005 Reporting Services. Iam trying to export a report (to a .pdf) using SQL 05 reporting services. However, it seems that the the query is timing out coz of session-time out. Can anyone tell me how to increase this value ?
Thanks
Nik
I know this is not SQL forums but still if some body has solutions..then plz help
My backend is SQL.
My Ms Access database is always open and getting updated continously.
I need to create Job for SQL. This job will run every 10-15 min may be.
This job should pick latest data from MS Access and put in my SQL server database
Is it possible to create such kind of Job>
OR
Can my application read this MSAccess database when its open by some other application and getting updated continously?----I tried this in vain!!!!
Regards,
Mani
I have a task I need to create an SQL job, that will compare a file path listed in the database, and see if the path actually exists, and for the ones it does not see that dont exist to email the results to an operator ..
IS there a way? I need help.
Thanks
Hello to all!
I have a procedure "rebuild_index" and I would like to create a job running that procedure.
May someone send me a script (template) how to create this job, the most important:
When I click on job's properties->Steps->Edit->General->command I could change the database name, because I have a lot of servers and databases, so this way I could change only DB name in properties (not changing db name in job script)
Thank you very much for your help!
create proc p_rebuild_index as
declare @name varchar(100),
@string varchar(200)
declare c1 cursor for select name from sysobjects where type = 'U'
open c1
fetch c1 into @name
while @@fetch_status = 0
begin
set @string = 'dbcc dbreindex([' + rtrim(@name ) + '],"",85)'
execute (@string)
--print @string
fetch c1 into @name
end
close c1
deallocate c1
GO
How can i create sdf files?
Is there any way to convert a mdb or a xml file to sdf?
The only way i was able to do this was with data port wizard from primeworks, but its not freeware...
Can i populate my sdf database from xml files by writing code...??
Does someone knows??
I have searched everywhere and didnt find anything...
I'm working in VS2005 vb.net and i have installed compact sql...
Thank you!
Is it possible to create a database structure in MS-Access and somehow import it into Visual Web Developer 2005 Express or SQL Server Management Studio 2005 Express?
View 1 Replies View RelatedHi,
I am not sure is this a proper place for my question.
All we know that creating a database can be done as the following.
1) Create a project named DBExample
2) Click Add->New Item.
3) Select SQL Databse and type a name.(Ex: Database1.mdf) A database is added to the project
4) Then add table and input values.
5) Set the primary key....
My question is I parsed a text file to form a 2d string array x. How can I convert x into the database?
Thanks
Hello...
I want to develop a web site having two features
1. Online Shopping2. Forums
Im using SQL Server, ASP.NET and C#. Now the problem is that how do I configure the Databases. Whether I create new database for each or I marge the both things into one database. if i create saperate databases for each of the feature then users have to register for two times, first for forums and second for shopping. I dont want to do this...! I want users to register just for once.
____________Thanks in advNauman Ahmed
I'm sorry to beat this to death but something odd is happening that I'm not quite sure I understand.
I have a number of DTS packages that when originally created with the wizard were scheduled and the jobs have run fine. Today, I created an import job that runs great but then crashes when I try to schedule it from the wizard. When I manually go in and try to schedule the DTS job, it accepts the input but does not create the job.
Since I've done this before, I'm confused about why I was able to do this previously, but not now. Permissions, etc. have not changed at all and I am the dbo for the database. The DTS package and attempted job scheduling are being done on Windows 2000 Server. SQL-Server version is 7.0.
Anybody have any ideas?
can sum one help with this:
I have monthly tables named as 'Tablename_yyyy_mm' etc.
I want to make a view that will capture the current months table and the last 3 months data.
for eg: if today is november 19th, 2003.
The view should capture 'Tablename_2003_11', 'Tablename_2003_10', 'Tablename_2003_09' tables
if today is jan 01,2003
The view should capture 'Tablename_2003_01', 'Tablename_2002_12', 'Tablename_2002_11' tables
Thanks a lot.
I have to create a Procedure called customer_insert which inserts a record in the customer table. The input to the procedure should be all attributes of customer table except customer_id. This Procedure should use a sequence to generate a new customer_id when it is inserting a new record in the customer table. The rule for generating customer_id is that the minimum customer_id should be 1000 and customer_id should be incremented by 1 for every new record
this is the cust table created
create table CUSTOMER (
CUSTOMER_ID NUMBER(6) NOT NULL,
NAME VARCHAR2(45),
ADDRESS VARCHAR2(40),
CITY VARCHAR2(30),
STATE VARCHAR2(2),
ZIP_CODE VARCHAR2(9),
AREA_CODE NUMBER(3),
PHONE_NUMBER NUMBER(7),
SALESPERSON_ID NUMBER(4),
CREDIT_LIMIT NUMBER(9,2),
COMMENTS VARCHAR2(256));
I thought of creating a sequence first and then use the sequence inside the procedure to create a new customer_id ....didnt workkk...
any clues?
i was asked to post this here..
_----------------------------------------
procedure creation
I have to create a Procedure called customer_insert which inserts a record in the customer table. The input to the procedure should be all attributes of customer table except customer_id. This Procedure should use a sequence to generate a new customer_id when it is inserting a new record in the customer table. The rule for generating customer_id is that the minimum customer_id should be 1000 and customer_id should be incremented by 1 for every new record
this is the cust table created
create table CUSTOMER (
CUSTOMER_ID NUMBER(6) NOT NULL,
NAME VARCHAR2(45),
ADDRESS VARCHAR2(40),
CITY VARCHAR2(30),
STATE VARCHAR2(2),
ZIP_CODE VARCHAR2(9),
AREA_CODE NUMBER(3),
PHONE_NUMBER NUMBER(7),
SALESPERSON_ID NUMBER(4),
CREDIT_LIMIT NUMBER(9,2),
COMMENTS VARCHAR2(256));
I thought of creating a sequence first and then use the sequence inside the procedure to create a new customer_id ....didnt workkk...
any clues?
i thought of using identity property in the field so that SQL server automaticaly assigns a unique value to the record. I modified the table structure below. & tried to execute this.
create table CUSTOMER
(
CUSTOMER_ID int identity(1000,1),
NAME VARCHAR2(45),
ADDRESS VARCHAR2(40),
CITY VARCHAR2(30),
STATE VARCHAR2(2),
ZIP_CODE VARCHAR2(9),
AREA_CODE NUMBER(3),
PHONE_NUMBER NUMBER(7),
SALESPERSON_ID NUMBER(4),
CREDIT_LIMIT NUMBER(9,2),
COMMENTS VARCHAR2(256)
)
But while writing insert statement didnt specify this column.
Like
Insert into CUSTOMER (NAME ,ADDRESS ,CITY ,STATE ,ZIP_CODE ,AREA_CODE ,PHONE_NUMBER,SALESPERSON_ID , CREDIT_LIMIT ,COMMENTS )
values('xoxo','planet','earth','jupiter','1234','2 13',31231,231,1231,'1231')
not working.....!!?!?!
Hi
I am supposed to give scripts for an installtion at client site.
installing SQL server 2005 Developer edition
some databases already we have
tables
indexes
Stored procedures
jobs
Can u please guide me how to do this?
I am new to this.
Muralidaran r
I wanted to created a few jobs in my database.
How do i create it using the Batch files?????
Thanks,
Sandu_Bangalore
Hi all,
Here is the problem : I can not create a DTS package in SQLServer.
=> Error description : access denied
Environment :
- Windows NT4 sp6 Server, french, logon on as "Administrator".
- SQLServer 7.0 sp4, french, logon as "sa" on the NT Server with Enterprise Manager.
- SQLServer Agent runs under an Administrator account
Why can't i create à single DTS package ? Strange, isn't it ?
Many thanks for your ideas
Bertrand
Hi all,
Can I create one xml file through transact-sql ( in a stored procedure )?
From where i will get the tutorials ? Please help me ...
I am using the MSSQL Server 8.0 .
thanks
Pinto