Showing posts with label creation. Show all posts
Showing posts with label creation. Show all posts

Wednesday, March 28, 2012

Problem in ERD creation in sql server management studio

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 kit
2,Commerce Starter Kit
3,eBay Selling StarterKit
4,Jobs Site Starter Kit
5,Personal Site Starter kit
6,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.comRight-click on the database in MS, select properties, and on the files tab, specify an owner for the db.|||When I check to database properties then file option it has the same owner that is (KAMI\Administrator) as of the databases (adventureworks,nortwind,pubs) whos ERD I am able to and have created.|||

That issue was also discussed here:

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=228352&SiteID=1

sql

Monday, March 26, 2012

problem in creation database mirroring

Hi everyone,
Can anyone tell me how I can create a mirror database?
please give me the information step by step.
Thanks,
Nassa
Nassa,
there is a Technet webcast on Mirroring:
http://whitepapers.techrepublic.com.com/thankyou.aspx?&docid=157789&view=157789&load=1
Apart from that, I'd use BOL as the main source of info. If possible, you
might want to get yourself on the 3-day Microsoft Course 2788:
http://www.microsoft.com/learning/syllabi/en-us/2788afinal.mspx
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com .
|||You need two SQL Servers - ideally 3. They can be on the same machine or on
different machines.
In SQL Server Management Studio right click on your database and select
Tasks and Mirror, then select Security button. This will launch the
mirroring wizard. Click Next, click no for Witness (for now), click Next,
click Next at the Choose Servers to configure, accept the defaults for the
principal server instance click Next, Accept the defaults for the mirror
server instance you will have to select your mirror server/instance here.
Click Next, for the Enter the Service accounts dialog click next, and click
Finish.
This should get you operational.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Nassa" <nassim.czdashti@.gmail.com> wrote in message
news:1168853360.943120.231280@.38g2000cwa.googlegro ups.com...
> Hi everyone,
> Can anyone tell me how I can create a mirror database?
> please give me the information step by step.
> Thanks,
> Nassa
>
|||Hilary Cotter,
I try to do that before,but by right clicking on the database, and try
Task,then I dont have any menu like MIRRORING.
What should I do?
Thanks,
Nassa
Hilary Cotter wrote:[vbcol=seagreen]
> You need two SQL Servers - ideally 3. They can be on the same machine or on
> different machines.
> In SQL Server Management Studio right click on your database and select
> Tasks and Mirror, then select Security button. This will launch the
> mirroring wizard. Click Next, click no for Witness (for now), click Next,
> click Next at the Choose Servers to configure, accept the defaults for the
> principal server instance click Next, Accept the defaults for the mirror
> server instance you will have to select your mirror server/instance here.
> Click Next, for the Enter the Service accounts dialog click next, and click
> Finish.
> This should get you operational.
> --
> Hilary Cotter
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
> Looking for a FAQ on Indexing Services/SQL FTS
> http://www.indexserverfaq.com
>
> "Nassa" <nassim.czdashti@.gmail.com> wrote in message
> news:1168853360.943120.231280@.38g2000cwa.googlegro ups.com...
|||This is SQL 2005 right? You are running at the 90 compatibility level? And
it SQL 2005 Standard and above. Workgroup and Express do not support
database mirroring.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Nassa" <nassim.czdashti@.gmail.com> wrote in message
news:1168934654.927792.65420@.11g2000cwr.googlegrou ps.com...
> Hilary Cotter,
> I try to do that before,but by right clicking on the database, and try
> Task,then I dont have any menu like MIRRORING.
> What should I do?
> Thanks,
> Nassa
>
> Hilary Cotter wrote:
>
|||Hilary Cotter,
yes it is SQL 2005 server and I use SQL server management studio
express.
What should I do?Which SQL should I use?
Thanks,
Nassa
Hilary Cotter wrote:[vbcol=seagreen]
> This is SQL 2005 right? You are running at the 90 compatibility level? And
> it SQL 2005 Standard and above. Workgroup and Express do not support
> database mirroring.
> --
> Hilary Cotter
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
> Looking for a FAQ on Indexing Services/SQL FTS
> http://www.indexserverfaq.com
>
> "Nassa" <nassim.czdashti@.gmail.com> wrote in message
> news:1168934654.927792.65420@.11g2000cwr.googlegrou ps.com...
sql

Friday, March 9, 2012

problem creation, script with create view

I created a script like this :
use tk_main
GO
if exists (select table_name from information_schema.views where table_name
= 'V_08701')
drop view V_08701
GO
CREATE VIEW V_08701 (D_ATE,NO_ENVOI,ARRIVEE,TOT_COLIS) AS SELECT
D_ATE,NO_ENVOI,ARRIVEE,SUM(NB_COLIS) FROM POSBAR_L GROUP BY
D_ATE,NO_ENVOI,ARRIVEE
GO
grant all on V_08701 to public
GO
if exists (select table_name from information_schema.views where table_name
= 'V95001') drop view V_95001
GO
CREATE VIEW V_95001 (NO_FAC,NO_ENVOI,ARRIVEE,NOMBRE) AS SELECT
NO_FAC,NO_ENVOI_TK,ARRIVEE,COUNT(NO_ENVO
I_TK) FROM FACTURE_IMP_D GROUP BY
NO_FAC,NO_ENVOI_TK,ARRIVEE
GO
if exists (select table_name from information_schema.views where table_name
= 'V_08601') drop view V_08601
GO
CREATE VIEW V_08601
(DTE,TRANSPORTEUR,ARRIVEE,NO_ENVOI,OPERA
TION_C_D,ETAT_ARRIVEE,ETAT_POSBAR,PO
IDS,TYP_SCANNAGE) AS SELECT ARRIVEE.DTE_ARR_DEP, ARRIVEE.TRANSPORTEUR,
ARRIVEE.ARRIVEE,POSBAR_E.NO_ENVOI,
ARRIVEE.OPERATION_C_D,ARRIVEE.ETAT_ARRIVEE, POSBAR_E.ETAT,
POSBAR_E.POIDS,POSBAR_E.TYP_SCANNAGE FROM ARRIVEE, POSBAR_E WHERE
ARRIVEE.ARRIVEE = POSBAR_E.ARRIVEE
GO
but the analyser doesn't like this script.
Can someboady help me out.
Thanks in advance
RalfWhat error messages do you get?
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"Ralf Meuser" <rmeuser@.free.fr> wrote in message
news:40618606$0$7376$626a14ce@.news.free.fr...
> I created a script like this :
> use tk_main
> GO
> if exists (select table_name from information_schema.views where
table_name
> = 'V_08701')
> drop view V_08701
> GO
> CREATE VIEW V_08701 (D_ATE,NO_ENVOI,ARRIVEE,TOT_COLIS) AS SELECT
> D_ATE,NO_ENVOI,ARRIVEE,SUM(NB_COLIS) FROM POSBAR_L GROUP BY
> D_ATE,NO_ENVOI,ARRIVEE
> GO
> grant all on V_08701 to public
> GO
> if exists (select table_name from information_schema.views where
table_name
> = 'V95001') drop view V_95001
> GO
> CREATE VIEW V_95001 (NO_FAC,NO_ENVOI,ARRIVEE,NOMBRE) AS SELECT
> NO_FAC,NO_ENVOI_TK,ARRIVEE,COUNT(NO_ENVO
I_TK) FROM FACTURE_IMP_D GROUP BY
> NO_FAC,NO_ENVOI_TK,ARRIVEE
> GO
> if exists (select table_name from information_schema.views where
table_name
> = 'V_08601') drop view V_08601
> GO
> CREATE VIEW V_08601
>
(DTE,TRANSPORTEUR,ARRIVEE,NO_ENVOI,OPERA
TION_C_D,ETAT_ARRIVEE,ETAT_POSBAR,PO[col
or=darkred]
> IDS,TYP_SCANNAGE) AS SELECT ARRIVEE.DTE_ARR_DEP, ARRIVEE.TRANSPORTEUR,
> ARRIVEE.ARRIVEE,POSBAR_E.NO_ENVOI,
> ARRIVEE.OPERATION_C_D,ARRIVEE.ETAT_ARRIVEE, POSBAR_E.ETAT,
> POSBAR_E.POIDS,POSBAR_E.TYP_SCANNAGE FROM ARRIVEE, POSBAR_E WHERE
> ARRIVEE.ARRIVEE = POSBAR_E.ARRIVEE
> GO
> --
> but the analyser doesn't like this script.
> Can someboady help me out.
> Thanks in advance
> Ralf
>
>[/color]|||Sorry I forgot to sedn the error :
Serveur : Msg 170, Niveau 15, tat 1, Procdure V_08701, Ligne 2
Ligne 2 : syntaxe incorrecte vers 'GO'.
Serveur : Msg 170, Niveau 15, tat 1, Ligne 1
Ligne 1 : syntaxe incorrecte vers 'GO'.
Serveur : Msg 111, Niveau 15, tat 1, Ligne 2
'CREATE VIEW' doit tre la premire instruction d'un lot de requtes.
Serveur : Msg 170, Niveau 15, tat 1, Ligne 3
Ligne 3 : syntaxe incorrecte vers 'GO'.
Serveur : Msg 170, Niveau 15, tat 1, Ligne 5
Ligne 5 : syntaxe incorrecte vers 'GO'.
Serveur : Msg 111, Niveau 15, tat 1, Ligne 6
'CREATE VIEW' doit tre la premire instruction d'un lot de requtes.
Serveur : Msg 170, Niveau 15, tat 1, Ligne 7
Ligne 7 : syntaxe incorrecte vers 'GO'.
Serveur : Msg 170, Niveau 15, tat 1, Ligne 9
Ligne 9 : syntaxe incorrecte vers 'GO'.
Serveur : Msg 111, Niveau 15, tat 1, Ligne 10
'CREATE VIEW' doit tre la premire instruction d'un lot de requtes.
Serveur : Msg 170, Niveau 15, tat 1, Ligne 11
Ligne 11 : syntaxe incorrecte vers 'GO'.
Serveur : Msg 170, Niveau 15, tat 1, Ligne 13
Ligne 13 : syntaxe incorrecte vers 'GO'.
Serveur : Msg 111, Niveau 15, tat 1, Ligne 14
'CREATE VIEW' doit tre la premire instruction d'un lot de requtes.
Ralf
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> a crit
dans le message de news:em9NhSaEEHA.3980@.TK2MSFTNGP09.phx.gbl...
> What error messages do you get?
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
>
> "Ralf Meuser" <rmeuser@.free.fr> wrote in message
> news:40618606$0$7376$626a14ce@.news.free.fr...
> table_name
> table_name
BY
> table_name
>
(DTE,TRANSPORTEUR,ARRIVEE,NO_ENVOI,OPERA
TION_C_D,ETAT_ARRIVEE,ETAT_POSBAR,PO[col
or=darkred]
>|||Since this is an English speaking newsgroup, it would be helpful if you woul
d translate the French messages
instead of letting us do that.
I don't see a problem with this, unless you actually have a line-break in th
e middle of a column name in your
code as well (I assume it is inserted by your newsreader).
Perhaps someone has changed the batch separator (from GO to something else)
in Query Analyzer?
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"Ralf Meuser" <rmeuser@.free.fr> wrote in message news:406197b3$0$309$626a14ce@.news.free.fr.
.
> Sorry I forgot to sedn the error :
> Serveur : Msg 170, Niveau 15, tat 1, Procdure V_08701, Ligne 2
> Ligne 2 : syntaxe incorrecte vers 'GO'.
> Serveur : Msg 170, Niveau 15, tat 1, Ligne 1
> Ligne 1 : syntaxe incorrecte vers 'GO'.
> Serveur : Msg 111, Niveau 15, tat 1, Ligne 2
> 'CREATE VIEW' doit tre la premire instruction d'un lot de requtes.
> Serveur : Msg 170, Niveau 15, tat 1, Ligne 3
> Ligne 3 : syntaxe incorrecte vers 'GO'.
> Serveur : Msg 170, Niveau 15, tat 1, Ligne 5
> Ligne 5 : syntaxe incorrecte vers 'GO'.
> Serveur : Msg 111, Niveau 15, tat 1, Ligne 6
> 'CREATE VIEW' doit tre la premire instruction d'un lot de requtes.
> Serveur : Msg 170, Niveau 15, tat 1, Ligne 7
> Ligne 7 : syntaxe incorrecte vers 'GO'.
> Serveur : Msg 170, Niveau 15, tat 1, Ligne 9
> Ligne 9 : syntaxe incorrecte vers 'GO'.
> Serveur : Msg 111, Niveau 15, tat 1, Ligne 10
> 'CREATE VIEW' doit tre la premire instruction d'un lot de requtes.
> Serveur : Msg 170, Niveau 15, tat 1, Ligne 11
> Ligne 11 : syntaxe incorrecte vers 'GO'.
> Serveur : Msg 170, Niveau 15, tat 1, Ligne 13
> Ligne 13 : syntaxe incorrecte vers 'GO'.
> Serveur : Msg 111, Niveau 15, tat 1, Ligne 14
> 'CREATE VIEW' doit tre la premire instruction d'un lot de requtes.
>
> Ralf
>
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> a crit
> dans le message de news:em9NhSaEEHA.3980@.TK2MSFTNGP09.phx.gbl...
> BY
> (DTE,TRANSPORTEUR,ARRIVEE,NO_ENVOI,OPERA
TION_C_D,ETAT_ARRIVEE,ETAT_POSBAR,
PO
>